org.norvelle.textcite.model.serialize
Class XMLSerializer2

java.lang.Object
  extended by com.thoughtworks.xstream.XStream
      extended by org.norvelle.textcite.model.serialize.XMLSerializer2

public class XMLSerializer2
extends com.thoughtworks.xstream.XStream

XMLSerializer2 A derivative of XStream, specialized for serializing CiteBook objects. This second version utilizes custom converters for serializing and deserializing data model objects, in order to reduce the time needed to save and load large amounts of records.

Author:
Erik Norvelle

Nested Class Summary
 
Nested classes/interfaces inherited from class com.thoughtworks.xstream.XStream
com.thoughtworks.xstream.XStream.InitializationException
 
Field Summary
protected  double fileVersion
           
 
Fields inherited from class com.thoughtworks.xstream.XStream
ID_REFERENCES, NO_REFERENCES, PRIORITY_LOW, PRIORITY_NORMAL, PRIORITY_VERY_HIGH, PRIORITY_VERY_LOW, XPATH_ABSOLUTE_REFERENCES, XPATH_REFERENCES, XPATH_RELATIVE_REFERENCES
 
Constructor Summary
XMLSerializer2(SaveLoadStatusListener l, double fileVersion)
          Build an XML serializer, based on the XStream class.
 
Method Summary
 double getFileVersion()
           
 
Methods inherited from class com.thoughtworks.xstream.XStream
addDefaultImplementation, addImmutableType, addImplicitCollection, addImplicitCollection, addImplicitCollection, alias, alias, aliasAttribute, aliasField, aliasType, createObjectInputStream, createObjectInputStream, createObjectOutputStream, createObjectOutputStream, createObjectOutputStream, createObjectOutputStream, fromXML, fromXML, fromXML, fromXML, fromXML, fromXML, getClassLoader, getClassMapper, getConverterLookup, getMapper, marshal, marshal, newDataHolder, omitField, registerConverter, registerConverter, registerConverter, registerConverter, setClassLoader, setMarshallingStrategy, setMode, setupAliases, setupConverters, setupDefaultImplementations, setupImmutableTypes, toXML, toXML, toXML, unmarshal, unmarshal, unmarshal, useAttributeFor, useAttributeFor, wrapMapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileVersion

protected double fileVersion
Constructor Detail

XMLSerializer2

public XMLSerializer2(SaveLoadStatusListener l,
                      double fileVersion)
Build an XML serializer, based on the XStream class. If this serializer is used for writing, we need to customize it appropriately so that it doesn't serialize unwanted objects (like Swing objects).

Parameters:
fileVersion - TODO
Method Detail

getFileVersion

public double getFileVersion()
Returns:
Returns the version of the file we are handling (only useful during open).