FreeHEP API
Version v1.2.2

hep.aida.ref.hbook
Class HBookStore

java.lang.Object
  |
  +--hep.aida.ref.hbook.HBookStore
All Implemented Interfaces:
IOnDemandStore, IStore

public class HBookStore
extends Object
implements IOnDemandStore

An implementation of IStore for reading HBook files.

Version:
$Id: HBookStore.java,v 1.9 2003/06/03 03:27:31 serbo Exp $
Author:
tonyj

Constructor Summary
HBookStore()
           
 
Method Summary
 void close()
          Close Store and free all resources associated with it.
 void commit(IDevTree tree, Map options)
          Copy data from Tree to the Store.
 boolean isReadOnly()
          Returns true if the store only supports reading.
 void read(IDevTree tree, Map options, boolean readOnly, boolean createNew)
          Populate AIDA Tree: create appropriate AIDA objects in the Tree and fill them with data from the Store.
 void read(IDevTree tree, String path)
          Populate folder or create AIDA object in the tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HBookStore

public HBookStore()
Method Detail

isReadOnly

public boolean isReadOnly()
Description copied from interface: 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 IStore

read

public void read(IDevTree tree,
                 Map options,
                 boolean readOnly,
                 boolean createNew)
          throws IOException
Description copied from interface: 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 IStore
Throws:
IOException - If there are problems reading from the Store

read

public void read(IDevTree tree,
                 String path)
          throws IllegalArgumentException,
                 IOException
Description copied from interface: 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 IOnDemandStore
Parameters:
path - The path to the diretory which is to be filled.
Throws:
IOException - If there are problems reading from the Store
IllegalArgumentException - If the path does not exist, or if it is not a directory.

commit

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

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

close

public void close()
           throws IOException
Description copied from interface: 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 IStore
IOException

FreeHEP API
Version v1.2.2

Copyright © 2000-2003 FreeHEP, All Rights Reserved.