at.ac.tuwien.infosys.sm4all.copal.api.xml
Class ElementMarshaller.Builder<T>

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.BaseMarshallerBuilder<T>
      extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ElementMarshaller.Builder<T>
Type Parameters:
T - the type of marshaled value.
All Implemented Interfaces:
MarshallerBuilder<T>
Direct Known Subclasses:
ElementUnmarshaller.Builder
Enclosing class:
ElementMarshaller<T>

public static class ElementMarshaller.Builder<T>
extends BaseMarshallerBuilder<T>

Builder of ElementMarshaller.

Author:
sanjin

Constructor Summary
  ElementMarshaller.Builder()
          Create uninitialized instance of ElementMarshaller.Builder.
protected ElementMarshaller.Builder(ElementMarshaller.Builder<T> builder)
          Clone-constructor.
 
Method Summary
 ElementMarshaller<T> build()
          Create instance of ElementMarshaller.
protected  ElementMarshaller.Builder<T> copy()
          Create instance of BaseMarshallerBuilder by copying this BaseMarshallerBuilder.
 MarshallerBuilder<T> getBuilder()
          Returns the MarshallerBuilder to create a Marshaller for the child Element.
 java.lang.String getChildName()
          Returns the local name of the child Element.
 org.w3c.dom.Element getElement()
          Returns the parent Element.
 RemoveStrategy getStrategy()
          Returns the RemoveStrategy used to remove marshaled value.
 ElementMarshaller.Builder<T> withBuilder(MarshallerBuilder<T> builder)
          Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified MarshallerBuilder to create a Marshaller for the child Element.
 ElementMarshaller.Builder<T> withChildName(java.lang.String childName)
          Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified local name for the child Element.
 ElementMarshaller.Builder<T> withElement(org.w3c.dom.Element element)
          Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values to specified parent Element.
 ElementMarshaller.Builder<T> withStrategy(RemoveStrategy strategy)
          Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified RemoveStrategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementMarshaller.Builder

public ElementMarshaller.Builder()
Create uninitialized instance of ElementMarshaller.Builder.


ElementMarshaller.Builder

protected ElementMarshaller.Builder(ElementMarshaller.Builder<T> builder)
Clone-constructor.

Parameters:
builder - the cloned ElementMarshaller.Builder.
Method Detail

getElement

public org.w3c.dom.Element getElement()
Returns the parent Element.

Overrides:
getElement in class BaseMarshallerBuilder<T>
Returns:
the parent Element.

getChildName

public java.lang.String getChildName()
Returns the local name of the child Element.

Returns:
the local name of the child Element.

getBuilder

public MarshallerBuilder<T> getBuilder()
Returns the MarshallerBuilder to create a Marshaller for the child Element.

Returns:
the MarshallerBuilder to create a Marshaller for the child Element.

getStrategy

public RemoveStrategy getStrategy()
Returns the RemoveStrategy used to remove marshaled value.

Returns:
the RemoveStrategy used to remove marshaled value.

withElement

public ElementMarshaller.Builder<T> withElement(org.w3c.dom.Element element)
Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values to specified parent Element.

Specified by:
withElement in interface MarshallerBuilder<T>
Overrides:
withElement in class BaseMarshallerBuilder<T>
Parameters:
element - the parent Element.
Returns:
an ElementMarshaller.Builder.

withChildName

public ElementMarshaller.Builder<T> withChildName(java.lang.String childName)
Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified local name for the child Element.

Parameters:
childName - the local name of the child Element.
Returns:
an ElementMarshaller.Builder.

withBuilder

public ElementMarshaller.Builder<T> withBuilder(MarshallerBuilder<T> builder)
Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified MarshallerBuilder to create a Marshaller for the child Element.

Parameters:
builder - the MarshallerBuilder to create a Marshaller for the child Element.
Returns:
an ElementMarshaller.Builder.

withStrategy

public ElementMarshaller.Builder<T> withStrategy(RemoveStrategy strategy)
Create instance of ElementMarshaller.Builder that will build ElementMarshallers that will marshal values using specified RemoveStrategy.

Parameters:
strategy - the RemoveStrategy.
Returns:
an ElementMarshaller.Builder.

build

public ElementMarshaller<T> build()
Create instance of ElementMarshaller.

Returns:
a ElementMarshaller.

copy

protected ElementMarshaller.Builder<T> copy()
Description copied from class: BaseMarshallerBuilder
Create instance of BaseMarshallerBuilder by copying this BaseMarshallerBuilder.

Specified by:
copy in class BaseMarshallerBuilder<T>
Returns:
an BaseMarshallerBuilder.


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