|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.support.utils.service.mid.UtilEditor
public class UtilEditor
This is a helper class for those who want to use the typical services of an editor (get, add, change and remove) over an ontological service. It provides methods for automatically generating service profiles and service requests that can be used in ServiceCallees and ServiceCallers. If they are both with he same parameters in both sides, the services are guaranteed to match.
Field Summary | |
---|---|
static String |
FAKE_URI
Argument suffix. |
static String |
IN_ADD
Argument suffix. |
static String |
IN_CHANGE
Argument suffix. |
static String |
IN_GET
Argument suffix. |
static String |
IN_REMOVE
Argument suffix. |
static String |
OUT_GET
Argument suffix. |
static String |
SERVICE_ADD
Service suffix. |
static String |
SERVICE_CHANGE
Service suffix. |
static String |
SERVICE_GET
Service suffix. |
static String |
SERVICE_REMOVE
Service suffix. |
Constructor Summary | |
---|---|
UtilEditor()
|
Method Summary | |
---|---|
static ServiceProfile[] |
getServiceProfiles(String namespace,
String ontologyURI,
String[] path,
String editedURI)
Gives you the 4 typical service profiles of an editor service: Get, Add, Change and Remove. |
static ServiceRequest |
requestAdd(String ontologyURI,
String[] path,
Add argAdd)
Gives you the typical ADD service request for editor services. |
static ServiceRequest |
requestAdd(String ontologyURI,
String[] path,
Object add)
Gives you the typical ADD service request for editor services. |
static ServiceRequest |
requestChange(String ontologyURI,
String[] path,
Change argChange)
Gives you the typical CHANGE service request for editor services. |
static ServiceRequest |
requestChange(String ontologyURI,
String[] path,
Object change)
Gives you the typical CHANGE service request for editor services. |
static ServiceRequest |
requestGet(String ontologyURI,
String[] path,
Object in,
String out)
Gives you the typical GET service request for editor services. |
static ServiceRequest |
requestGet(String ontologyURI,
String[] path,
Variable argIn,
Output argOut)
Gives you the typical GET service request for editor services. |
static ServiceRequest |
requestRemove(String ontologyURI,
String[] path,
Object remove)
Gives you the typical REMOVE service request for editor services. |
static ServiceRequest |
requestRemove(String ontologyURI,
String[] path,
Remove argRemove)
Gives you the typical REMOVE service request for editor services. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SERVICE_GET
public static final String SERVICE_ADD
public static final String SERVICE_CHANGE
public static final String SERVICE_REMOVE
public static final String FAKE_URI
public static final String IN_GET
public static final String OUT_GET
public static final String IN_ADD
public static final String IN_CHANGE
public static final String IN_REMOVE
Constructor Detail |
---|
public UtilEditor()
Method Detail |
---|
public static ServiceProfile[] getServiceProfiles(String namespace, String ontologyURI, String[] path, String editedURI)
namespace
to UtilEditor constants.
Example:
new SCallee(context, getServiceProfiles("http://ontology.universAAL.org/ProfilingServer.owl#", ProfilingService.MY_URI, Path.start(ProfilingService.PROP_CONTROLS).path, Profilable.MY_URI))
namespace
- The namespace of your server, ending with the character #. You
can optionally add some prefix after the # if you use
UtilEditor more than once in the same Callee.ontologyURI
- The MY_URI of the class of Service ontology you are going to
implementpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageeditedURI
- The MY_URI of the class of the concept ontology that you want
to manage, which is at the end of the property path
public static ServiceRequest requestGet(String ontologyURI, String[] path, Variable argIn, Output argOut)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageargIn
- Value representing the input you want to pass as
parameter. The editor GET service will return you the full
Resource with the URI of this argument.argOut
- The returned value of the editor GET service will be placed in
the URI represented by this Output. Look for it there in
the response.
public static ServiceRequest requestGet(String ontologyURI, String[] path, Object in, String out)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to managein
- Object representing the input you want to pass as
parameter. The editor GET service will return you the full
Resource with the URI of this argument.out
- The returned value of the editor GET service will be placed in
this URI. Look for it there in
the response.
public static ServiceRequest requestAdd(String ontologyURI, String[] path, Add argAdd)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageargAdd
- Add representing the input you want to pass as
parameter. The editor ADD service will add the full Resource
passed in this argument.
public static ServiceRequest requestAdd(String ontologyURI, String[] path, Object add)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageadd
- Object representing the input you want to pass as
parameter. The editor ADD service will add the full Resource
passed in this argument.
public static ServiceRequest requestChange(String ontologyURI, String[] path, Change argChange)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageargChange
- Change representing the input you want to pass as
parameter. The editor CHANGE service will replace the Resource
of the same URI with this new value
public static ServiceRequest requestChange(String ontologyURI, String[] path, Object change)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to managechange
- Object representing the input you want to pass as
parameter. The editor CHANGE service will replace the Resource
of the same URI with this new value
public static ServiceRequest requestRemove(String ontologyURI, String[] path, Remove argRemove)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageargRemove
- Object representing the input you want to pass as
parameter. The editor REMOVE service will remove all
occurences of the Resource of the same URI of this argument
public static ServiceRequest requestRemove(String ontologyURI, String[] path, Object remove)
ontologyURI
- The MY_URI of the class of Service ontology you want to callpath
- The property path from the root of the Service ontology
concept to the exact concept you want to manageremove
- Object representing the input you want to pass as
parameter. The editor REMOVE service will remove all
occurences of the Resource of the same URI of this object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |