Class OverwriteRdfTombstonePersister

java.lang.Object
org.fcrepo.persistence.ocfl.impl.OverwriteRdfTombstonePersister
All Implemented Interfaces:
Persister

Persistence for overwriting tombstones of an RDFSource
Author:
mikejritter
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final FedoraToOcflObjectIndex
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.fcrepo.persistence.common.ResourceHeadersImpl
    createCommonHeaders(org.fcrepo.storage.ocfl.OcflObjectSession session, org.fcrepo.kernel.api.operations.ResourceOperation operation, boolean isResourceRoot, org.fcrepo.kernel.api.identifiers.FedoraId archivalGroupId)
     
    protected Optional<org.fcrepo.kernel.api.identifiers.FedoraId>
    findArchivalGroupInAncestry(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, OcflPersistentStorageSession session)
     
    getMapping(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId resourceId)
     
    boolean
    handle(org.fcrepo.kernel.api.operations.ResourceOperation operation)
    The method returns true if the operation can be persisted by this persister.
    protected String
    mapToOcflId(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId fedoraId)
    Maps the Fedora ID to an OCFL ID.
    void
    persist(OcflPersistentStorageSession session, org.fcrepo.kernel.api.operations.ResourceOperation operation)
    The persistence handling for the given operation.
    protected void
    persistRDF(org.fcrepo.storage.ocfl.OcflObjectSession objectSession, org.fcrepo.kernel.api.operations.ResourceOperation operation, org.fcrepo.kernel.api.identifiers.FedoraId rootId, boolean isArchivalPart)
    Persists the RDF using the specified operation and session.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • persist

      public void persist(OcflPersistentStorageSession session, org.fcrepo.kernel.api.operations.ResourceOperation operation) throws org.fcrepo.persistence.api.exceptions.PersistentStorageException
      Description copied from interface: Persister
      The persistence handling for the given operation.
      Parameters:
      session - The persistent storage session
      operation - The operation and associated data need to perform the operation.
      Throws:
      org.fcrepo.persistence.api.exceptions.PersistentStorageException - on failure
    • persistRDF

      protected void persistRDF(org.fcrepo.storage.ocfl.OcflObjectSession objectSession, org.fcrepo.kernel.api.operations.ResourceOperation operation, org.fcrepo.kernel.api.identifiers.FedoraId rootId, boolean isArchivalPart) throws org.fcrepo.persistence.api.exceptions.PersistentStorageException
      Persists the RDF using the specified operation and session.
      Parameters:
      objectSession - The object session.
      operation - The operation
      rootId - The fedora root object identifier tha maps to the OCFL object root.
      isArchivalPart - indicates if the resource is an AG part resource, ignored on update
      Throws:
      org.fcrepo.persistence.api.exceptions.PersistentStorageException
    • handle

      public boolean handle(org.fcrepo.kernel.api.operations.ResourceOperation operation)
      Description copied from interface: Persister
      The method returns true if the operation can be persisted by this persister.
      Specified by:
      handle in interface Persister
      Parameters:
      operation - the operation to persist
      Returns:
      true or false
    • getMapping

      protected FedoraOcflMapping getMapping(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId resourceId) throws org.fcrepo.persistence.api.exceptions.PersistentStorageException
      Parameters:
      transaction - The externally generated transaction.
      resourceId - The fedora resource identifier
      Returns:
      The associated mapping
      Throws:
      org.fcrepo.persistence.api.exceptions.PersistentStorageException - When no mapping is found.
    • findArchivalGroupInAncestry

      protected Optional<org.fcrepo.kernel.api.identifiers.FedoraId> findArchivalGroupInAncestry(org.fcrepo.kernel.api.identifiers.FedoraId fedoraId, OcflPersistentStorageSession session)
    • mapToOcflId

      protected String mapToOcflId(org.fcrepo.kernel.api.Transaction transaction, org.fcrepo.kernel.api.identifiers.FedoraId fedoraId)
      Maps the Fedora ID to an OCFL ID.
      Parameters:
      transaction - The externally generated transaction.
      fedoraId - The fedora identifier for the root OCFL object
      Returns:
      The OCFL ID
    • createCommonHeaders

      protected org.fcrepo.persistence.common.ResourceHeadersImpl createCommonHeaders(org.fcrepo.storage.ocfl.OcflObjectSession session, org.fcrepo.kernel.api.operations.ResourceOperation operation, boolean isResourceRoot, org.fcrepo.kernel.api.identifiers.FedoraId archivalGroupId) throws org.fcrepo.persistence.api.exceptions.PersistentStorageException
      Throws:
      org.fcrepo.persistence.api.exceptions.PersistentStorageException