|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--hep.aida.ref.event.AIDAObservable | +--hep.aida.ref.tree.Tree
Field Summary |
Fields inherited from class hep.aida.ref.event.AIDAObservable |
isValid |
Constructor Summary | |
protected |
Tree(hep.aida.IAnalysisFactory analysisFactory)
Create a new Tree. |
Method Summary | |
void |
add(String path,
hep.aida.IManagedObject child)
This "add" method is called from the IStore, and can create new folders if it is needed. |
void |
addFromFactory(String path,
hep.aida.IManagedObject child)
This "add" method is called from Factories (HistogramFactory, ...), and can create new folders if it is needed. |
void |
cd(String path)
Change to a given directory. |
void |
checkForChildren(String path)
This message is sent by a listener to indicate interest in a particular path within the tree. |
void |
close()
Closes the underlying store. |
void |
commit()
Commit any open transaction to the underlying store(s). |
void |
cp(String oldPath,
String newPath)
Copy an object from a path to another. |
void |
cp(String oldPath,
String newPath,
boolean recursive)
Copy an object from a path to another. |
protected int |
decrementMountCount()
|
void |
finalize()
|
hep.aida.IManagedObject |
find(String path)
Get the IManagedObject at a given path in the ITree. |
hep.aida.IManagedObject |
findObject(String path)
|
String |
findPath(hep.aida.IManagedObject object)
Get the full path of an IManagedObject. |
hep.aida.ITree |
findTree(String path)
|
protected hep.aida.IManagedObject[] |
getAllManagedObjectsInPath(hep.aida.ref.tree.Path path)
|
Map |
getOptions()
|
void |
hasBeenFilled(String path)
Is called by the Store to let Tree know that a particular folder has been filled already. |
boolean |
hasStore()
|
void |
init(String storeName,
boolean readOnly,
boolean createNew,
String storeType,
String options)
Associate the tree with a store |
boolean |
isReadOnly()
|
String[] |
listObjectNames()
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
String[] |
listObjectNames(String path)
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
String[] |
listObjectNames(String path,
boolean recursive)
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
String[] |
listObjectTypes()
Get the list of types of the IManagedObjects under a given path. |
String[] |
listObjectTypes(String path)
Get the list of types of the IManagedObjects under a given path. |
String[] |
listObjectTypes(String path,
boolean recursive)
Get the list of types of the IManagedObjects under a given path. |
void |
ls()
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
ls(String path)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
ls(String path,
boolean recursive)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
ls(String path,
boolean recursive,
OutputStream os)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
mkdir(String path)
Create a new directory. |
void |
mkdirs(String path)
Create a directory recursively. |
void |
mount(String path,
hep.aida.ITree tree,
String treePath)
Mounts a tree within another (target) tree. |
void |
mv(String oldPath,
String newPath)
Move an IManagedObject or a directory from one directory to another. |
String |
pwd()
Get the path of the current working directory. |
protected void |
registerManagedObject(hep.aida.IManagedObject obj,
hep.aida.ref.tree.Path path)
|
void |
rm(String path)
Remove an IManagedObject by specifying its path. |
void |
rmdir(String path)
Remove a directory and all the contents underneath. |
void |
setFolderIsWatched(String path,
boolean state)
This message is sent by a listener to indicate interest in a particular path within the tree. |
void |
setOverwrite()
Set the strategy of what should happen if two objects have the same path. |
void |
setOverwrite(boolean overwrite)
Set the strategy of what should happen if two objects have the same path. |
String |
storeName()
Get the name of the store. |
void |
symlink(String path,
String alias)
Create a symbolic link to an object in the ITree. |
void |
unmount(String path)
Unmount a subtree at a given path (mount point). |
protected void |
unRegisterManagedObject(hep.aida.IManagedObject obj)
|
Methods inherited from class hep.aida.ref.event.AIDAObservable |
addListener, createEvent, fireStateChanged, fireStateChanged, removeListener, setIsValidAfterNotify, setValid |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface hep.aida.ref.event.IsObservable |
addListener, removeListener, setValid |
Constructor Detail |
protected Tree(hep.aida.IAnalysisFactory analysisFactory)
Method Detail |
public String storeName()
storeName
in interface hep.aida.ITree
public boolean hasStore()
public hep.aida.IManagedObject findObject(String path) throws IllegalArgumentException
IllegalArgumentException
public hep.aida.IManagedObject find(String path) throws IllegalArgumentException
find
in interface hep.aida.ITree
path
- The path.
IllegalArgumentException
- If the path does not correspond to an IManagedObject.public hep.aida.ITree findTree(String path) throws IllegalArgumentException
findTree
in interface hep.aida.ITree
IllegalArgumentException
public void close() throws IOException
close
in interface hep.aida.ITree
IOException
- If there are problems writing out
the underlying store.public void finalize()
finalize
in class Object
public void cd(String path) throws IllegalArgumentException
cd
in interface hep.aida.ITree
path
- The absolute or relative path of the directory we are changing to.
IllegalArgumentException
- If the path does not exist or path is not a directory.public String pwd()
pwd
in interface hep.aida.ITree
public void ls() throws IllegalArgumentException
false
.
ls
in interface hep.aida.ITree
IllegalArgumentException
- If the path does not exist.public void ls(String path) throws IllegalArgumentException
ls
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public void ls(String path, boolean recursive) throws IllegalArgumentException
ls
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").recursive
- If true
the list is extended recursively
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public void ls(String path, boolean recursive, OutputStream os) throws IllegalArgumentException
ls
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").recursive
- If true
the list is extended recursively
in all the directories under path (the default is false
.os
- The output stream into which the list is dumped (by default the standard output).
IllegalArgumentException
- If the path does not exist.public String[] listObjectNames() throws IllegalArgumentException
false
.
listObjectNames
in interface hep.aida.ITree
IllegalArgumentException
- If the path does not exist.public String[] listObjectNames(String path) throws IllegalArgumentException
listObjectNames
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public String[] listObjectNames(String path, boolean recursive) throws IllegalArgumentException
listObjectNames
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").recursive
- If true
the list is extended recursively
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public String[] listObjectTypes() throws IllegalArgumentException
false
.
listObjectTypes
in interface hep.aida.ITree
IllegalArgumentException
- If the path does not exist.public String[] listObjectTypes(String path) throws IllegalArgumentException
listObjectTypes
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public String[] listObjectTypes(String path, boolean recursive) throws IllegalArgumentException
listObjectTypes
in interface hep.aida.ITree
path
- The path where the list has to be performed (by default the current directory ".").recursive
- If true
the list is extended recursively
in all the directories under path (the default is false
.
IllegalArgumentException
- If the path does not exist.public void mkdir(String path) throws IllegalArgumentException
mkdir
in interface hep.aida.ITree
path
- The absolute or relative path of the new directory.
IllegalArgumentException
- If a subdirectory within the path does
not exist or it is not a directory. Also if the directory already
exists.public void mkdirs(String path) throws IllegalArgumentException
mkdirs
in interface hep.aida.ITree
path
- The absolute or relative path of the new directory.
IllegalArgumentException
- If an intermediate subdirectory
is not a directory.public void rmdir(String path) throws IllegalArgumentException
rmdir
in interface hep.aida.ITree
path
- The absolute or relative path of the directory to be removed.
IllegalArgumentException
- If path does not exist or if it is not
a directory.public void rm(String path) throws IllegalArgumentException
rm
in interface hep.aida.ITree
path
- The absolute or relative path of the IManagedObject to be removed.
IllegalArgumentException
- If path does not exist.public String findPath(hep.aida.IManagedObject object) throws IllegalArgumentException
findPath
in interface hep.aida.ITree
object
- The IManagedObject whose path is to be returned.
IllegalArgumentException
- If the IManagedObject does not exist.public void mv(String oldPath, String newPath) throws IllegalArgumentException
mv
in interface hep.aida.ITree
oldPath
- The path of the IManagedObject or direcoty to be moved.newPath
- The path of the diretory in which the object has to be moved to.
IllegalArgumentException
- If either path does not exist.public void commit() throws IOException
commit
in interface hep.aida.ITree
IOException
- If the underlying store cannot be written out.public void setOverwrite()
setOverwrite
in interface hep.aida.ITree
public void setOverwrite(boolean overwrite)
setOverwrite
in interface hep.aida.ITree
overwrite
- true
to enable overwriting.public void cp(String oldPath, String newPath) throws IllegalArgumentException
cp
in interface hep.aida.ITree
oldPath
- The path of the object to be copied.newPath
- The path where the object is to be copied.
IllegalArgumentException
- If either path does not exist.public void cp(String oldPath, String newPath, boolean recursive) throws IllegalArgumentException
cp
in interface hep.aida.ITree
oldPath
- The path of the object to be copied.newPath
- The path where the object is to be copied.recursive
- true
if a recursive copy has to be performed.
IllegalArgumentException
- If either path does not exist.public void symlink(String path, String alias) throws IllegalArgumentException
symlink
in interface hep.aida.ITree
path
- The absolute or relative path of the object to be linked.alias
- The absolute or relative name of the link.
IllegalArgumentException
- If path or any
subidrectory within path does not exist.public void mount(String path, hep.aida.ITree tree, String treePath) throws IllegalArgumentException
target.mount("/home/tonyj",tree,"/");
mount
in interface hep.aida.ITree
path
- The path in the target treetree
- The tree to mount within the target treetreePath
- The mount point within the tree to be mounted.
IllegalArtumentException
- If something does not exist.
IllegalArgumentException
public void unmount(String path) throws IllegalArgumentException
unmount
in interface hep.aida.ITree
path
- The path of the subtree to be unmounted.
IllegalArgumentException
- If path does not exist.public void init(String storeName, boolean readOnly, boolean createNew, String storeType, String options) throws IOException
storeName
- The name of the output storage unit.readOnly
- true
if the tree is readonly.createNew
- true
if the tree has to create a new file.storeType
- The type of the output storage unit.
IOException
public void hasBeenFilled(String path) throws IllegalArgumentException
hasBeenFilled
in interface IDevTree
path
- The path of the diretory which has been filled by the Store.
IllegalArgumentException
- If the path does not exist, or if it is not a directory.public boolean isReadOnly()
public void add(String path, hep.aida.IManagedObject child)
add
in interface IDevTree
path
- The path of the diretory in which the object has to be added.child
- The IManagedObject to be added.public void addFromFactory(String path, hep.aida.IManagedObject child)
protected hep.aida.IManagedObject[] getAllManagedObjectsInPath(hep.aida.ref.tree.Path path)
protected void registerManagedObject(hep.aida.IManagedObject obj, hep.aida.ref.tree.Path path)
protected void unRegisterManagedObject(hep.aida.IManagedObject obj)
public void checkForChildren(String path)
public void setFolderIsWatched(String path, boolean state)
public Map getOptions()
protected int decrementMountCount()
|
FreeHEP API Version v1.2.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |