Interface FedoraResource

    • Method Detail

      • getId

        String getId()
        Get the fedora identifier for this resource
        Returns:
        the fedora identifier
      • getFedoraId

        FedoraId getFedoraId()
        Get the FedoraId for this resource.
        Returns:
        the FedoraId identifier.
      • getChildren

        Stream<FedoraResourcegetChildren​(Boolean recursive)
        Get the children of this resource, possibly recursively
        Parameters:
        recursive - whether to recursively fetch child resources
        Returns:
        a stream of Fedora resources
      • getOriginalResource

        FedoraResource getOriginalResource()
        Get the Original Resource for which this resource is a memento or timemap for. If this resource is not a memento or timemap, then it is the original.
        Returns:
        the original resource for this
      • getTimeMap

        TimeMap getTimeMap()
        Get the TimeMap/LDPCv of this resource
        Returns:
        the container for TimeMap/LDPCv of this resource
      • getMementoDatetime

        Instant getMementoDatetime()
        Retrieve the mementoDatetime property and return it as an Instant
        Returns:
        the Instant for this resource
      • isMemento

        boolean isMemento()
        Returns true if this resource is a Memento.
        Returns:
        true if the resource is a Memento.
      • isAcl

        boolean isAcl()
        Returns true if this resource is an ACL.
        Returns:
        true if the resource is an ACL.
      • findMementoByDatetime

        FedoraResource findMementoByDatetime​(Instant mementoDatetime)
        Retrieve the Memento with the closest datetime to the request.
        Parameters:
        mementoDatetime - The requested date time.
        Returns:
        The closest Memento or null.
      • getAcl

        FedoraResource getAcl()
        Get the ACL of this resource
        Returns:
        the container for ACL of this resource
      • hasProperty

        boolean hasProperty​(String relPath)
        Does this resource have a property
        Parameters:
        relPath - the given path
        Returns:
        the boolean value whether the resource has a property
      • hasType

        boolean hasType​(String type)
        Check if this object uses a given RDF type
        Parameters:
        type - the given type
        Returns:
        whether the object has the given type
      • getUserTypes

        List<URIgetUserTypes()
        Get only the user provided types from their RDF.
        Returns:
        a list of types from the user provided RDF.
      • getSystemTypes

        List<URIgetSystemTypes​(boolean forRdf)
        Get only the system defined types from their RDF.
        Parameters:
        forRdf - whether we only want types for displaying in a RDF body.
        Returns:
        a list of types from the user provided RDF.
      • getTypes

        List<URIgetTypes()
        Get the RDF:type values for this resource, this is usually the combination of getUserTypes and getSystemTypes(false) to get ALL the types.
        Returns:
        a list of types for this resource
      • getTriples

        RdfStream getTriples()
        Return the RDF properties for this resource.
        Returns:
        the RDF properties of this object.
      • getEtagValue

        String getEtagValue()
        Construct an ETag value for the resource.
        Returns:
        constructed etag value
      • getStateToken

        String getStateToken()
        Construct a State Token value for the resource.
        Returns:
        constructed state-token value
      • isOriginalResource

        boolean isOriginalResource()
        Check if a resource is an original resource (ie versionable, as opposed to non-versionable resources like mementos, timemaps, and acls).
        Returns:
        whether the resource is an original resource.