hep.aida.dev
Interface IStore
-
- All Known Subinterfaces:
- IDevMutableStore, IMutableStore, IOnDemandStore
- All Known Implementing Classes:
- AidaXMLStore
public interface IStoreAn interface to be implemented by AIDA compatible Store. Store is a Proxy that presents data from some resource to a Tree. Store can be associated with only one Tree during its lifetime. This is an interface to a basic Store that can provide data in one piece only, like XML file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidclose()Close Store and free all resources associated with it.voidcommit(IDevTree tree, java.util.Map options)Copy data from Tree to the Store.booleanisReadOnly()Returns true if the store only supports reading.voidread(IDevTree tree, java.util.Map options, boolean readOnly, boolean createNew)Populate AIDA Tree: create appropriate AIDA objects in the Tree and fill them with data from the Store.
-
-
-
Method Detail
-
isReadOnly
boolean isReadOnly()
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.
-
read
void read(IDevTree tree, java.util.Map options, boolean readOnly, boolean createNew) throws java.io.IOException
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.- Throws:
java.io.IOException- If there are problems reading from the Store
-
commit
void commit(IDevTree tree, java.util.Map options) throws java.io.IOException
Copy data from Tree to the Store.- Throws:
java.io.IOException- If there are problems writing to the Store or the Store is Read-Only.
-
close
void close() throws java.io.IOExceptionClose 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.- Throws:
java.io.IOException
-
-
DMelt 3.0 © DataMelt by jWork.ORG