|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.universAAL.support.utils.service.Arg
public class Arg
Helper class to build arguments 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. This class adds an additional help level to using Request and Profile. Following the example in Profile, thanks to Arg it could be:
Example: Calling a Lighting service that controls LightSources of type ElectricLight, find the light with URI "desiredURI" and turn it off (set to brightness 0)
Request req=new Request(new Lighting(null));
req.put(Path.at(Lighting.PROP_CONTROLS).to(LightSource.PROP_HAS_TYPE), Arg.type(ElectricLight.MY_URI));
req.put(Path.at(Lighting.PROP_CONTROLS), Arg.in(new LightSource(desiredURI)));
req.put(Path.at(Lighting.PROP_CONTROLS).to(LightSource.PROP_SOURCE_BRIGHTNESS), Arg.change(new Integer(0)));
caller.call(req);
Method Summary | |
---|---|
static Add |
add(Object byValue)
Equivalent to new Add(byValue);. |
static Add |
add(String byTypeURI)
Equivalent to new Add(byTypeURI);. |
static Change |
change(Object byValue)
Equivalent to new Change(inputNewValue);. |
static Change |
change(String byTypeURI)
Equivalent to new Change(byTypeURI);. |
static Variable |
in(Object byValue)
Equivalent to new Variable(byValue);. |
static Variable |
in(String byTypeURI)
Equivalent to new Variable(byTypeURI);. |
static Output |
out(Object byValue)
Equivalent to new Output(byValue);. |
static Output |
out(String byTypeURIorPLACEHOLDER)
Equivalent to new Output(byTypeURIorPLACEHOLDER);. |
static Remove |
remove(Object byValue)
Equivalent to new Remove(byValue);. |
static Remove |
remove(String byTypeURI)
Equivalent to new Remove(byTypeURI);. |
static Typematch |
type(Object byValue)
Equivalent to new Typematch(byValue);. |
static Typematch |
type(String byTypeURI)
Equivalent to new Typematch(byTypeURI);. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Add add(Object byValue)
byValue
- Value to represent.
public static Add add(String byTypeURI)
byTypeURI
- Type to represent.
public static Change change(Object byValue)
byValue
- Value to represent.
public static Change change(String byTypeURI)
byTypeURI
- Type to represent.
public static Output out(String byTypeURIorPLACEHOLDER)
byTypeURIorPLACEHOLDER
- Type to represent, or placeholder URI.
public static Output out(Object byValue)
byValue
- Value to represent.
public static Remove remove(Object byValue)
byValue
- Value to represent.
public static Remove remove(String byTypeURI)
byTypeURI
- Type to represent.
public static Typematch type(String byTypeURI)
byTypeURI
- Type to represent.
public static Typematch type(Object byValue)
byValue
- Value to represent.
public static Variable in(Object byValue)
byValue
- Value to represent.
public static Variable in(String byTypeURI)
byTypeURI
- Type to represent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |