hep.aida.ref.xml
Class AidaXMLStore

java.lang.Object
  extended by hep.aida.ref.xml.AidaXMLStore
All Implemented Interfaces:
hep.aida.dev.IOnDemandStore, hep.aida.dev.IStore

public class AidaXMLStore
extends Object
implements hep.aida.dev.IOnDemandStore

Store associated to XML file, directory structure or archive.


Constructor Summary
AidaXMLStore()
           
 
Method Summary
 void close()
          Close Store and free all resources associated with it.
 void commit(hep.aida.dev.IDevTree tree, Map optionsMap)
          Copy data from Tree to the Store.
 void commit(ITree tree, de.schlichtherle.io.File file, String[] skip, boolean zip, boolean compress, boolean binary)
           
 boolean isReadOnly()
          Returns true if the store only supports reading.
 void read(hep.aida.dev.IDevTree tree, Map optionsMap, boolean readOnly, boolean createNew)
          Populate AIDA Tree: create appropriate AIDA objects in the Tree and fill them with data from the Store.
 void read(hep.aida.dev.IDevTree tree, String path)
          Populate folder or create AIDA object in the tree.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AidaXMLStore

public AidaXMLStore()
Method Detail

isReadOnly

public boolean isReadOnly()
Description copied from interface: hep.aida.dev.IStore
Returns true if the store only supports reading. If true, user can not change information in the Store and "commit()" method throws IOException if called.

Specified by:
isReadOnly in interface hep.aida.dev.IStore

read

public void read(hep.aida.dev.IDevTree tree,
                 String path)
          throws IllegalArgumentException,
                 IOException
Description copied from interface: hep.aida.dev.IOnDemandStore
Populate folder or create AIDA object in the tree. If some folders along the path are missing, IOnDemandStore must create them using ITree "mkdirs(path)" method. Tree relies on Store calling IDevTree.hasBeenFilled(String path) method, to let Tree know that a particular folder has been filled.

Specified by:
read in interface hep.aida.dev.IOnDemandStore
path - The path to the diretory which is to be filled.
Throws:
IllegalArgumentException - If the path does not exist, or if it is not a directory.
IOException - If there are problems reading from the Store

read

public void read(hep.aida.dev.IDevTree tree,
                 Map optionsMap,
                 boolean readOnly,
                 boolean createNew)
          throws IOException
Description copied from interface: hep.aida.dev.IStore
Populate AIDA Tree: create appropriate AIDA objects in the Tree and fill them with data from the Store. This method is called only once, during Tree-Store association, to populate the Tree. Tree relies on IStore calling IDevTree.hasBeenFilled(String path) method, to let Tree know that a particular folder has been filled.

Specified by:
read in interface hep.aida.dev.IStore
Throws:
IOException - If there are problems reading from the Store

commit

public void commit(hep.aida.dev.IDevTree tree,
                   Map optionsMap)
            throws IOException
Description copied from interface: hep.aida.dev.IStore
Copy data from Tree to the Store.

Specified by:
commit in interface hep.aida.dev.IStore
Throws:
IOException - If there are problems writing to the Store or the Store is Read-Only.

commit

public void commit(ITree tree,
                   de.schlichtherle.io.File file,
                   String[] skip,
                   boolean zip,
                   boolean compress,
                   boolean binary)
            throws IOException
Throws:
IOException

close

public void close()
Description copied from interface: hep.aida.dev.IStore
Close Store and free all resources associated with it. Should be called from ITree.close() method only. After the Store is closed, the Tree associated with it becomes unusable.

Specified by:
close in interface hep.aida.dev.IStore


jHepWork 3.2 © jWork.org