Package org.fcrepo.kernel.api.services
Interface ReferenceService
-
- All Known Implementing Classes:
ReferenceServiceImpl
,ReferenceServiceMetrics
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 void
commitTransaction(Transaction tx)
Commit any pending references.void
deleteAllReferences(Transaction tx, FedoraId resourceId)
Delete all references from a resource to any other resource.RdfStream
getInboundReferences(Transaction tx, FedoraResource resource)
Return a RDF stream of statements referring to the provided resource.void
reset()
Truncates the reference index.void
rollbackTransaction(Transaction tx)
Rollback any pending references.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.
-
-
-
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.
-
-