org.gvsig.tools.persistence.xml
Class XMLPersistenceManager

java.lang.Object
  extended by org.gvsig.tools.persistence.impl.AbstractPersistenceManager
      extended by org.gvsig.tools.persistence.xml.XMLPersistenceManager
All Implemented Interfaces:
PersistenceManager, PersistenceManagerServices
Direct Known Subclasses:
ZipXMLPersistenceManager

public class XMLPersistenceManager
extends AbstractPersistenceManager

Author:
jmvivo

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.gvsig.tools.persistence.PersistenceManager
PersistenceManager.Factories
 
Field Summary
 
Fields inherited from interface org.gvsig.tools.persistence.PersistenceManager
DEFAULT_DOMAIN_NAME, DEFAULT_DOMAIN_URL, DISABLED, MANDATORY, MANDATORY_IF_DECLARED, PERSISTENCE_DYNOBJECT_NAMESPACE, PERSISTENCE_NAMESPACE
 
Constructor Summary
XMLPersistenceManager()
           
 
Method Summary
 PersistentStateServices createPersistentState(PersistentContextServices context, PersistentIdentifier id)
           
protected  XMLPersistentStateReader getReaderInstance()
           
protected  XMLPersistentStateWriter getWriterInstance()
           
 PersistentState loadState(InputStream in)
           De-serializes an state from the data read from the provided reader.
 void saveState(PersistentState state, OutputStream out)
           Serializes the PersistentState and writes the serialized data in the provided OutputStream.
 String version()
           
 
Methods inherited from class org.gvsig.tools.persistence.impl.AbstractPersistenceManager
addAlias, addDefinition, addDefinition, addDefinition, addDefinition, addDefinition, create, createPersistentState, createState, getAutoValidation, getDefinition, getDefinition, getDomainDefinitions, getDomains, getDynObjectDefinition, getFactories, getNewContext, getObject, getState, getState, getWrappedList, getWrappedMap, getWrappedSet, putObject, registerFactory, setAutoValidation, unregisterClass, unregisterClass, unregisterFactory, validate, validateAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLPersistenceManager

public XMLPersistenceManager()
Method Detail

createPersistentState

public PersistentStateServices createPersistentState(PersistentContextServices context,
                                                     PersistentIdentifier id)

loadState

public PersistentState loadState(InputStream in)
                          throws PersistenceException
Description copied from interface: PersistenceManager

De-serializes an state from the data read from the provided reader. Depending on the implementation the serialized data may have different formats, such as XML or binary data.

Note that a particular implementation will only be able to de-serialize data which has been serialized by the same implementation.

Returns:
Throws:
PersistenceException

saveState

public void saveState(PersistentState state,
                      OutputStream out)
               throws PersistenceException,
                      PersistenceValidateExceptions
Description copied from interface: PersistenceManager

Serializes the PersistentState and writes the serialized data in the provided OutputStream. Depending on the implementation the serialized data may have different formats, such as XML or binary data.

Note that a particular implementation will only be able to de-serialize data which has been serialized by the same implementation.

Throws:
PersistenceValidateExceptions
PersistenceException

getReaderInstance

protected XMLPersistentStateReader getReaderInstance()

getWriterInstance

protected XMLPersistentStateWriter getWriterInstance()

version

public String version()


Copyright © 2004-2011 gvSIG. All Rights Reserved.