public interface FedoraResource
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete this resource, and any inbound references to it
|
void |
disableVersioning()
Disable versioning
|
void |
enableVersioning()
Enable versioning
|
FedoraResource |
getBaseVersion()
Get the base version for the node
|
FedoraResource |
getChild(String relPath)
Get the child of this resource at the given path
|
default Stream<FedoraResource> |
getChildren()
Get the children of this resource
|
Stream<FedoraResource> |
getChildren(Boolean recursive)
Get the children of this resource, possibly recursively
|
FedoraResource |
getContainer()
Get the container of this resource
|
Instant |
getCreatedDate()
Get the date this resource was created
|
FedoraResource |
getDescribedResource()
Get the resource described by this resource
|
FedoraResource |
getDescription()
Get the description for this resource
|
String |
getEtagValue()
Construct an ETag value for the resource.
|
Instant |
getLastModifiedDate()
Get the date this resource was last modified
|
String |
getPath()
Get the path to the resource
|
RdfStream |
getTriples(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
Set<? extends TripleCategory> contexts)
Return the RDF properties of this object using the provided contexts
|
RdfStream |
getTriples(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
TripleCategory context)
Return the RDF properties of this object using the provided context
|
List<URI> |
getTypes()
Get the RDF:type values for this resource
|
FedoraResource |
getUnfrozenResource()
Get the unfrozen equivalent of a frozen versioned node
|
FedoraResource |
getVersion(String label)
Get a resource version for this object with the provided label.
|
FedoraResource |
getVersionedAncestor()
When this is a frozen node, get the ancestor that was explicitly versioned
|
String |
getVersionLabelOfFrozenResource()
This method returns the version label of this frozen resource.
|
Stream<FedoraVersion> |
getVersions()
Get a stream of versions associated with this resource
|
boolean |
hasProperty(String relPath)
Does this resource have a property
|
boolean |
hasType(String type)
Check if this object uses a given RDF type
|
boolean |
isFrozenResource()
Check if a resource is frozen (a historic version).
|
Boolean |
isNew()
Check if a resource was created in this session
|
boolean |
isVersioned()
Check if a resource is versioned
|
void |
replaceProperties(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
org.apache.jena.rdf.model.Model inputModel,
RdfStream originalTriples)
Replace the properties of this object with the properties from the given
model
|
void |
updateProperties(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
String sparqlUpdateStatement,
RdfStream originalTriples)
Update the provided properties with a SPARQL Update query.
|
default Stream<FedoraResource> getChildren()
Stream<FedoraResource> getChildren(Boolean recursive)
recursive
- whether to recursively fetch child resourcesFedoraResource getContainer()
FedoraResource getChild(String relPath)
relPath
- the given pathboolean hasProperty(String relPath)
relPath
- the given pathvoid delete()
Instant getCreatedDate()
Instant getLastModifiedDate()
boolean hasType(String type)
Note: the type parameter should be in prefixed short form, so ldp:Container or ex:Image are both acceptable types. This method does not assume any jcr to fedora prefix mappings are managed by the implementation, so hasType("jcr:frozenNode") is a valid use of this method.
type
- the given typeList<URI> getTypes()
void updateProperties(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, String sparqlUpdateStatement, RdfStream originalTriples) throws MalformedRdfException, AccessDeniedException
idTranslator
- the property of idTranslatorsparqlUpdateStatement
- sparql update statementoriginalTriples
- original triplesMalformedRdfException
- if malformed rdf exception occurredAccessDeniedException
- if access denied in updating propertiesRdfStream getTriples(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, TripleCategory context)
idTranslator
- the property of idTranslatorcontext
- the contextRdfStream getTriples(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, Set<? extends TripleCategory> contexts)
idTranslator
- the property of idTranslatorcontexts
- the provided contextsFedoraResource getBaseVersion()
Stream<FedoraVersion> getVersions()
Boolean isNew()
void replaceProperties(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, org.apache.jena.rdf.model.Model inputModel, RdfStream originalTriples) throws MalformedRdfException
idTranslator
- the given property of idTranslatorinputModel
- the input modeloriginalTriples
- the original triplesMalformedRdfException
- if malformed rdf exception occurredString getEtagValue()
void enableVersioning()
void disableVersioning()
boolean isVersioned()
boolean isFrozenResource()
FedoraResource getVersionedAncestor()
FedoraResource getUnfrozenResource()
FedoraResource getVersion(String label)
label
- the labelString getVersionLabelOfFrozenResource()
FedoraResource getDescription()
FedoraResource getDescribedResource()
Copyright © 2013–2018 DuraSpace, Inc.. All rights reserved.