public class ServiceCall extends ScopedResource implements UtilityCall
ServiceCallee
s will be called by passing an instance of
this class. The ServiceCallee
must then identify the operation called
using the the return value of getProcessURI()
. In a next step, if
the operation called needs input values, they can be collected by several
calls to getInputValue(String)
. In case of optional input
parameters, the operation should be "executed" with the default value of the
optional parameters only if getInputValue(String)
returns null;
otherwise the passed value must be used.Modifier and Type | Field and Description |
---|---|
static String |
MY_URI
A resource URI that specifies the resource as a service call.
|
static String |
PROP_OWLS_BINDING_VALUE_DATA
A property key for the actual input value within an input resource.
|
static String |
PROP_OWLS_PERFORM_HAS_DATA_FROM
A property key that points to the
List containing all of the
input resources. |
static String |
PROP_OWLS_PERFORM_PROCESS
A property key that corresponds to the URI of the OWL-S perform process.
|
static ServiceCall |
THIS_SERVICE_CALL
A ServiceCall that is a realization of the OWL-S process:ThisPerform.
|
static String |
TYPE_OWLS_INPUT_BINDING
A type that identifies a resource as an input resource of a call.
|
ONLY_LOCAL_SCOPE, PROP_ORIG_SCOPE, PROP_SCOPES
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, NAMESPACE_PREFIX, ns_delim_index, PROP_INVOLVED_HUMAN_USER, PROP_RDF_FIRST, PROP_RDF_REST, PROP_RDF_TYPE, PROP_RDFS_COMMENT, PROP_RDFS_LABEL, PROP_SERIALIZATION_FULL, PROP_SERIALIZATION_OPTIONAL, PROP_SERIALIZATION_REDUCED, PROP_SERIALIZATION_UNDEFINED, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, SERVICE_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uri, VOCABULARY_NAMESPACE
Constructor and Description |
---|
ServiceCall()
Default constructor of the class.
|
ServiceCall(Resource processURI)
A constructor that besides the resource identification URI
MY_URI , sets the the URI of the OWL-S perform process. |
ServiceCall(String uri) |
Modifier and Type | Method and Description |
---|---|
boolean |
addInput(String inputURI,
Object value)
Adds an input parameter to the call.
|
void |
addNonSemanticInput(Hashtable nonSemanticInput) |
Object |
getInputValue(String inputURI)
Retrieves the actual value of an input parameter.
|
Resource |
getInvolvedUser()
Retrieves the user involved in the call, if there is such.
|
Object |
getNonSemanticInput(String uri) |
String |
getProcessURI()
Retrieves the URI of the OWL-S perform process.
|
int |
getPropSerializationType(String propURI)
Answers if the given property has to be considered when serializing this
individual in a minimized way, and if not ignore-able, whether its value
should be presented in its full form or can be reduced.
|
boolean |
isWellFormed()
Checks whether the URI of the OWL-S perform process is properly set.
|
void |
setInvolvedUser(Resource user)
Sets the human user involved in the call.
|
void |
setProcessURI(String processURI)
Sets the URI of the OWL-S perform process.
|
boolean |
setProperty(String propURI,
Object o)
This method inherits the superclass behavior, but performs some
additional checks for correctness of the property values, specific for
the
ServiceCall . |
addScope, clearScopes, getOriginScope, getScopes, isScoped, isSerializableTo, setOriginScope, setScope
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getOrConstructLabel, getResource, getResourceComment, getResourceLabel, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral
public static final String MY_URI
public static final ServiceCall THIS_SERVICE_CALL
public static final String PROP_OWLS_BINDING_VALUE_DATA
public static final String PROP_OWLS_PERFORM_PROCESS
public static final String PROP_OWLS_PERFORM_HAS_DATA_FROM
List
containing all of the
input resources.public static final String TYPE_OWLS_INPUT_BINDING
public ServiceCall(String uri)
public ServiceCall()
MY_URI
.public ServiceCall(Resource processURI)
MY_URI
, sets the the URI of the OWL-S perform process.processURI
- the URI of the OWL-S perform process.public void addNonSemanticInput(Hashtable nonSemanticInput)
public boolean addInput(String inputURI, Object value)
inputURI
- the URI of the input parameter.value
- the actual value of the input parameter.true
if the parameter was successfully set, or
false
otherwise, for example if null values were
passed as arguments.public Object getInputValue(String inputURI)
inputURI
- the URI of the input parameter.public Resource getInvolvedUser()
public String getProcessURI()
public int getPropSerializationType(String propURI)
Resource
Resource.PROP_SERIALIZATION_OPTIONAL
,
Resource.PROP_SERIALIZATION_REDUCED
, or Resource.PROP_SERIALIZATION_FULL
.
It can be assumed that the given property is one of those returned by
Resource.getPropertyURIs()
. PROP_SERIALIZATION_OPTIONAL
in
favor of lower communication traffic and higher performance even at risk
of a possible additional query on the receiver side for fetching this
info. With the same rationale, if a property should be included in the
process of serialization, it is preferable to include it in a reduced
form; in this case the return value should be
PROP_SERIALIZATION_REDUCED
, otherwise
PROP_SERIALIZATION_FULL
can be returned.
Subclasses should normally overwrite this method as this default
implementation returns always PROP_SERIALIZATION_FULL
.getPropSerializationType
in class Resource
public boolean isWellFormed()
isWellFormed
in class Resource
public void setInvolvedUser(Resource user)
user
- the new involved user.public void setProcessURI(String processURI)
processURI
- the new process URI.public boolean setProperty(String propURI, Object o)
ServiceCall
.setProperty
in class Resource
Resource.setProperty(java.lang.String,
java.lang.Object)
Copyright © 2018 universAAL Consortium. All rights reserved.