Package org.trellisldp.file
Class FileResource
- java.lang.Object
-
- org.trellisldp.file.FileResource
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.trellisldp.api.Resource
Resource.SpecialResources
-
-
Constructor Summary
Constructors Constructor Description FileResource(IRI identifier, File file)Create a resource backed by an NQuads file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<BinaryMetadata>getBinaryMetadata()Retrieve a BinaryMetadata for this resouce, if it is a LDP-NR.Optional<IRI>getContainer()Get the container for this resource.IRIgetIdentifier()Get an identifier for this resource.Optional<IRI>getInsertedContentRelation()Retrieve the inserted content relation if this is an LDP Indirect container.IRIgetInteractionModel()Get the LDP interaction model for this resource.Optional<IRI>getMemberOfRelation()Retrieve the member of relation IRI.Optional<IRI>getMemberRelation()Retrieve the member relation if this is an LDP Direct or Indirect container.Optional<IRI>getMembershipResource()Retrieve the membership resource if this is an LDP Direct or Indirect container.Set<IRI>getMetadataGraphNames()Retrieve a collection of attached metadata graph names.InstantgetModified()Get the last modified date.Stream<Quad>stream()Retrieve the RDF Quads for a resource.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.trellisldp.api.Resource
dataset, getExtraLinkRelations, getRevision, hasMetadata, stream, stream
-
-
-
-
Method Detail
-
getIdentifier
public IRI getIdentifier()
Description copied from interface:ResourceGet an identifier for this resource.- Specified by:
getIdentifierin interfaceResource- Returns:
- the identifier
-
getInteractionModel
public IRI getInteractionModel()
Description copied from interface:ResourceGet the LDP interaction model for this resource.- Specified by:
getInteractionModelin interfaceResource- Returns:
- the interaction model
-
getModified
public Instant getModified()
Description copied from interface:ResourceGet the last modified date.- Specified by:
getModifiedin interfaceResource- Returns:
- the last-modified date
-
getContainer
public Optional<IRI> getContainer()
Description copied from interface:ResourceGet the container for this resource.- Specified by:
getContainerin interfaceResource- Returns:
- the identifier for a container, if one exists.
-
getBinaryMetadata
public Optional<BinaryMetadata> getBinaryMetadata()
Description copied from interface:ResourceRetrieve a BinaryMetadata for this resouce, if it is a LDP-NR.- Specified by:
getBinaryMetadatain interfaceResource- Returns:
- the binary metadata
-
getMembershipResource
public Optional<IRI> getMembershipResource()
Description copied from interface:ResourceRetrieve the membership resource if this is an LDP Direct or Indirect container.- Specified by:
getMembershipResourcein interfaceResource- Returns:
- the membership resource
-
getMemberRelation
public Optional<IRI> getMemberRelation()
Description copied from interface:ResourceRetrieve the member relation if this is an LDP Direct or Indirect container.- Specified by:
getMemberRelationin interfaceResource- Returns:
- the ldp:hasMemberRelation IRI
-
getInsertedContentRelation
public Optional<IRI> getInsertedContentRelation()
Description copied from interface:ResourceRetrieve the inserted content relation if this is an LDP Indirect container.- Specified by:
getInsertedContentRelationin interfaceResource- Returns:
- the inserted content relation
-
getMemberOfRelation
public Optional<IRI> getMemberOfRelation()
Description copied from interface:ResourceRetrieve the member of relation IRI.- Specified by:
getMemberOfRelationin interfaceResource- Returns:
- the ldp:isMemberOfRelation IRI
-
getMetadataGraphNames
public Set<IRI> getMetadataGraphNames()
Description copied from interface:ResourceRetrieve a collection of attached metadata graph names.- Specified by:
getMetadataGraphNamesin interfaceResource- Returns:
- a set of metadata resource graph names
-
-