Interface ReferenceService

    • Method Detail

      • getInboundReferences

        RdfStream getInboundReferences​(Transaction tx,
                                       FedoraResource resource)
        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.
      • reset

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