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

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.query.xml.ProcessedEventQueryUnmarshaller
All Implemented Interfaces:
Marshaller<ProcessedEventQuery>, Unmarshaller<ProcessedEventQuery>

public class ProcessedEventQueryUnmarshaller
extends java.lang.Object
implements Unmarshaller<ProcessedEventQuery>

Unmarshals and marshals a ProcessedEventQuery from/into an Element.

Author:
sanjin

Nested Class Summary
static class ProcessedEventQueryUnmarshaller.Builder
          Builder of ProcessedEventQueryUnmarshaller.
 
Field Summary
static java.lang.String CRITERIA_ATTRIBUTE
          The name of attribute that holds marshaled criteria.
static java.lang.String LISTENED_TYPE_ATTRIBUTE
          The name of attribute that holds marshaled listened ContextEventType.
static java.lang.String LISTENERS_ELEMENT
          The local name of child Element that holds marshaled ContextListeners.
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
static java.lang.String QUERY_ELEMENT
          The local name of child Elements used in the ListMarshaller.Builder that is returned by the getListBuilder(ContextQueryFactory).
 
Constructor Summary
ProcessedEventQueryUnmarshaller(ContextQueryFactory factory, org.w3c.dom.Element element)
          Creates instance of ProcessedEventQuery Unmarshaller which uses specified Element for unmarshalling and/or marshalling and specified ContextQueryFactory to creating unmarshaled ProcessedEventQuerys.
 
Method Summary
 org.w3c.dom.Element getElement()
          Returns the Element used for marshalling.
 ContextQueryFactory getFactory()
          Returns the ContextQueryFactory used for creating the unmarshaled ProcessedEventQuerys.
static ListUnmarshaller.Builder<ProcessedEventQuery> getListBuilder(ContextQueryFactory factory)
          Creates instance of ListUnmarshaller.Builder for ProcessedEventQuerys that will be created with specified ContextQueryFactory.
 void marshal(ProcessedEventQuery query)
          Marshals specified ProcessedEventQuery into the Element.
 void remove()
          Removes any marshaled ProcessedEventQuery from the Element.
 ProcessedEventQuery unmarshal()
          Unmarshals a ProcessedEventQuery from the Element.
 java.lang.String unmarshalCriteria()
          Unmarshals criteria of ProcessedEventQuery from the Element.
 java.lang.String unmarshalListenedType()
          Unmarshals name of listened ContextEventType of ProcessedEventQuery from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of ProcessedEventQuery from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_ELEMENT

public static final java.lang.String QUERY_ELEMENT
The local name of child Elements used in the ListMarshaller.Builder that is returned by the getListBuilder(ContextQueryFactory).

See Also:
Constant Field Values

NAME_ATTRIBUTE

public static final java.lang.String NAME_ATTRIBUTE
The name of attribute that holds marshaled name.

See Also:
Constant Field Values

LISTENED_TYPE_ATTRIBUTE

public static final java.lang.String LISTENED_TYPE_ATTRIBUTE
The name of attribute that holds marshaled listened ContextEventType.

See Also:
Constant Field Values

CRITERIA_ATTRIBUTE

public static final java.lang.String CRITERIA_ATTRIBUTE
The name of attribute that holds marshaled criteria.

See Also:
Constant Field Values

LISTENERS_ELEMENT

public static final java.lang.String LISTENERS_ELEMENT
The local name of child Element that holds marshaled ContextListeners.

See Also:
Constant Field Values
Constructor Detail

ProcessedEventQueryUnmarshaller

public ProcessedEventQueryUnmarshaller(ContextQueryFactory factory,
                                       org.w3c.dom.Element element)
Creates instance of ProcessedEventQuery Unmarshaller which uses specified Element for unmarshalling and/or marshalling and specified ContextQueryFactory to creating unmarshaled ProcessedEventQuerys.

Parameters:
factory - the ContextQueryFactory used for creating the unmarshaled ProcessedEventQuerys.
element - the Element used for unmarshalling.
Throws:
java.lang.NullPointerException - if specified Element or ContextQueryFactory is null.
Method Detail

getFactory

public ContextQueryFactory getFactory()
Returns the ContextQueryFactory used for creating the unmarshaled ProcessedEventQuerys.

Returns:
the ContextQueryFactory used for creating the unmarshaled ProcessedEventQuerys.

getElement

public org.w3c.dom.Element getElement()
Returns the Element used for marshalling.

Returns:
the Element used for marshalling.

unmarshal

public ProcessedEventQuery unmarshal()
                              throws FailedUnmarshallingException
Unmarshals a ProcessedEventQuery from the Element.

Specified by:
unmarshal in interface Unmarshaller<ProcessedEventQuery>
Returns:
the unmarshaled ProcessedEventQuery.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalName

public java.lang.String unmarshalName()
                               throws FailedUnmarshallingException
Unmarshals name of ProcessedEventQuery from the Element.

Returns:
the name of marshaled ProcessedEventQuery.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalListenedType

public java.lang.String unmarshalListenedType()
                                       throws FailedUnmarshallingException
Unmarshals name of listened ContextEventType of ProcessedEventQuery from the Element.

Returns:
the name of listened ContextEventType of marshaled ProcessedEventQuery.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalCriteria

public java.lang.String unmarshalCriteria()
                                   throws FailedUnmarshallingException
Unmarshals criteria of ProcessedEventQuery from the Element.

Returns:
the criteria of marshaled ProcessedEventQuery.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

public void marshal(ProcessedEventQuery query)
Marshals specified ProcessedEventQuery into the Element.

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

remove

public void remove()
Removes any marshaled ProcessedEventQuery from the Element.

Specified by:
remove in interface Marshaller<ProcessedEventQuery>

getListBuilder

public static ListUnmarshaller.Builder<ProcessedEventQuery> getListBuilder(ContextQueryFactory factory)
Creates instance of ListUnmarshaller.Builder for ProcessedEventQuerys that will be created with specified ContextQueryFactory. The returned ListUnmarshaller.Builder does not have the parent Element set and caller should set it before building the ListUnmarshaller for ProcessedEventQuerys. The name for child Elements is set to ContextQueryMarshaller.QUERY_ELEMENT.

Parameters:
factory - the ContextQueryFactory used to create ProcessedEventQuerys.
Returns:
the ListUnmarshaller.Builder for ProcessedEventQuerys.


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