|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.middleware.rdf.Resource
org.universAAL.middleware.rdf.FinalizedResource
org.universAAL.middleware.service.ServiceResponse
public class ServiceResponse
A class that represents a service response resource, which is produced by the
ServiceCallee
-s when handling calls, and are delivered to the
ServiceCaller
-s as a result of their requests.
Field Summary | |
---|---|
static String |
MY_URI
A resource URI that specifies the resource as a service response. |
static String |
PROP_SERVICE_CALL_STATUS
A property key for the property where the status of the call is stored. |
static String |
PROP_SERVICE_HAS_OUTPUT
A property key for the property where the service outputs are stored. |
static String |
PROP_SERVICE_SPECIFIC_ERROR
A property key for the property where any errors occurred during the service invocation are stored. |
static String |
PROP_UNBOUND_OUTPUT_ALLOWED
A key of property indicating that not bound output is allowed. |
Fields inherited from class org.universAAL.middleware.rdf.Resource |
---|
ANON_URI_PREFIX, blockAddingTypes, isXMLLiteral, ns_delim_index, 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, PROP_uAAL_INVOLVED_HUMAN_USER, props, RDF_EMPTY_LIST, RDF_NAMESPACE, RDFS_NAMESPACE, TYPE_RDF_LIST, TYPE_RDFS_CLASS, uAAL_NAMESPACE_PREFIX, uAAL_SERVICE_NAMESPACE, uAAL_VOCABULARY_NAMESPACE, uri |
Constructor Summary | |
---|---|
ServiceResponse()
Default constructor for the class. |
|
ServiceResponse(CallStatus status)
Constructor which besides the URI, sets the status of the call. |
|
ServiceResponse(String uri)
Constructor for the class. |
Method Summary | |
---|---|
void |
addOutput(ProcessOutput output)
Adds output payload to this object. |
protected void |
allowUnboundOutput()
|
protected void |
disallowUnboundOutput()
|
CallStatus |
getCallStatus()
Retrieves the call status. |
List |
getOutput(String paramURI,
boolean asMergedList)
Returns all value objects returned for a required output with the given paramURI. |
List |
getOutputs()
Retrieves all of the service outputs as a raw List without
any rearranging. |
boolean |
isUnboundOutputAllowed()
|
boolean |
isWellFormed()
Tests the object for correctness by verifying the presence of PROP_SERVICE_CALL_STATUS property. |
boolean |
setProperty(String propURI,
Object value)
This method inherits the superclass behavior, but performs some additional checks for correctness of the property values, specific for the ServiceResponse . |
Methods inherited from class org.universAAL.middleware.rdf.FinalizedResource |
---|
addType, getLocalName, getNamespace, getProperty, getPropertyURIs, getType, getTypes, getURI, hasQualifiedName, isAnon, numberOfProperties |
Methods inherited from class org.universAAL.middleware.rdf.Resource |
---|
addMultiLangProp, asList, asList, asRDFList, changeProperty, copy, deepCopy, equals, generateAnonURI, getDefaultLang, getFilename, getMultiLangProp, getOrConstructLabel, getPropSerializationType, getResource, getResourceComment, getResourceLabel, getStaticFieldValue, hashCode, hasProperty, isAnon, isBlockingAddingTypes, isClosedCollection, isQualifiedName, literal, representsQualifiedURI, serializesAsXMLLiteral, setPropertyPath, setPropertyPath, setPropertyPathFromOffset, setResourceComment, setResourceLabel, toString, toStringRecursive, toStringRecursive, unliteral |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String MY_URI
public static final String PROP_SERVICE_CALL_STATUS
public static final String PROP_SERVICE_HAS_OUTPUT
public static final String PROP_SERVICE_SPECIFIC_ERROR
public static final String PROP_UNBOUND_OUTPUT_ALLOWED
Constructor Detail |
---|
public ServiceResponse()
Resource
to MY_URI
.
public ServiceResponse(String uri)
public ServiceResponse(CallStatus status)
status
- the current status of the call.Method Detail |
---|
protected void allowUnboundOutput()
protected void disallowUnboundOutput()
public boolean isUnboundOutputAllowed()
public void addOutput(ProcessOutput output)
output
- the ouput that needs to be added.public CallStatus getCallStatus()
public List getOutput(String paramURI, boolean asMergedList)
paramURI
- the URI of the required output.asMergedList
- specifies if the outputs of the separate services are merged.
public List getOutputs()
List
without
any rearranging.
public boolean isWellFormed()
PROP_SERVICE_CALL_STATUS
property.
isWellFormed
in class Resource
Resource.isWellFormed()
public boolean setProperty(String propURI, Object value)
ServiceResponse
.
setProperty
in class Resource
Resource.setProperty(java.lang.String,
java.lang.Object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |