Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

oracle.ide.marshal.xml
Class HashStructureIO

java.lang.Object
  extended by oracle.ide.marshal.xml.XMLObjectStore
      extended by oracle.ide.marshal.xml.HashStructureIO
All Implemented Interfaces:
ObjectStore

public final class HashStructureIO
extends XMLObjectStore

Implementation of oracle.ide.marshal.ObjectStore for marshalling a HashStructure instance to XML.


Field Summary
 
Fields inherited from class oracle.ide.marshal.xml.XMLObjectStore
CLASS_ATTR, NSELEM_ATTR
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class oracle.ide.marshal.xml.XMLObjectStore
registerTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashStructureIO

public 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. When loading or opening an XML file, the nsURI and rootQname parameters have no effect; HashStructureIO will load the XML regardless of what the root element is.

Parameters:
nsURI - namespace URI of the root element
rootQname - qualified name of the root element
Method Detail

load

public java.lang.Object load(java.net.URL url)
                      throws java.io.IOException
Description copied from interface: ObjectStore
Creates a new instance of an object based on its peristent state saved at the specified URL.

Throws:
java.io.IOException

load

public java.lang.Object load(java.net.URL url,
                             java.lang.String[] partials)
                      throws java.io.IOException
Creates a new instance of an object based on its peristent state saved at the specified 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.

Throws:
java.io.IOException

open

public boolean open(java.net.URL url,
                    java.lang.Object obj)
             throws java.io.IOException
Description copied from interface: ObjectStore
Initializes the specified object based on its persistent state that is saved at the specified URL. This has the effect of reloading or reverting an object's in-memory state.

Throws:
java.io.IOException

save

public boolean save(java.net.URL url,
                    java.lang.Object obj)
             throws java.io.IOException
Description copied from interface: ObjectStore
Marshals the persistent properties of the specified object and saves the persistent form at the specified URL.

Throws:
java.io.IOException

read

public HashStructure read(java.io.Reader reader,
                          java.net.URL baseUrl)
                   throws java.io.IOException
Reads a hash structure from the specified Reader.

Parameters:
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.
Returns:
a new HashStructure assembled from data read from the reader.
Throws:
java.io.IOException - if an error occurs while reading.
java.lang.NullPointerException - if reader is null.
Since:
11.1.1.1.0

write

public void write(HashStructure hs,
                  java.io.Writer writer,
                  java.net.URL baseUrl)
           throws java.io.IOException
Writes out a persistent hash structure to the specified Writer.

Parameters:
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.
Throws:
java.io.IOException - if an error occurs while writing.
java.lang.NullPointerException - if either hs or writer are null.
Since:
11.1.1.1.0

toHashStructure

public HashStructure toHashStructure(org.w3c.dom.Element elem)

addXpathToFlatten

public void addXpathToFlatten(java.lang.String xpath)
INTERNAL. Do not use this method. It may be removed without going through a deprecation phase.


isLastLoadUsedFallback

public boolean isLastLoadUsedFallback()
INTERNAL. Do not use this method. It may be removed without going through a deprecation phase.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.0.0)

E17493-01

Copyright © 1997, 2011, Oracle. All rights reserved.