The EntityAPI provides a simple abstraction on top of the SemanticRepositoryAPI. It allows loading of the whole available semantic information for a given entity with a single call. The typical use case for this is to implement a user interface, similar to what is available from the "Knowledge Explorer" in the KIM Web UI. All methods available from the Java API are implemented as web service methods:
Web service method | Description |
---|---|
getEntityDescription | allows access to the structured content of a single entity. It accepts the entity URI as a String input and returns EntityDescription as result. |
addEntityDescription | allows adding a new entity in the semantic repository. It accepts an object of class EntityDescription as input and returns no result. |
serializeEntities | allows the transformation (serialization) of a list of entity descriptions into a string. It accepts a list of objects of class EntityDescription as input and returns a single string as result. |
deserializeEntities | allows the transformation of a string with serialized entities into a list of structured entity descriptions. As an input it accepts a single string and an optional parameter for namespace (if URIs do not have such defined) and returns a list of objects of class EntityDescription as result. |
Example:
Get and print the description of the entity of class http://proton.semanticweb.org/2006/05/protonu#Company.
The code from the examples uses AXIS 1.4 for the web services communication.
Labels: