org.autoplot.state.StatePersistence
Class for serializing and deserializing application configuration.
currentScheme
currentScheme( ) → org.autoplot.state.AbstractVapScheme
return the current DOM version, describing the scheme of the DOM.
Returns:
an org.autoplot.state.AbstractVapScheme
[search for examples]
[view on GitHub]
[view on old javadoc]
getChildElement
getChildElement( org.w3c.dom.Element parent, String tagName ) → org.w3c.dom.Element
return the first child, if any, with the given tag name.
Parameters
parent - the node of the tree.
tagName - the node to look for.
Returns:
return the child or null if no such child exists.
[search for examples]
[view on GitHub]
[view on old javadoc]
restoreState
restoreState( java.io.File f ) → Object
restore the XML file, possibly promoting it.
Parameters
f - the xml vap file.
Returns:
the dom object.
[search for examples]
[view on GitHub]
[view on old javadoc]
restoreState
restoreState( java.io.InputStream in, java.util.LinkedHashMap deltas ) → org.autoplot.dom.Application
restore the .vap file into an Application (dom) object, applying the deltas if any.
Parameters
in - input stream, which is not closed.
deltas - null or a list of property_name -> property_value pairs to apply to the
DOM after it's loaded.
Returns:
the DOM.
See Also:
restoreState(java.io.InputStream) which just restores the state.
[search for examples]
[view on GitHub]
[view on old javadoc]
restoreState
restoreState( java.io.InputStream in ) → Object
restore the XML on the inputStream, possibly promoting it to a modern version.
Parameters
in - an InputStream
Returns:
the Application object.
See Also:
restoreState(java.io.InputStream, java.util.LinkedHashMap) see restoreState which has macros like "PWD"
[search for examples]
[view on GitHub]
[view on old javadoc]
saveState
saveState( java.io.File f, Object state ) → void
Parameters
f - a File
state - an Object
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
saveState
saveState( java.io.File f, Object state, String sscheme ) → void
Save the Object (DOM application) to a file.
Parameters
f - the file target where the state is saved
state - the Object to be saved, in Autoplot's case it's the DOM.
sscheme - empty string or the name of a scheme to target, such as "1.06"
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
saveState
saveState( java.io.OutputStream out, Object state, String sscheme ) → void
Save the Object (DOM application) to a file.
Parameters
out - the output stream.
state - the Object to be saved, in Autoplot's case it's the DOM.
sscheme - empty string or the name of a scheme to target, such as "1.06"
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
writeDocument
writeDocument( java.io.OutputStream out, org.w3c.dom.Document document ) → void
write the document out to the file, hiding the details of the serializer.
Parameters
out - outputStream
document - XML document object
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
writeDocument
writeDocument( java.io.File f, org.w3c.dom.Document document ) → void
write the document out to the file, hiding the details of the serializer.
Parameters
f - the file
document - the XML document model.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]