|
Nuxeo ECM Projects 5.6-RC1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.semanticentities.service.RemoteEntityServiceImpl
public class RemoteEntityServiceImpl
Default implementation for the RemoteEntityService component. Can be used to register remote entity sources for linked data dereferencing.
Field Summary | |
---|---|
static String |
REMOTESOURCES_XP_NAME
|
Constructor Summary | |
---|---|
RemoteEntityServiceImpl()
|
Method Summary | |
---|---|
boolean |
canDereference(URI remoteEntity)
|
boolean |
canSuggestRemoteEntity()
|
boolean |
dereferenceInto(DocumentModel localEntity,
URI remoteEntity,
boolean override,
boolean lazyResourceFetch)
Dereference a remote entity into an existing document model. |
boolean |
dereferenceIntoFromModel(DocumentModel localEntity,
URI remoteEntity,
com.hp.hpl.jena.rdf.model.Model rdfModel,
boolean override,
boolean lazyResourceFetch)
Dereference a remote entity into an existing document model from a pre-fetched RDF description of the entity. |
Set<String> |
getAdmissibleTypes(URI remoteEntity)
Introspect the referenced entity to suggest which Nuxeo types can be used to dereference this entity. |
void |
registerExtension(Extension extension)
Registers the given extension. |
void |
removeSameAsLink(DocumentModel doc,
URI uriToRemove)
Helper API to unlink a local entity from a remote entity identified by it's URI. |
List<EntitySuggestion> |
suggestRemoteEntity(String keywords,
String type,
int maxSuggestions)
Perform query on registered remote entity sources to suggests entity definitions that match the name given as keywords and the requested entity type. |
void |
unregisterExtension(Extension extension)
Unregisters the given extension. |
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
---|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerContribution, setLastModified, unregisterContribution |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REMOTESOURCES_XP_NAME
Constructor Detail |
---|
public RemoteEntityServiceImpl()
Method Detail |
---|
public void registerExtension(Extension extension) throws Exception
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to register
Exception
- if any error occurspublic void unregisterExtension(Extension extension) throws Exception
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregister
Exception
- if any error occurspublic boolean canSuggestRemoteEntity()
canSuggestRemoteEntity
in interface RemoteEntitySource
public boolean canDereference(URI remoteEntity)
canDereference
in interface RemoteEntitySource
public boolean dereferenceInto(DocumentModel localEntity, URI remoteEntity, boolean override, boolean lazyResourceFetch) throws DereferencingException
RemoteEntitySource
override
is set to
true
.
It is the responsibility of the method caller to save the updated
document model back to the repository.
dereferenceInto
in interface RemoteEntitySource
localEntity
- local document model to store a copy of the entity
attributeremoteEntity
- the URI of the entity to dereferenceoverride
- replace non-empty local fields with values from the
remote entitylazyResourceFetch
- if true, delay the fetch of the content of
referenced resources (e.g. JPEG images) to first access.
DereferencingException
public boolean dereferenceIntoFromModel(DocumentModel localEntity, URI remoteEntity, com.hp.hpl.jena.rdf.model.Model rdfModel, boolean override, boolean lazyResourceFetch) throws DereferencingException
RemoteEntitySource
override
is set to true
.
This is typically useful for the SemanticAnalysisService that might
receive pre-fetched entity link suggestion and description from the
enhancement engines.
It is the responsibility of the method caller to save the updated
document model back to the repository.
dereferenceIntoFromModel
in interface RemoteEntitySource
localEntity
- local document model to store a copy of the entity
attributeremoteEntity
- the URI of the entity to dereferenceoverride
- replace non-empty local fields with values from the
remote entitylazyResourceFetch
- if true, delay the fetch of the content of
referenced resources (e.g. JPEG images) to first access.
DereferencingException
public List<EntitySuggestion> suggestRemoteEntity(String keywords, String type, int maxSuggestions) throws IOException
suggestRemoteEntity
in interface RemoteEntitySource
IOException
public Set<String> getAdmissibleTypes(URI remoteEntity) throws DereferencingException
RemoteEntitySource
getAdmissibleTypes
in interface RemoteEntitySource
remoteEntity
- the URI of the entity to dereference
DereferencingException
public void removeSameAsLink(DocumentModel doc, URI uriToRemove) throws ClientException
RemoteEntityService
removeSameAsLink
in interface RemoteEntityService
ClientException
|
Nuxeo ECM Projects 5.6-RC1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |