Interface FedoraResource

All Known Subinterfaces:
Binary, Container, NonRdfSourceDescription, TimeMap, Tombstone, WebacAcl

public interface FedoraResource
A resource in a Fedora repository.
Since:
Jan 10, 2014
Author:
ajs6f
  • Method Details

    • getId

      Get the fedora identifier for this resource
      Returns:
      the fedora identifier
    • getFedoraId

      Get the FedoraId for this resource.
      Returns:
      the FedoraId identifier.
    • getArchivalGroupId

      Get the FedoraId for the Archival Group of this resource, if it exists
      Returns:
      an Optional containing the FedoraId
    • getParent

      Get the resource which contains this resource.
      Returns:
      the parent resource
      Throws:
      PathNotFoundException - thrown if the parent cannot be found
    • getParentId

      Get the FedoraId of this resource's parent
      Returns:
      the parent resource's id
    • getChildren

      Get the children of this resource
      Returns:
      a stream of Fedora resources
    • getChildren

      Get the children of this resource, possibly recursively
      Parameters:
      recursive - whether to recursively fetch child resources
      Returns:
      a stream of Fedora resources
    • getContainer

      Get the container of this resource
      Returns:
      the container of this resource
    • 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

      Get the TimeMap/LDPCv of this resource
      Returns:
      the container for TimeMap/LDPCv of this resource
    • 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

      Retrieve the Memento with the closest datetime to the request.
      Parameters:
      mementoDatetime - The requested date time.
      Returns:
      The closest Memento or null.
    • 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
    • getCreatedDate

      Get the date this resource was created
      Returns:
      created date
    • getCreatedBy

      Get the created by value
      Returns:
      created by
    • getLastModifiedDate

      Get the date this resource was last modified
      Returns:
      last modified date
    • getLastModifiedBy

      Get the last modified by value
      Returns:
      last modified by
    • 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

      Get only the user provided types from their RDF.
      Returns:
      a list of types from the user provided RDF.
    • getSystemTypes

      List<URI> getSystemTypes(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

      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

      Return the RDF properties for this resource.
      Returns:
      the RDF properties of this object.
    • getEtagValue

      Construct an ETag value for the resource.
      Returns:
      constructed etag value
    • getStateToken

      Construct a State Token value for the resource.
      Returns:
      constructed state-token value
    • 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.
    • getDescription

      Get the description for this resource
      Returns:
      the description for this resource
    • getDescribedResource

      Get the resource described by this resource
      Returns:
      the resource being described
    • getInteractionModel

      Get the resource's interaction model.
      Returns:
      the interaction model.
    • getStorageRelativePath

      Get the resource's path in storage.
      Returns:
      the path in storage.