Interface ReferenceService


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

      • getInboundReferences

        RdfStream getInboundReferences​(String txId,
                                       FedoraResource resource)
        Return a RDF stream of statements referring to the provided resource.
        Parameters:
        txId - the transaction ID or null if no transaction.
        resource - the resource to get inbound references for.
        Returns:
        RDF stream of inbound reference triples.
      • deleteAllReferences

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

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

        void commitTransaction​(String txId)
        Commit any pending references.
        Parameters:
        txId - the transaction id.
      • rollbackTransaction

        void rollbackTransaction​(String txId)
        Rollback any pending references.
        Parameters:
        txId - the transaction id.
      • reset

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