org.encog.persist
Class PersistWriter

java.lang.Object
  extended by org.encog.persist.PersistWriter

public class PersistWriter
extends Object

Utility class for writing Encog persisted class files.

Author:
jheaton

Constructor Summary
PersistWriter(PersistenceLocation location)
          Create a writer for the specified location.
 
Method Summary
 void begin()
          Begin an Encog document.
 void beginObjects()
          Begin the objects collection.
 void close()
          Close the writer.
 void end()
          End the document.
 void endObjects()
          End the objects collection.
 void mergeObjects(PersistenceLocation location, String skip)
          Merge the objects from this collection into the new one.
 void modifyObject(PersistenceLocation location, String name, String newName, String newDesc)
          Modify the specified object, such as changing its name or description.
 void writeHeader()
          Write the header for the Encog file.
 void writeObject(EncogPersistedObject obj)
          Write an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistWriter

public PersistWriter(PersistenceLocation location)
Create a writer for the specified location.

Parameters:
location - The location.
Method Detail

begin

public void begin()
Begin an Encog document.


beginObjects

public void beginObjects()
Begin the objects collection.


close

public void close()
Close the writer.


end

public void end()
End the document.


endObjects

public void endObjects()
End the objects collection.


mergeObjects

public void mergeObjects(PersistenceLocation location,
                         String skip)
Merge the objects from this collection into the new one. Skip the specified object.

Parameters:
location - The location to merge to.
skip - The object to skip.

modifyObject

public void modifyObject(PersistenceLocation location,
                         String name,
                         String newName,
                         String newDesc)
Modify the specified object, such as changing its name or description.

Parameters:
location - The location of the object being modified.
name - The old name of the object being modified.
newName - The new name of the object being modified.
newDesc - The new description of the object being modified.

writeHeader

public void writeHeader()
Write the header for the Encog file.


writeObject

public void writeObject(EncogPersistedObject obj)
Write an object.

Parameters:
obj - The object to write.


Copyright © 2011. All Rights Reserved.