org.mmbase.util.xml
Class DocumentSerializable

java.lang.Object
  extended by org.mmbase.util.xml.DocumentSerializable
All Implemented Interfaces:
Serializable, Cloneable, PublicCloneable

public class DocumentSerializable
extends Object
implements Serializable, PublicCloneable

Wraps an Document to be certainly serializable (and cloneable). If it is not by itself (IIRC the Xerces implementation is serializable), then this class serializes to a stringification. This can be used if a Serializable class needs an Document member. Choose for a DocumentSerializable member in stead, and use getDocument().

Since:
MMBase-1.8
Version:
$Id: DocumentSerializable.java 41055 2010-02-15 23:59:16Z michiel $
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Constructor Summary
DocumentSerializable(Document d)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object o)
           
 Document getDocument()
           
 int hashCode()
           
 String toString()
           
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DocumentSerializable

public DocumentSerializable(Document d)
Method Detail

unwrap

public <T> T unwrap(Class<T> iface)

getDocument

public final Document getDocument()

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

clone

public Object clone()
Specified by:
clone in interface PublicCloneable
Overrides:
clone in class Object


MMBase 2.0-SNAPSHOT - null