|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.scape_project.watch.rest.WatchClient
public class WatchClient
Client for Watch REST service.
| Nested Class Summary | |
|---|---|
static class |
WatchClient.Format
The format of the output. |
| Constructor Summary | |
|---|---|
WatchClient(com.sun.jersey.api.client.WebResource resource,
WatchClient.Format format)
Create a new Watch client. |
|
| Method Summary | ||
|---|---|---|
AsyncRequest |
createAsyncRequest(AsyncRequest request)
Create a new async request. |
|
Entity |
createEntity(String name,
String type)
Create a new Entity. |
|
EntityType |
createEntityType(String name,
String description)
Create a new entity type. |
|
Property |
createProperty(String type,
String name,
String description)
Create a new Property. |
|
PropertyValue |
createPropertyValue(String entity,
String property,
String value)
Create a new PropertyValue. |
|
Entity |
deleteEntity(String name)
Delete an entity. |
|
EntityType |
deleteEntityType(String name)
Delete an existing entity type. |
|
Property |
deleteProperty(String type,
String name)
Delete an existing property. |
|
PropertyValue |
deletePropertyValue(String entity,
String property)
Delete an existing property value. |
|
Entity |
getEntity(String name)
Get entity from server. |
|
EntityType |
getEntityType(String name)
Get an entity type. |
|
Property |
getProperty(String type,
String name)
Get an existing property. |
|
PropertyValue |
getPropertyValue(String entity,
String property)
Get an existing PropertyValue. |
|
|
getRequest(Class<T> targetClass,
String query,
int start,
int max)
Make a synchronous request query. |
|
List<Entity> |
listEntity(int start,
int max)
List all entities in the knowledge base. |
|
List<Entity> |
listEntity(String type,
int start,
int max)
|
|
List<EntityType> |
listEntityType()
List all existing entity types. |
|
List<Property> |
listProperty()
List all properties in the KB. |
|
List<PropertyValue> |
listPropertyValue()
List all property values in the KB. |
|
Entity |
updateEntity(String name,
Entity entity)
Update the entity defined by the name. |
|
EntityType |
updateEntityType(String name,
EntityType entity)
Update an existing entity type. |
|
Property |
updateProperty(String type,
String name,
Property property)
Update an existing property. |
|
PropertyValue |
updatePropertyValue(String entity,
String property,
String value)
Update an existing PropertyValue. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WatchClient(com.sun.jersey.api.client.WebResource resource,
WatchClient.Format format)
resource - the jersey web resource to useformat - the output format to use| Method Detail |
|---|
public Entity createEntity(String name,
String type)
Entity.
name - the entity nametype - the name of the entity type
public Entity getEntity(String name)
name - the entity name
null if not found
public Entity updateEntity(String name,
Entity entity)
name - the name of the entity to updateentity - the updated entity that will replace the previous one
public List<Entity> listEntity(int start,
int max)
public List<Entity> listEntity(String type,
int start,
int max)
public Entity deleteEntity(String name)
name - the name of the entity to delete.
public EntityType createEntityType(String name,
String description)
name - a unique name to identify this entity typedescription - the entity type description
public EntityType getEntityType(String name)
name - the entity type name
EntityType or null if not found
public EntityType updateEntityType(String name,
EntityType entity)
name - the existing entity type nameentity - the new entity type that should replace the old one
public List<EntityType> listEntityType()
public EntityType deleteEntityType(String name)
name - the name of the entity type to delete
public Property createProperty(String type,
String name,
String description)
Property.
type - the EntityType related with this propertyname - a unique name (within this entity type) to identity this propertydescription - the property description
public Property getProperty(String type,
String name)
type - the name of the EntityType related to this propertyname - the name of this property within the EntityType
Property or null if not found.
public Property updateProperty(String type,
String name,
Property property)
type - the EntityType related to this propertyname - the name of this property within the EntityTypeproperty - the new update property
public List<Property> listProperty()
public Property deleteProperty(String type,
String name)
type - the EntityType related to this propertyname - the name of this property within the EntityType
public PropertyValue createPropertyValue(String entity,
String property,
String value)
PropertyValue.
entity - The Entity related to this property valueproperty - the Property related to this property valuevalue - the value of the related property for the related entity.
PropertyValue
public PropertyValue getPropertyValue(String entity,
String property)
PropertyValue.
entity - The Entity related to this property valueproperty - the Property related to this property value
PropertyValue or null if not found.
public PropertyValue updatePropertyValue(String entity,
String property,
String value)
PropertyValue.
entity - The Entity related to this property valueproperty - the Property related to this property valuevalue - The updated value of the related Property to the related
Entity
PropertyValuepublic List<PropertyValue> listPropertyValue()
public PropertyValue deletePropertyValue(String entity,
String property)
entity - The Entity related to this property valueproperty - the Property related to this property value
public <T extends thewebsemantic.binding.RdfBean<T>> List<T> getRequest(Class<T> targetClass,
String query,
int start,
int max)
T - A class that must extends RdfBean and should be related to
possible targets of a request.targetClass - The query target class, that will define the resource type.query - The SPARQL query bindings.start - The index of the first item to retrieve.max - The maximum number of items to retrieve.
public AsyncRequest createAsyncRequest(AsyncRequest request)
request - The new async request to insert into the KB.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||