public interface LocalEntityService
| Modifier and Type | Method and Description |
|---|---|
OccurrenceRelation |
addOccurrence(CoreSession session,
DocumentRef docRef,
DocumentRef entityRef,
String quoteContext,
int startPosInContext,
int endPosInContext)
Assert that an entity is referred to in the text content of a document.
|
OccurrenceRelation |
addOccurrences(CoreSession session,
DocumentRef docRef,
DocumentRef entityRef,
List<OccurrenceInfo> occurrences)
Add several occurrences of the same entity in to a given document
(occurring in several text snippets).
|
void |
addOccurrences(CoreSession session,
DocumentRef ref,
EntitySuggestion entitySuggestion,
List<OccurrenceInfo> occurrences)
Add several occurrences of the same entity in to a given document
(occurring in several text snippets).
|
DocumentModel |
asLocalEntity(CoreSession session,
EntitySuggestion suggestion)
Ensure that the suggestion is local.
|
DocumentModel |
getEntityContainer(CoreSession session)
The entity container is a singleton container document where to create
the entities.
|
Set<String> |
getEntityTypeNames() |
DocumentModel |
getLinkedLocalEntity(CoreSession session,
URI remoteEntityURI)
Lookup the local repo to find a local entity that is linked to the given
remote entity URI through a owl:sameAs relationship.
|
OccurrenceRelation |
getOccurrenceRelation(CoreSession session,
DocumentRef documentRef,
DocumentRef entityRef)
Find the occurrence relation instance linking a document to an entity.
|
PageProvider<DocumentModel> |
getRelatedDocuments(CoreSession session,
DocumentRef entityRef,
String documentType)
Find entities of a given type related to a given document.
|
PageProvider<DocumentModel> |
getRelatedEntities(CoreSession session,
DocumentRef docRef,
String entityType)
Find entities of a given type related to a given document.
|
void |
removeOccurrences(CoreSession session,
DocumentRef docRef,
DocumentRef entityRef,
boolean forcePhysicalDelete)
Remove any occurrence information of an entity on the specified
documents.
|
List<DocumentModel> |
suggestDocument(CoreSession session,
String keywords,
String type,
int maxSuggestions)
Helper method to suggest documents by keyword match on fulltext content.
|
List<EntitySuggestion> |
suggestEntity(CoreSession session,
OccurrenceGroup group,
int maxSuggestions)
Helper method to suggest entities by keyword match on names.
|
List<EntitySuggestion> |
suggestEntity(CoreSession session,
String keywords,
String type,
int maxSuggestions)
Helper method to suggest entities by keyword match on names.
|
List<EntitySuggestion> |
suggestLocalEntity(CoreSession session,
String keywords,
String type,
int maxSuggestions)
Helper method to suggest local entities by keyword match on names.
|
DocumentModel getEntityContainer(CoreSession session) throws ClientException
ClientExceptionList<EntitySuggestion> suggestEntity(CoreSession session, String keywords, String type, int maxSuggestions) throws ClientException, DereferencingException
session - an active CoreSession used for local entity queries.keywords - keywords to match the entity namestype - the Nuxeo type name of entity to match (or null)maxSuggestions - maximum number of entities to suggestClientExceptionDereferencingExceptionList<EntitySuggestion> suggestEntity(CoreSession session, OccurrenceGroup group, int maxSuggestions) throws DereferencingException, ClientException
session - an active CoreSession used for local entity queries.group - a group of occurrence pointing to a supposedly unique entity
to be resolved in the various local and remote entity sources.maxSuggestions - maximum number of entities to suggestDereferencingExceptionClientExceptionList<EntitySuggestion> suggestLocalEntity(CoreSession session, String keywords, String type, int maxSuggestions) throws ClientException
keywords - keywords to match the entity namestype - the Nuxeo type name of entity to match (or null)maxSuggestions - maximum number of entities to suggestClientExceptionList<DocumentModel> suggestDocument(CoreSession session, String keywords, String type, int maxSuggestions) throws Exception
keywords - keywords to match the document namestype - the Nuxeo type name of documents to match (or null)maxSuggestions - maximum number of entities to suggestExceptionOccurrenceRelation addOccurrence(CoreSession session, DocumentRef docRef, DocumentRef entityRef, String quoteContext, int startPosInContext, int endPosInContext) throws ClientException
session - active session to the repository holding the document and
entitiesdocRef - the id of the document referring to the entityentityRef - the id of the entity referred to by the document snippetquoteContext - the text snippet holding the expression pointing to
the entitystartPosInContext - the position of the start of the expressionendPosInContext - ClientExceptionOccurrenceRelation addOccurrences(CoreSession session, DocumentRef docRef, DocumentRef entityRef, List<OccurrenceInfo> occurrences) throws ClientException
session - active session to the repository holding the document and
entitiesdocRef - the id of the document referring to the entityentityRef - the id of the entity referred to by the document snippetoccurrences - list of occurrence data to add to the relationshipClientExceptionvoid addOccurrences(CoreSession session, DocumentRef ref, EntitySuggestion entitySuggestion, List<OccurrenceInfo> occurrences) throws ClientException, IOException
session - active session to the repository holding the document and
entitiesdocRef - the id of the document referring to the entityentitySuggestion - entity to dereference if not local, and link to
itoccurrences - list of occurrence data to add to the relationshipIOException - if dereferencing remote entity failsClientExceptionvoid removeOccurrences(CoreSession session, DocumentRef docRef, DocumentRef entityRef, boolean forcePhysicalDelete) throws ClientException
session - active session to the repository holding the document and
entitiesdocRef - the id of the document referring to the entityentityRef - the id of the entity to remove occurrences forforcePhysicalDelete - perform physical deletion (no trash)ClientException - if the repository fails or the document does not
exist.OccurrenceRelation getOccurrenceRelation(CoreSession session, DocumentRef documentRef, DocumentRef entityRef) throws ClientException
session - the repository session where the document is storeddocumentRef - the reference of the source documententityRef - the reference of the targeted entityClientExceptionPageProvider<DocumentModel> getRelatedEntities(CoreSession session, DocumentRef docRef, String entityType) throws ClientException
session - the repository session where the document is storeddocRef - the reference of the document to seach entities forentityType - the Nuxeo type of entities to lookup (can be null)ClientExceptionPageProvider<DocumentModel> getRelatedDocuments(CoreSession session, DocumentRef entityRef, String documentType) throws ClientException
session - the repository session where the document is storedentityRef - the reference of the entities to search documents fordocumentType - the Nuxeo type of documents to lookup (can be null)ClientExceptionDocumentModel getLinkedLocalEntity(CoreSession session, URI remoteEntityURI) throws ClientException
remoteEntityURI - the entity URI to lookup locallyClientException - in case of problem accessing the local repoSet<String> getEntityTypeNames() throws Exception
Exception - thrown if the TypeManager is not availableDocumentModel asLocalEntity(CoreSession session, EntitySuggestion suggestion) throws ClientException, IOException
ClientExceptionIOExceptionCopyright © 2011 Nuxeo SA. All Rights Reserved.