at.ac.tuwien.infosys.sm4all.copal.api.processor.xml
Class ProcessorActionUnmarshaller

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.processor.xml.ProcessorActionUnmarshaller
All Implemented Interfaces:
Marshaller<ProcessorAction>, Unmarshaller<ProcessorAction>

public class ProcessorActionUnmarshaller
extends java.lang.Object
implements Unmarshaller<ProcessorAction>

Unmarshals and marshals a ProcessorAction from/into an Element.

Author:
sanjin

Nested Class Summary
static class ProcessorActionUnmarshaller.Builder
          Builder of ProcessorActionUnmarshaller.
 
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 INPUT_ELEMENT
          The local name of child Element that holds marshaled input ContextEventType.
static java.lang.String INPUT_EVENT_NAME_ATTRIBUTE
          The name of attribute that holds marshaled name of input ContextEventType.
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
static java.lang.String OUTPUT_ELEMENT
          The local name of child Element that holds marshaled output ContextEventTypes.
static java.lang.String OUTPUT_EVENT_ELEMENT
          The local name of child Element that holds marshaled output ContextEventType.
static java.lang.String OUTPUT_EVENT_NAME_ATTRIBUTE
          The name of attribute that holds marshaled name of output ContextEventType.
 
Constructor Summary
ProcessorActionUnmarshaller(org.w3c.dom.Element element)
          Creates instance of ProcessorAction 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 ListUnmarshaller.Builder<ProcessorAction> getListBuilder()
          Creates instance of ListUnmarshaller.Builder for ProcessorActions.
 void marshal(ProcessorAction action)
          Marshals specified ProcessorAction into the Element.
 void remove()
          Removes any marshaled ProcessorAction from the Element.
 ProcessorAction unmarshal()
          Unmarshals a ProcessorAction from the Element.
 java.lang.String unmarshalInput()
          Unmarshals name of the input ContextEventType of marshaled ProcessorAction from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of ProcessorAction from the Element.
 java.lang.String[] unmarshalOutput()
          Unmarshals names of the output ContextEventTypes of marshaled ProcessorAction 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

INPUT_ELEMENT

public static final java.lang.String INPUT_ELEMENT
The local name of child Element that holds marshaled input ContextEventType.

See Also:
Constant Field Values

INPUT_EVENT_NAME_ATTRIBUTE

public static final java.lang.String INPUT_EVENT_NAME_ATTRIBUTE
The name of attribute that holds marshaled name of input ContextEventType.

See Also:
Constant Field Values

OUTPUT_ELEMENT

public static final java.lang.String OUTPUT_ELEMENT
The local name of child Element that holds marshaled output ContextEventTypes.

See Also:
Constant Field Values

OUTPUT_EVENT_ELEMENT

public static final java.lang.String OUTPUT_EVENT_ELEMENT
The local name of child Element that holds marshaled output ContextEventType.

See Also:
Constant Field Values

OUTPUT_EVENT_NAME_ATTRIBUTE

public static final java.lang.String OUTPUT_EVENT_NAME_ATTRIBUTE
The name of attribute that holds marshaled name of output ContextEventType.

See Also:
Constant Field Values
Constructor Detail

ProcessorActionUnmarshaller

public ProcessorActionUnmarshaller(org.w3c.dom.Element element)
Creates instance of ProcessorAction 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.

unmarshal

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

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

unmarshalName

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

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

unmarshalInput

public java.lang.String unmarshalInput()
                                throws FailedUnmarshallingException
Unmarshals name of the input ContextEventType of marshaled ProcessorAction from the Element.

Returns:
the name of the input ContextEventType of marshaled ProcessorAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

unmarshalOutput

public java.lang.String[] unmarshalOutput()
                                   throws FailedUnmarshallingException
Unmarshals names of the output ContextEventTypes of marshaled ProcessorAction from the Element.

Returns:
the names of the output ContextEventTypes of marshaled ProcessorAction.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

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

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

remove

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

Specified by:
remove in interface Marshaller<ProcessorAction>

getListBuilder

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

Returns:
the ListUnmarshaller.Builder for ProcessorAction s.


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