at.ac.tuwien.infosys.sm4all.copal.api.event.xml.type
Class XMLAttributes

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ElementUtil
      extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ArrayMarshaller<T>
          extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ArrayElement<Attribute>
              extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.type.XMLAttributes
All Implemented Interfaces:
Marshaller<Attribute[]>, Unmarshaller<Attribute[]>

public class XMLAttributes
extends ArrayElement<Attribute>

Command that marshalls and unmarshalls Attributes into/from an Element.

Author:
sanjin

Constructor Summary
XMLAttributes(Element element)
          Creates instance of Attributes marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the Attributes.
 
Method Summary
protected  void marshal(Attribute action, Element element)
          Marshal specified object into specified Element.
 Attribute[] unmarshal()
          Returns the unmarshalled Attribute child Elements of specified Element using the XMLAttribute.unmarshal() method.
protected  Attribute unmarshal(Element element)
          Unmarshal singled value from specified Element.
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.xml.ArrayElement
unmarshalList
 
Methods inherited from class at.ac.tuwien.infosys.sm4all.copal.api.xml.ArrayMarshaller
marshal
 
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

XMLAttributes

public XMLAttributes(Element element)
Creates instance of Attributes marshaller and unmarshaller which uses specified Element to marshal and/or unmarshal the Attributes.

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

unmarshal

public Attribute[] unmarshal()
                      throws ContextException
Returns the unmarshalled Attribute child Elements of specified Element using the XMLAttribute.unmarshal() method.

Returns:
the unmarshalled Attribute child Elements.
Throws:
ContextException - if unmarshalling of any Attribute child Element fails.

unmarshal

protected Attribute unmarshal(Element element)
                       throws ContextException
Description copied from class: ArrayElement
Unmarshal singled value from specified Element.

Specified by:
unmarshal in class ArrayElement<Attribute>
Parameters:
element - the Element.
Returns:
single value.
Throws:
ContextException - if unmarshalling fails.

marshal

protected void marshal(Attribute action,
                       Element element)
Description copied from class: ArrayMarshaller
Marshal specified object into specified Element.

Specified by:
marshal in class ArrayMarshaller<Attribute>
Parameters:
action - the object to marshal.
element - the Element into which specified object should be marshalled.


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