com.cedarsoft.serialization.jdom
Class AbstractDelegatingJDomSerializer<T>

java.lang.Object
  extended by com.cedarsoft.serialization.AbstractSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>
      extended by com.cedarsoft.serialization.jdom.AbstractJDomSerializer<T>
          extended by com.cedarsoft.serialization.jdom.AbstractDelegatingJDomSerializer<T>
Type Parameters:
T - the type
All Implemented Interfaces:
ExtendedSerializer<T>, PluggableSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>, Serializer<T,Lookup>

public class AbstractDelegatingJDomSerializer<T>
extends AbstractJDomSerializer<T>


Field Summary
 
Fields inherited from class com.cedarsoft.serialization.jdom.AbstractJDomSerializer
LINE_SEPARATOR
 
Constructor Summary
AbstractDelegatingJDomSerializer(java.lang.String defaultElementName, java.util.Collection<? extends JDomSerializingStrategy<? extends T>> strategies)
           
AbstractDelegatingJDomSerializer(java.lang.String defaultElementName, JDomSerializingStrategy<? extends T>... strategies)
           
 
Method Summary
 T deserialize(org.jdom.Element deserializeFrom, Lookup context)
          Deserializes the object from the given document
 java.util.Collection<? extends JDomSerializingStrategy<T>> getStrategies()
           
 org.jdom.Element serialize(org.jdom.Element serializeTo, T object, Lookup context)
          Serializes the object to the given element
 
Methods inherited from class com.cedarsoft.serialization.jdom.AbstractJDomSerializer
deserialize, serialize, serializeToElement
 
Methods inherited from class com.cedarsoft.serialization.AbstractSerializer
deserialize, getDefaultElementName, serialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDelegatingJDomSerializer

public AbstractDelegatingJDomSerializer(@NotNull
                                        java.lang.String defaultElementName,
                                        @NotNull
                                        JDomSerializingStrategy<? extends T>... strategies)

AbstractDelegatingJDomSerializer

public AbstractDelegatingJDomSerializer(@NotNull
                                        java.lang.String defaultElementName,
                                        @NotNull
                                        java.util.Collection<? extends JDomSerializingStrategy<? extends T>> strategies)
Method Detail

serialize

@NotNull
public org.jdom.Element serialize(@NotNull
                                          org.jdom.Element serializeTo,
                                          @NotNull
                                          T object,
                                          @NotNull
                                          Lookup context)
                           throws java.io.IOException
Description copied from interface: PluggableSerializer
Serializes the object to the given element

Parameters:
serializeTo - the serializeTo
object - the object
context - the context
Returns:
the serializeTo (for fluent writing)
Throws:
java.io.IOException

deserialize

@NotNull
public T deserialize(@NotNull
                             org.jdom.Element deserializeFrom,
                             @NotNull
                             Lookup context)
              throws java.io.IOException
Description copied from interface: PluggableSerializer
Deserializes the object from the given document

Parameters:
deserializeFrom - the deserializeFrom
context - the context
Returns:
the deserialized object
Throws:
java.io.IOException

getStrategies

@NotNull
public java.util.Collection<? extends JDomSerializingStrategy<T>> getStrategies()


Copyright © 2009 cedarsoft GmbH. All Rights Reserved.