public class UtilEditor extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
UtilEditor() |
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 pathpublic 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 valuepublic 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 valuepublic 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 argumentpublic 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 objectCopyright © 2018 universAAL Consortium. All rights reserved.