Class FedoraResourceImpl

java.lang.Object
org.fcrepo.kernel.impl.models.FedoraResourceImpl
All Implemented Interfaces:
org.fcrepo.kernel.api.models.FedoraResource
Direct Known Subclasses:
BinaryImpl, ContainerImpl, NonRdfSourceDescriptionImpl, TimeMapImpl, TombstoneImpl

public class FedoraResourceImpl extends Object implements org.fcrepo.kernel.api.models.FedoraResource
Implementation of a Fedora resource, containing functionality common to the more concrete resource implementations.
Author:
bbpennel
  • Field Details

    • resourceFactory

      protected final org.fcrepo.kernel.api.models.ResourceFactory resourceFactory
    • fedoraId

      protected final org.fcrepo.kernel.api.identifiers.FedoraId fedoraId
    • transaction

      protected final org.fcrepo.kernel.api.Transaction transaction
  • Constructor Details

    • FedoraResourceImpl

      protected FedoraResourceImpl(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.persistence.api.PersistentStorageSessionManager pSessionManager, org.fcrepo.kernel.api.models.ResourceFactory resourceFactory, org.fcrepo.kernel.api.cache.UserTypesCache userTypesCache)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.fcrepo.kernel.api.models.FedoraResource
    • getChildren

      public Stream<org.fcrepo.kernel.api.models.FedoraResource> getChildren(Boolean recursive)
      Specified by:
      getChildren in interface org.fcrepo.kernel.api.models.FedoraResource
    • getContainer

      public org.fcrepo.kernel.api.models.FedoraResource getContainer()
      Specified by:
      getContainer in interface org.fcrepo.kernel.api.models.FedoraResource
    • getOriginalResource

      public org.fcrepo.kernel.api.models.FedoraResource getOriginalResource()
      Specified by:
      getOriginalResource in interface org.fcrepo.kernel.api.models.FedoraResource
    • getTimeMap

      public org.fcrepo.kernel.api.models.TimeMap getTimeMap()
      Specified by:
      getTimeMap in interface org.fcrepo.kernel.api.models.FedoraResource
    • getMementoDatetime

      Specified by:
      getMementoDatetime in interface org.fcrepo.kernel.api.models.FedoraResource
    • isMemento

      public boolean isMemento()
      Specified by:
      isMemento in interface org.fcrepo.kernel.api.models.FedoraResource
    • isAcl

      public boolean isAcl()
      Specified by:
      isAcl in interface org.fcrepo.kernel.api.models.FedoraResource
    • findMementoByDatetime

      public org.fcrepo.kernel.api.models.FedoraResource findMementoByDatetime(Instant mementoDatetime)
      Specified by:
      findMementoByDatetime in interface org.fcrepo.kernel.api.models.FedoraResource
    • getAcl

      public org.fcrepo.kernel.api.models.FedoraResource getAcl()
      Specified by:
      getAcl in interface org.fcrepo.kernel.api.models.FedoraResource
    • hasProperty

      public boolean hasProperty(String relPath)
      Specified by:
      hasProperty in interface org.fcrepo.kernel.api.models.FedoraResource
    • getCreatedDate

      Specified by:
      getCreatedDate in interface org.fcrepo.kernel.api.models.FedoraResource
    • getLastModifiedDate

      Specified by:
      getLastModifiedDate in interface org.fcrepo.kernel.api.models.FedoraResource
    • hasType

      public boolean hasType(String type)
      Specified by:
      hasType in interface org.fcrepo.kernel.api.models.FedoraResource
    • getTypes

      public List<URI> getTypes()
      Specified by:
      getTypes in interface org.fcrepo.kernel.api.models.FedoraResource
    • getSystemTypes

      public List<URI> getSystemTypes(boolean forRdf)
      Specified by:
      getSystemTypes in interface org.fcrepo.kernel.api.models.FedoraResource
    • getUserTypes

      public List<URI> getUserTypes()
      Specified by:
      getUserTypes in interface org.fcrepo.kernel.api.models.FedoraResource
    • getTriples

      public org.fcrepo.kernel.api.RdfStream getTriples()
      Specified by:
      getTriples in interface org.fcrepo.kernel.api.models.FedoraResource
    • getEtagValue

      public String getEtagValue()
      Specified by:
      getEtagValue in interface org.fcrepo.kernel.api.models.FedoraResource
    • getStateToken

      Specified by:
      getStateToken in interface org.fcrepo.kernel.api.models.FedoraResource
    • isOriginalResource

      public boolean isOriginalResource()
      Specified by:
      isOriginalResource in interface org.fcrepo.kernel.api.models.FedoraResource
    • getDescription

      public org.fcrepo.kernel.api.models.FedoraResource getDescription()
      Specified by:
      getDescription in interface org.fcrepo.kernel.api.models.FedoraResource
    • getDescribedResource

      public org.fcrepo.kernel.api.models.FedoraResource getDescribedResource()
      Specified by:
      getDescribedResource in interface org.fcrepo.kernel.api.models.FedoraResource
    • getSession

      protected org.fcrepo.persistence.api.PersistentStorageSession getSession()
    • getParent

      public org.fcrepo.kernel.api.models.FedoraResource getParent() throws org.fcrepo.kernel.api.exception.PathNotFoundException
      Specified by:
      getParent in interface org.fcrepo.kernel.api.models.FedoraResource
      Throws:
      org.fcrepo.kernel.api.exception.PathNotFoundException
    • getParentId

      public org.fcrepo.kernel.api.identifiers.FedoraId getParentId()
      Specified by:
      getParentId in interface org.fcrepo.kernel.api.models.FedoraResource
    • getCreatedBy

      public String getCreatedBy()
      Specified by:
      getCreatedBy in interface org.fcrepo.kernel.api.models.FedoraResource
    • getLastModifiedBy

      Specified by:
      getLastModifiedBy in interface org.fcrepo.kernel.api.models.FedoraResource
    • getFedoraId

      public org.fcrepo.kernel.api.identifiers.FedoraId getFedoraId()
      Specified by:
      getFedoraId in interface org.fcrepo.kernel.api.models.FedoraResource
    • getInteractionModel

      Specified by:
      getInteractionModel in interface org.fcrepo.kernel.api.models.FedoraResource
    • getStorageRelativePath

      Specified by:
      getStorageRelativePath in interface org.fcrepo.kernel.api.models.FedoraResource
    • setParentId

      protected void setParentId(org.fcrepo.kernel.api.identifiers.FedoraId parentId)
      Parameters:
      parentId - the parentId to set
    • setTypes

      protected void setTypes(List<URI> types)
      Parameters:
      types - the types to set
    • setLastModifiedDate

      protected void setLastModifiedDate(Instant lastModifiedDate)
      Parameters:
      lastModifiedDate - the lastModifiedDate to set
    • setLastModifiedBy

      protected void setLastModifiedBy(String lastModifiedBy)
      Parameters:
      lastModifiedBy - the lastModifiedBy to set
    • setCreatedDate

      protected void setCreatedDate(Instant createdDate)
      Parameters:
      createdDate - the createdDate to set
    • setCreatedBy

      protected void setCreatedBy(String createdBy)
      Parameters:
      createdBy - the createdBy to set
    • setMementoDatetime

      protected void setMementoDatetime(Instant mementoDatetime)
      Parameters:
      mementoDatetime - the mementoDatetime to set
    • setStateToken

      protected void setStateToken(String stateToken)
      Parameters:
      stateToken - the stateToken to set
    • setEtag

      protected void setEtag(String etag)
      Parameters:
      etag - the etag to set
    • setIsMemento

      public void setIsMemento(boolean isMemento)
      Parameters:
      isMemento - indicates if the resource is a memento
    • setIsArchivalGroup

      public void setIsArchivalGroup(boolean isArchivalGroup)
      Parameters:
      isArchivalGroup - true if the resource is an AG
    • setInteractionModel

      public void setInteractionModel(String interactionModel)
      Parameters:
      interactionModel - the resource's interaction model
    • resolveSystemTypes

      protected List<URI> resolveSystemTypes(boolean forRdf)
    • setArchivalGroupId

      public void setArchivalGroupId(org.fcrepo.kernel.api.identifiers.FedoraId archivalGroupId)
      Parameters:
      archivalGroupId - the FedoraId of the Archival Group for this resource
    • getArchivalGroupId

      public Optional<org.fcrepo.kernel.api.identifiers.FedoraId> getArchivalGroupId()
      Specified by:
      getArchivalGroupId in interface org.fcrepo.kernel.api.models.FedoraResource
    • setStorageRelativePath

      protected void setStorageRelativePath(String storageRelativePath)
      Parameters:
      storageRelativePath - the path to the content