public final class HashStructureIO extends XMLObjectStore
oracle.ide.marshal.ObjectStore
for
marshalling a HashStructure
instance to XML.CLASS_ATTR, NSELEM_ATTR
Constructor and Description |
---|
HashStructureIO(java.lang.String nsURI,
java.lang.String rootQname)
Creates a new instance of HashStructureIO that, when saving, will
write out a root element with the specified namespace URI and
qualified name.
|
Modifier and Type | Method and Description |
---|---|
void |
addXpathToFlatten(java.lang.String xpath)
INTERNAL.
|
boolean |
isLastLoadUsedFallback()
INTERNAL.
|
java.lang.Object |
load(java.net.URL url)
Creates a new instance of an object based on its peristent state
saved at the specified
URL . |
java.lang.Object |
load(java.net.URL url,
java.lang.String[] partials)
Creates a new instance of an object based on its peristent state
saved at the specified
URL . |
boolean |
open(java.net.URL url,
java.lang.Object obj)
Initializes the specified object based on its persistent state
that is saved at the specified
URL . |
HashStructure |
read(java.io.Reader reader,
java.net.URL baseUrl)
Reads a hash structure from the specified
Reader . |
boolean |
save(java.net.URL url,
java.lang.Object obj)
Marshals the persistent properties of the specified object and
saves the persistent form at the specified
URL . |
HashStructure |
toHashStructure(org.w3c.dom.Element elem) |
void |
write(HashStructure hs,
java.io.Writer writer,
java.net.URL baseUrl)
Writes out a persistent hash structure to the specified
Writer . |
registerTransform
public HashStructureIO(java.lang.String nsURI, java.lang.String rootQname)
nsURI
- namespace URI of the root elementrootQname
- qualified name of the root elementpublic java.lang.Object load(java.net.URL url) throws java.io.IOException
ObjectStore
URL
.java.io.IOException
public java.lang.Object load(java.net.URL url, java.lang.String[] partials) throws java.io.IOException
URL
.Limits the number of top level children to be read if partials is not empty, by matching the 'n' attribute of each child with the supplied array.
java.io.IOException
public boolean open(java.net.URL url, java.lang.Object obj) throws java.io.IOException
ObjectStore
URL
. This has the effect
of reloading or reverting an object's in-memory state.java.io.IOException
public boolean save(java.net.URL url, java.lang.Object obj) throws java.io.IOException
ObjectStore
URL
.java.io.IOException
public HashStructure read(java.io.Reader reader, java.net.URL baseUrl) throws java.io.IOException
Reader
.reader
- the reader to read from. Must not be null.baseUrl
- the base url for resolving relative paths. May be
null, which will cause all urls to be interpreted as absolute
paths.HashStructure
assembled from data read from the
reader.java.io.IOException
- if an error occurs while reading.java.lang.NullPointerException
- if reader is null.public void write(HashStructure hs, java.io.Writer writer, java.net.URL baseUrl) throws java.io.IOException
Writer
.hs
- a hash structure to write. Must not be null.writer
- the writer to write to. Must not be null.baseUrl
- the base url for resolving relative paths. May be null,
which will cause all urls to be stored as absolute paths.java.io.IOException
- if an error occurs while writing.java.lang.NullPointerException
- if either hs or writer
are null.public HashStructure toHashStructure(org.w3c.dom.Element elem)
public void addXpathToFlatten(java.lang.String xpath)
public boolean isLastLoadUsedFallback()