at.ac.tuwien.infosys.sm4all.copal.api.event.xml.query
Class Criteria

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.OptionalAttributeUnmarshaller<String>
      extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.query.Criteria
All Implemented Interfaces:
Marshaller<ContextQuery>, Unmarshaller<String>

public class Criteria
extends OptionalAttributeUnmarshaller<String>
implements Marshaller<ContextQuery>

Command that marshalls and unmarshalls criteria of a ContextQuery into/from an Element.

Author:
sanjin

Constructor Summary
Criteria(Element element)
          Creates instance of ContextQuery criteria marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the criteria.
 
Method Summary
 void marshal(ContextQuery query)
          Sets the criteria attribute of specified Element to criteria of specified ContextQuery or removes the criteria attribute if specified ContextQuery does not have a criteria.
protected  String valueOf(String value)
          Converts specified String value of the optional attribute to desired class.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.event.xml.OptionalAttributeUnmarshaller
unmarshal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Criteria

public Criteria(Element element)
Creates instance of ContextQuery criteria marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the criteria.

Parameters:
element - the Element used for marshalling and unmarshalling.
Throws:
NullPointerException - if specified Element is null.
Method Detail

valueOf

protected String valueOf(String value)
Description copied from class: OptionalAttributeUnmarshaller
Converts specified String value of the optional attribute to desired class.

Specified by:
valueOf in class OptionalAttributeUnmarshaller<String>
Parameters:
value - the String value of the optional attribute.
Returns:
the optional attribute as instance of the desired class.

marshal

public void marshal(ContextQuery query)
Sets the criteria attribute of specified Element to criteria of specified ContextQuery or removes the criteria attribute if specified ContextQuery does not have a criteria.

Specified by:
marshal in interface Marshaller<ContextQuery>
Parameters:
query - the ContextQuery.
Throws:
NullPointerException - if specified ContextQuery is null.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.