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

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.processor.xml.ContextProcessorMarshaller
All Implemented Interfaces:
Marshaller<ContextProcessor>

public class ContextProcessorMarshaller
extends java.lang.Object
implements Marshaller<ContextProcessor>

Marshals a ContextProcessor into an Element.

Author:
sanjin

Nested Class Summary
static class ContextProcessorMarshaller.Builder
          Builder of ContextProcessorMarshaller.
 
Field Summary
static java.lang.String ACTIONS_ELEMENT
          The local name of child Element that holds marshaled ProcessorActions.
static java.lang.String NAME_ATTRIBUTE
          The name of attribute that holds marshaled name.
static java.lang.String PROCESSOR_ELEMENT
          The local name of child Elements used in the ListMarshaller.Builder that is returned by the getListBuilder().
 
Constructor Summary
ContextProcessorMarshaller(org.w3c.dom.Element element)
          Creates instance of ContextProcessor Marshaller which uses specified Element for marshalling.
 
Method Summary
 org.w3c.dom.Element getElement()
          Returns the Element used for marshalling.
static ListMarshaller.Builder<ContextProcessor> getListBuilder()
          Creates instance of ListMarshaller.Builder for ContextProcessors.
 void marshal(ContextProcessor processor)
          Marshals specified ContextProcessor into the Element.
 void remove()
          Removes any marshaled ContextProcessor from the Element.
 ProcessorAction[] unmarshalActions()
          Unmarshals ProcessorActions of ContextProcessor from the Element.
 java.lang.String unmarshalName()
          Unmarshals name of ContextProcessor from the Element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESSOR_ELEMENT

public static final java.lang.String PROCESSOR_ELEMENT
The local name of child Elements used in the ListMarshaller.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

ACTIONS_ELEMENT

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

See Also:
Constant Field Values
Constructor Detail

ContextProcessorMarshaller

public ContextProcessorMarshaller(org.w3c.dom.Element element)
Creates instance of ContextProcessor Marshaller which uses specified Element for marshalling.

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

getElement

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

Returns:
the Element used for marshalling.

unmarshalName

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

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

unmarshalActions

public ProcessorAction[] unmarshalActions()
                                   throws FailedUnmarshallingException
Unmarshals ProcessorActions of ContextProcessor from the Element.

Returns:
the ProcessorActions of marshaled ContextProcessor.
Throws:
FailedUnmarshallingException - if unmarshalling was unsuccessful.

marshal

public void marshal(ContextProcessor processor)
Marshals specified ContextProcessor into the Element.

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

remove

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

Specified by:
remove in interface Marshaller<ContextProcessor>

getListBuilder

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

Returns:
the ListMarshaller.Builder for ContextProcessors.


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