Interface ReferenceService


public interface ReferenceService
Service to retrieve references to repository resources.
Since:
6.0.0
Author:
whikloj
  • Method Details

    • getInboundReferences

      Return a RDF stream of statements referring to the provided resource.
      Parameters:
      tx - the transaction or null if no transaction.
      resource - the resource to get inbound references for.
      Returns:
      RDF stream of inbound reference triples.
    • deleteAllReferences

      void deleteAllReferences(Transaction tx, FedoraId resourceId)
      Delete all references from a resource to any other resource.
      Parameters:
      tx - the transaction
      resourceId - the ID of the resource referencing others.
    • updateReferences

      void updateReferences(Transaction tx, FedoraId resourceId, String userPrincipal, RdfStream rdfStream)
      Parse the stream of triples for references, add any new ones and remove any missing ones.
      Parameters:
      tx - the transaction
      resourceId - the subject ID of the triples.
      userPrincipal - the user who's action is updating references.
      rdfStream - the RDF stream.
    • commitTransaction

      Commit any pending references.
      Parameters:
      tx - the transaction.
    • rollbackTransaction

      Rollback any pending references.
      Parameters:
      tx - the transaction.
    • clearAllTransactions

      Clear all transactions in the reference index.
    • reset

      void reset()
      Truncates the reference index. This should only be called when rebuilding the index.