com.cedarsoft.serialization.jdom
Class AbstractJDomSerializingStrategy<T>
java.lang.Object
com.cedarsoft.serialization.AbstractSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>
com.cedarsoft.serialization.jdom.AbstractJDomSerializer<T>
com.cedarsoft.serialization.jdom.AbstractJDomSerializingStrategy<T>
- Type Parameters:
T - the type
- All Implemented Interfaces:
- ExtendedSerializer<T>, JDomSerializingStrategy<T>, PluggableSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>, Serializer<T,Lookup>, SerializingStrategy<T,org.jdom.Element,org.jdom.Element>
public abstract class AbstractJDomSerializingStrategy<T>
- extends AbstractJDomSerializer<T>
- implements JDomSerializingStrategy<T>
|
Method Summary |
T |
deserialize(org.jdom.Element deserializeFrom,
Lookup context)
Deserializes the object from the given document |
java.lang.String |
getId()
Returns the id |
org.jdom.Element |
serialize(org.jdom.Element serializeTo,
T object,
Lookup context)
Serializes the object to the given element |
boolean |
supports(java.lang.Object object)
Whether the given reference type is supported |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractJDomSerializingStrategy
protected AbstractJDomSerializingStrategy(@NotNull
java.lang.String id,
@NotNull
java.lang.Class<? extends T> supportedType,
@NotNull
VersionRange formatVersionRange)
getId
@NotNull
public java.lang.String getId()
- Description copied from interface:
SerializingStrategy
- Returns the id
- Specified by:
getId in interface SerializingStrategy<T,org.jdom.Element,org.jdom.Element>
- Returns:
- the id
supports
public boolean supports(@NotNull
java.lang.Object object)
- Description copied from interface:
SerializingStrategy
- Whether the given reference type is supported
- Specified by:
supports in interface SerializingStrategy<T,org.jdom.Element,org.jdom.Element>
- Parameters:
object - the reference
- Returns:
- true if this strategy supports the reference, false otherwise
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
- Specified by:
serialize in interface PluggableSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>
- Parameters:
serializeTo - the serializeToobject - the objectcontext - 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
- Specified by:
deserialize in interface PluggableSerializer<T,org.jdom.Element,org.jdom.Element,java.io.IOException>
- Parameters:
deserializeFrom - the deserializeFromcontext - the context
- Returns:
- the deserialized object
- Throws:
java.io.IOException
Copyright © 2009 cedarsoft GmbH. All Rights Reserved.