at.ac.tuwien.infosys.sm4all.copal.api.query.xml
Class XMLContextQuery

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ElementUtil
      extended by at.ac.tuwien.infosys.sm4all.copal.api.query.xml.XMLContextQuery
All Implemented Interfaces:
Marshaller<ContextQuery>
Direct Known Subclasses:
XMLProcessedEventQuery

public class XMLContextQuery
extends ElementUtil
implements Marshaller<ContextQuery>

Command that marshalls a ContextQuery into an Element.

Author:
sanjin

Constructor Summary
XMLContextQuery(Element element)
          Creates instance of ContextQuery marshaller which uses specified Element to marshal the ContextQuery.
 
Method Summary
 void marshal(ContextQuery query)
          Sets the name attribute of specified Element to name of specified ContextQuery, the event attribute to listened type of specified ContextQuery, possibly criteria attribute to criteria of specified ContextQuery if there is one.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.xml.ElementUtil
getChildElement, getChildElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLContextQuery

public XMLContextQuery(Element element)
Creates instance of ContextQuery marshaller which uses specified Element to marshal the ContextQuery.

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

marshal

public void marshal(ContextQuery query)
Sets the name attribute of specified Element to name of specified ContextQuery, the event attribute to listened type of specified ContextQuery, possibly criteria attribute to criteria of specified ContextQuery if there is one. If specified ContextQuery does not have any listeners the Listeners child Element is removed from specified Element; otherwise listeners are marshalled into the Listeners child Element.

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.