Package org.fcrepo.kernel.api.services
Interface ReferenceService
-
public interface ReferenceService
Service to retrieve references to repository resources.- Since:
- 6.0.0
- Author:
- whikloj
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommitTransaction(Transaction tx)Commit any pending references.voiddeleteAllReferences(Transaction tx, FedoraId resourceId)Delete all references from a resource to any other resource.RdfStreamgetInboundReferences(Transaction tx, FedoraResource resource)Return a RDF stream of statements referring to the provided resource.voidreset()Truncates the reference index.voidrollbackTransaction(Transaction tx)Rollback any pending references.voidupdateReferences(Transaction tx, FedoraId resourceId, String userPrincipal, RdfStream rdfStream)Parse the stream of triples for references, add any new ones and remove any missing ones.
-
-
-
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 transactionresourceId- 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 transactionresourceId- the subject ID of the triples.userPrincipal- the user who's action is updating references.rdfStream- the RDF stream.
-
commitTransaction
void commitTransaction(Transaction tx)
Commit any pending references.- Parameters:
tx- the transaction.
-
rollbackTransaction
void rollbackTransaction(Transaction tx)
Rollback any pending references.- Parameters:
tx- the transaction.
-
reset
void reset()
Truncates the reference index. This should only be called when rebuilding the index.
-
-