public interface FedoraResource
Modifier and Type | Method and Description |
---|---|
void |
addType(String type)
Add an RDF:type value to the resource
|
void |
delete()
Delete this resource, and any inbound references to it
|
FedoraResource |
findMementoByDatetime(Instant mementoDatetime)
Retrieve the Memento with the closest datetime to the request.
|
FedoraResource |
findOrCreateAcl()
Create the ACL for this resource if it doesn't exist
|
FedoraResource |
getAcl()
Get the ACL of this resource
|
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
|
Instant |
getMementoDatetime()
Retrieve the mementoDatetime property and return it as an Instant
|
FedoraResource |
getOriginalResource()
Get the Original Resource for which this resource is a memento.
|
String |
getPath()
Get the path to the resource
|
FedoraResource |
getTimeMap()
Get the TimeMap/LDPCv of this 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
|
boolean |
hasProperty(String relPath)
Does this resource have a property
|
boolean |
hasType(String type)
Check if this object uses a given RDF type
|
boolean |
isAcl()
Returns true if this resource is an ACL.
|
boolean |
isMemento()
Returns true if this resource is a Memento.
|
Boolean |
isNew()
Check if a resource was created in this session
|
boolean |
isOriginalResource()
Check if a resource is an original resource
(ie versionable, as opposed to non-versionable resources
like mementos, timemaps, and acls).
|
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 getOriginalResource()
FedoraResource getTimeMap()
Instant getMementoDatetime()
boolean isMemento()
boolean isAcl()
FedoraResource findMementoByDatetime(Instant mementoDatetime)
mementoDatetime
- The requested date time.FedoraResource getAcl()
FedoraResource findOrCreateAcl()
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 addType(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 type to addvoid 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 contextsBoolean 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()
boolean isOriginalResource()
FedoraResource getDescription()
FedoraResource getDescribedResource()
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.