at.ac.tuwien.infosys.sm4all.copal.api.event.xml
Class ContextEventActionMarshaller

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.ContextEventActionMarshaller
All Implemented Interfaces:
Marshaller<ContextEventAction>

public class ContextEventActionMarshaller
extends java.lang.Object
implements Marshaller<ContextEventAction>

Unmarshals and marshals a ContextEventAction from/into an Element.

Author:
sanjin

Nested Class Summary
static class ContextEventActionMarshaller.Builder
          Builder of ContextEventActionMarshaller.
 
Field Summary
static java.lang.String ACTION_ELEMENT
          The local name of child Elements used in the ListUnmarshaller.Builder that is returned by the getListBuilder().
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
 
Constructor Summary
ContextEventActionMarshaller(org.w3c.dom.Element element)
          Creates instance of ContextEventAction Unmarshaller which uses specified Element for unmarshalling and/or marshalling.
 
Method Summary
 org.w3c.dom.Element getElement()
          Returns the Element used for unmarshalling and marshalling.
static ListMarshaller.Builder<ContextEventAction> getListBuilder()
          Creates instance of ListMarshaller.Builder for ContextEventActions.
 void marshal(ContextEventAction action)
          Marshals specified ContextEventAction into the Element.
 void remove()
          Removes any marshaled ContextEventAction from the Element .
 java.lang.String unmarshalName()
          Unmarshals name of ContextEventAction from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_ELEMENT

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

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
Constructor Detail

ContextEventActionMarshaller

public ContextEventActionMarshaller(org.w3c.dom.Element element)
Creates instance of ContextEventAction Unmarshaller which uses specified Element for unmarshalling and/or marshalling.

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

getElement

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

Returns:
the Element used for unmarshalling and marshalling.

unmarshalName

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

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

marshal

public void marshal(ContextEventAction action)
Marshals specified ContextEventAction into the Element.

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

remove

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

Specified by:
remove in interface Marshaller<ContextEventAction>

getListBuilder

public static ListMarshaller.Builder<ContextEventAction> getListBuilder()
Creates instance of ListMarshaller.Builder for ContextEventActions. The returned ListMarshaller.Builder does not have the parent Element set and caller should set it before building the ListMarshaller.Builder for ContextEventActions. The name for child Elements is set to ACTION_ELEMENT.

Returns:
the ListMarshaller.Builder for ContextEventAction s.


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