org.universAAL.support.utils.service
Class Output

Package class diagram package Output
java.lang.Object
  extended by org.universAAL.support.utils.service.Value
      extended by org.universAAL.support.utils.service.Output

public class Output
extends Value

Class representing an Output-type argument in a service request. Arguments are the "leaf" objects at the end of a property path and can be of several types depending on what you want to do with them. An Output-type argument means that you want to get in return the value represented by this argument from the service you intend to call.

Author:
alfiva

Field Summary
 
Fields inherited from class org.universAAL.support.utils.service.Value
isByURI, uri
 
Constructor Summary
Output(Object byValue)
          Deprecated. 
Output(String byTypeURIorPLACEHOLDER)
          Recommended for use by SimpleRequests and SimpleProfiles.SimpleValue used to define the URI (the ID) of an output.
 
Method Summary
 String getURI()
          This is only supposed to be used internally.
 
Methods inherited from class org.universAAL.support.utils.service.Value
byURI, createEmptyInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Output

public Output(String byTypeURIorPLACEHOLDER)
Recommended for use by SimpleRequests and SimpleProfiles.SimpleValue used to define the URI (the ID) of an output. It can be used for two purposes.

If you use it from a Request, you must put a newly created placeholder URI where outputs will be placed in ServiceResponses.

If you use it from a Profile, you must put the type URI of the kind of Output the profile will be handling, like ManagedIndividual.MY_URI. Use only this constructor

Parameters:
byTypeURIorPLACEHOLDER - In Request: An URI used by ServiceResponse to place matching outputs. In Profile: The URI of the type that is handled by the Profile

Output

@Deprecated
public Output(Object byValue)
Deprecated. 

For use only by SimpleRequests. Value used to define the URI (the ID) of an output.

DEPRECATED: The use of this constructor is discouraged as it behaves differently to other constructors of SimpleValues that take instance values. This one uses the passed value to extract its type, not to specify it as explicit output.

This is a helper constructor that takes an instance of the type you want and extracts its type. The value of the instance is irrelevant, it's just intended for situations in which you already have an instance which type you want to output.

Parameters:
byValue - An instance of a ManagedIndividual or native type representing the value to output in this argument, but only its type is relevant.
Method Detail

getURI

public String getURI()
This is only supposed to be used internally.

Returns:
The type URI/placeholder to output


Copyright © 2014 universAAL Consortium. All Rights Reserved.