org.planx.xmlstore.nodes
Class NodeConverter

java.lang.Object
  extended by org.planx.xmlstore.nodes.NodeConverter

public class NodeConverter
extends Object

Author:
Thomas Ambus

Constructor Summary
NodeConverter()
           
NodeConverter(XMLStore xmlstore)
           
 
Method Summary
 SystemNode load(LocalLocator loc, Reference secondaryRef, LocalLocator bound, FileSystem fs, LocatorListener listener)
          The secondary Reference of the node is used to construct child NodeProxys with plausible secondary references.
 LocalLocator save(SystemNode node, LocalLocator bound, FileSystem fs, LocatorListener listener)
          If a bound is specified, all nodes within it will be saved even if they already have a locator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeConverter

public NodeConverter()

NodeConverter

public NodeConverter(XMLStore xmlstore)
Method Detail

save

public LocalLocator save(SystemNode node,
                         LocalLocator bound,
                         FileSystem fs,
                         LocatorListener listener)
                  throws IOException
If a bound is specified, all nodes within it will be saved even if they already have a locator. This is used to migrate nodes from a previous file system state to a new. Use the old file system bound to identify nodes with deprecated locators. That is, saving them anew will give them the new and correct locators.

Throws:
IOException

load

public SystemNode load(LocalLocator loc,
                       Reference secondaryRef,
                       LocalLocator bound,
                       FileSystem fs,
                       LocatorListener listener)
                throws IOException,
                       UnknownLocatorException
The secondary Reference of the node is used to construct child NodeProxys with plausible secondary references. TODO: the secondaryRef argument has been deprecated, please remove.

Parameters:
loc - the LocalLocator of the Node to be loaded
secondaryRef - an optional secondary Reference or null
bound - an optional LocalLocator (possibly null) giving bounds within which all nodes will be loaded. Nodes outside the bound will be proxied (i.e. lazy loading).
fs - the FileSystem to load from
Throws:
IOException
UnknownLocatorException


Copyright © 2010. All Rights Reserved.