Class ElementUnmarshaller<T>

  extended by
      extended by<T>
          extended by<T>
Type Parameters:
T - the type of unmarshaled and marshaled value.
All Implemented Interfaces:
Marshaller<T>, Unmarshaller<T>

public class ElementUnmarshaller<T>
extends ElementMarshaller<T>
implements Unmarshaller<T>

Unmarshals and marshals a child Element of a parent Element .


Nested Class Summary
static class ElementUnmarshaller.Builder<T>
          Builder of ElementUnmarshaller.
Constructor Summary
ElementUnmarshaller(org.w3c.dom.Element parent, java.lang.String childName, UnmarshallerBuilder<T> builder, RemoveStrategy strategy)
          Creates instance of child Element Marshaller of specified parent Element.
Method Summary
 T unmarshal()
          Unmarshals a child Element using an Unmarshaller created with the UnmarshallerBuilder.
Methods inherited from class
getBuilder, getChildElement, getChildName, getParent, getStrategy, marshal, remove
Methods inherited from class
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface
marshal, remove

Constructor Detail


public ElementUnmarshaller(org.w3c.dom.Element parent,
                           java.lang.String childName,
                           UnmarshallerBuilder<T> builder,
                           RemoveStrategy strategy)
Creates instance of child Element Marshaller of specified parent Element. Child Element will have specified local name and will be in Constants.COPAL_NAMESPACE. Specified UnmarshallerBuilder is used to create an Unmarshaller that will unmarshal and/or marshal a value into the child Element and specified RemoveStrategy is used to remove marshaled value.

parent - the parent Element.
childName - the local name of the child Element.
builder - the UnmarshallerBuilder to create a Unmarshaller for the child Element.
strategy - the RemoveStrategy.
java.lang.NullPointerException - if specified parent Element, name of child Element, UnmarshallerBuilder or RemoveStrategy is null.
java.lang.IllegalArgumentException - if specified name of child Element is an empty or blank string.
Method Detail


public T unmarshal()
            throws FailedUnmarshallingException
Unmarshals a child Element using an Unmarshaller created with the UnmarshallerBuilder.

Specified by:
unmarshal in interface Unmarshaller<T>
the List of unmarshaled child Elements.
FailedUnmarshallingException - if unmarshalling was unsuccessful.

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