Resource.SpecialResources
Constructor and Description |
---|
TriplestoreResource(RDFConnection rdfConnection,
IRI identifier,
boolean includeLdpType)
Create a Triplestore-based Resource.
|
Modifier and Type | Method and Description |
---|---|
static CompletableFuture<Resource> |
findResource(RDFConnection rdfConnection,
IRI identifier,
boolean includeLdpType)
Try to load a Trellis resource.
|
Optional<BinaryMetadata> |
getBinaryMetadata()
Retrieve a BinaryMetadata for this resouce, if it is a LDP-NR.
|
Optional<IRI> |
getContainer()
Get the container for this resource.
|
IRI |
getIdentifier()
Get an identifier for this resource.
|
Optional<IRI> |
getInsertedContentRelation()
Retrieve the inserted content relation if this is an LDP Indirect container.
|
IRI |
getInteractionModel()
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.
|
Instant |
getModified()
Get the last modified date.
|
boolean |
hasAcl()
Test whether this resource has an ACL resource.
|
Stream<Quad> |
stream()
Retrieve the RDF Quads for a resource.
|
Stream<Quad> |
stream(Collection<IRI> graphNames)
Retrieve the RDF Quads for a set of named graphs.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dataset, getExtraLinkRelations, getRevision, stream
public TriplestoreResource(RDFConnection rdfConnection, IRI identifier, boolean includeLdpType)
rdfConnection
- the triplestore connectoridentifier
- the identifierincludeLdpType
- whether to include the LDP interaction model in the responsepublic static CompletableFuture<Resource> findResource(RDFConnection rdfConnection, IRI identifier, boolean includeLdpType)
rdfConnection
- the triplestore connectoridentifier
- the identifierincludeLdpType
- whether to include the LDP type in the body of the RDFResource
, if one existsResource
, initializing the object with all resource metadata
used with getModified()
, getInteractionModel()
and other data fetched by the accessors.
The resource content is fetched on demand via the stream()
method.public Optional<IRI> getContainer()
Resource
getContainer
in interface Resource
public Stream<Quad> stream()
Resource
public Stream<Quad> stream(Collection<IRI> graphNames)
Resource
public IRI getIdentifier()
Resource
getIdentifier
in interface Resource
public IRI getInteractionModel()
Resource
getInteractionModel
in interface Resource
public Optional<IRI> getMembershipResource()
Resource
getMembershipResource
in interface Resource
public Optional<IRI> getMemberRelation()
Resource
getMemberRelation
in interface Resource
public Optional<IRI> getMemberOfRelation()
Resource
getMemberOfRelation
in interface Resource
public Optional<IRI> getInsertedContentRelation()
Resource
getInsertedContentRelation
in interface Resource
public Optional<BinaryMetadata> getBinaryMetadata()
Resource
getBinaryMetadata
in interface Resource
public Instant getModified()
Resource
getModified
in interface Resource