Class Metadata


  • public final class Metadata
    extends Object
    Metadata values used for resource composition.
    • Method Detail

      • builder

        public static Metadata.Builder builder​(IRI identifier)
        A mutable builder for a Metadata object.
        Parameters:
        identifier - the resource identifier
        Returns:
        a builder for a Metadata object
      • getIdentifier

        public IRI getIdentifier()
        Get an identifier for this metadata.
        Returns:
        the identifier
      • getInteractionModel

        public IRI getInteractionModel()
        Get the LDP interaction model for this metadata.
        Returns:
        the interaction model
      • getContainer

        public Optional<IRI> getContainer()
        Get the container for this resource.
        Returns:
        the identifier for a container, if one exists.
        API Note:
        returning an empty Optional should indicate here that the resource is not contained by any parent resource. This may be because it is a root resource and therefore not contained by any other resource. Alternatively, it could mean that a PUT operation was used to create the resource.
      • getMembershipResource

        public Optional<IRI> getMembershipResource()
        Retrieve the membership resource if this is an LDP Direct or Indirect container.
        Returns:
        the membership resource
        Implementation Requirements:
        Other LDP resource types will always return an empty Optional value
      • getMemberRelation

        public Optional<IRI> getMemberRelation()
        Retrieve the member relation if this is an LDP Direct or Indirect container.
        Returns:
        the ldp:hasMemberRelation IRI
        Implementation Requirements:
        Other LDP resource types will always return an empty Optional value
      • getMemberOfRelation

        public Optional<IRI> getMemberOfRelation()
        Retrieve the member of relation IRI.
        Returns:
        the ldp:isMemberOfRelation IRI
        Implementation Requirements:
        Other LDP resource types will always return an empty Optional value
      • getInsertedContentRelation

        public Optional<IRI> getInsertedContentRelation()
        Retrieve the inserted content relation if this is an LDP Indirect container.
        Returns:
        the inserted content relation
        Implementation Requirements:
        Other LDP resource types will always return an empty Optional value
      • getBinary

        public Optional<BinaryMetadata> getBinary()
        Retrieve the binary metadata if this is an LDP NonRDFSource.
        Returns:
        the binary metadata
        Implementation Requirements:
        Other LDP resource types will always return an empty Optional value
      • getMetadataGraphNames

        public Set<IRI> getMetadataGraphNames()
        Retrieve the associated metadata graph names.
        Returns:
        any associated metadata graph names
      • getRevision

        public Optional<String> getRevision()
        Retrieve the revision value, if one exists.
        Returns:
        a unique revision value, representing the state of the resource