|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.aida.ref.event.AIDAObservable
hep.aida.ref.tree.Tree
public class Tree
Method Summary | |
---|---|
void |
add(java.lang.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(java.lang.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(java.lang.String path)
Change to a given directory. |
void |
checkForChildren(java.lang.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(java.lang.String oldPath,
java.lang.String newPath)
Copy an object from a path to another. |
void |
cp(java.lang.String oldPath,
java.lang.String newPath,
boolean recursive)
Copy an object from a path to another. |
hep.aida.IManagedObject |
find(java.lang.String path)
Get the IManagedObject at a given path in the ITree. |
hep.aida.IManagedObject |
findObject(java.lang.String path)
|
java.lang.String |
findPath(hep.aida.IManagedObject object)
Get the full path of an IManagedObject. |
hep.aida.ITree |
findTree(java.lang.String path)
|
void |
fireConnectionEvent(java.lang.String pathString,
boolean connect)
|
java.lang.Object |
getLock()
|
java.util.Map |
getOptions()
|
void |
hasBeenFilled(java.lang.String path)
Is called by the Store to let Tree know that a particular folder has been filled already. |
boolean |
hasStore()
|
void |
init(java.lang.String storeName,
boolean readOnly,
boolean createNew,
java.lang.String storeType,
java.lang.String options,
boolean readOnlyUserDefined)
Associate the tree with a store |
void |
init(java.lang.String storeName,
java.lang.String storeType,
int mode,
java.lang.String options)
Non-AIDA methods are down here. |
boolean |
isReadOnly()
|
java.lang.String[] |
listObjectNames()
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
java.lang.String[] |
listObjectNames(java.lang.String path)
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
java.lang.String[] |
listObjectNames(java.lang.String path,
boolean recursive)
Get the list of names of the IManagedObjects under a given path, including directories (but not "." and ".."). |
java.lang.String[] |
listObjectTypes()
Get the list of types of the IManagedObjects under a given path. |
java.lang.String[] |
listObjectTypes(java.lang.String path)
Get the list of types of the IManagedObjects under a given path. |
java.lang.String[] |
listObjectTypes(java.lang.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(java.lang.String path)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
ls(java.lang.String path,
boolean recursive)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
ls(java.lang.String path,
boolean recursive,
java.io.OutputStream os)
List, into a given output stream, all the IManagedObjects, including directories (but not "." and ".."), in a given path. |
void |
mkdir(java.lang.String path)
Create a new directory. |
void |
mkdirs(java.lang.String path)
Create a directory recursively. |
void |
mount(java.lang.String path,
hep.aida.ITree tree,
java.lang.String treePath)
Mounts a tree within another (target) tree. |
void |
mv(java.lang.String oldPath,
java.lang.String newPath)
Move an IManagedObject or a directory from one directory to another. |
java.lang.String |
name()
|
java.lang.String |
pwd()
Get the path of the current working directory. |
void |
rm(java.lang.String path)
Remove an IManagedObject by specifying its path. |
void |
rmdir(java.lang.String path)
Remove a directory and all the contents underneath. |
void |
setFolderIsWatched(java.lang.String path,
boolean state)
This message is sent by a listener to indicate interest in a particular path within the tree. |
void |
setLock(java.lang.Object lock)
|
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. |
java.lang.String |
storeName()
Get the name of the store. |
java.lang.String |
storeType()
|
void |
symlink(java.lang.String path,
java.lang.String alias)
Create a symbolic link to an object in the ITree. |
void |
unmount(java.lang.String path)
Unmount a subtree at a given path (mount point). |
Methods inherited from class hep.aida.ref.event.AIDAObservable |
---|
addListener, isConnected, removeAllListeners, removeListener, setConnected, setValid, setValidForAll |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface hep.aida.ref.event.IsObservable |
---|
addListener, removeAllListeners, removeListener, setValid |
Method Detail |
---|
public java.lang.String name()
name
in interface hep.aida.ITree
public java.lang.String storeName()
storeName
in interface hep.aida.ITree
public java.lang.String storeType()
storeType
in interface hep.aida.ITree
public void setLock(java.lang.Object lock)
setLock
in interface hep.aida.dev.IDevTree
public java.lang.Object getLock()
getLock
in interface hep.aida.dev.IDevTree
public boolean hasStore()
public hep.aida.IManagedObject findObject(java.lang.String path) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public hep.aida.IManagedObject find(java.lang.String path) throws java.lang.IllegalArgumentException
find
in interface hep.aida.ITree
path
- The path.
java.lang.IllegalArgumentException
- If the path does not correspond to an IManagedObject.public hep.aida.ITree findTree(java.lang.String path) throws java.lang.IllegalArgumentException
findTree
in interface hep.aida.ITree
java.lang.IllegalArgumentException
public void close() throws java.io.IOException
close
in interface hep.aida.ITree
java.io.IOException
- If there are problems writing out
the underlying store.public void cd(java.lang.String path) throws java.lang.IllegalArgumentException
cd
in interface hep.aida.ITree
path
- The absolute or relative path of the directory we are changing to.
java.lang.IllegalArgumentException
- If the path does not exist or path is not a directory.public java.lang.String pwd()
pwd
in interface hep.aida.ITree
public void ls() throws java.lang.IllegalArgumentException
false
.
ls
in interface hep.aida.ITree
java.lang.IllegalArgumentException
- If the path does not exist.public void ls(java.lang.String path) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public void ls(java.lang.String path, boolean recursive) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public void ls(java.lang.String path, boolean recursive, java.io.OutputStream os) throws java.lang.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).
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectNames() throws java.lang.IllegalArgumentException
false
.
listObjectNames
in interface hep.aida.ITree
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectNames(java.lang.String path) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectNames(java.lang.String path, boolean recursive) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectTypes() throws java.lang.IllegalArgumentException
false
.
listObjectTypes
in interface hep.aida.ITree
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectTypes(java.lang.String path) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public java.lang.String[] listObjectTypes(java.lang.String path, boolean recursive) throws java.lang.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
.
java.lang.IllegalArgumentException
- If the path does not exist.public void mkdir(java.lang.String path) throws java.lang.IllegalArgumentException
mkdir
in interface hep.aida.ITree
path
- The absolute or relative path of the new directory.
java.lang.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(java.lang.String path) throws java.lang.IllegalArgumentException
mkdirs
in interface hep.aida.ITree
path
- The absolute or relative path of the new directory.
java.lang.IllegalArgumentException
- If an intermediate subdirectory
is not a directory.public void rmdir(java.lang.String path) throws java.lang.IllegalArgumentException
rmdir
in interface hep.aida.ITree
path
- The absolute or relative path of the directory to be removed.
java.lang.IllegalArgumentException
- If path does not exist or if it is not
a directory.public void rm(java.lang.String path) throws java.lang.IllegalArgumentException
rm
in interface hep.aida.ITree
path
- The absolute or relative path of the IManagedObject to be removed.
java.lang.IllegalArgumentException
- If path does not exist.public java.lang.String findPath(hep.aida.IManagedObject object) throws java.lang.IllegalArgumentException
findPath
in interface hep.aida.ITree
object
- The IManagedObject whose path is to be returned.
java.lang.IllegalArgumentException
- If the IManagedObject does not exist.public void mv(java.lang.String oldPath, java.lang.String newPath) throws java.lang.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.
java.lang.IllegalArgumentException
- If either path does not exist.public void commit() throws java.io.IOException
commit
in interface hep.aida.ITree
java.io.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(java.lang.String oldPath, java.lang.String newPath) throws java.lang.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.
java.lang.IllegalArgumentException
- If either path does not exist.public void cp(java.lang.String oldPath, java.lang.String newPath, boolean recursive) throws java.lang.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.
java.lang.IllegalArgumentException
- If either path does not exist.public void symlink(java.lang.String path, java.lang.String alias) throws java.lang.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.
java.lang.IllegalArgumentException
- If path or any
subidrectory within path does not exist.public void mount(java.lang.String path, hep.aida.ITree tree, java.lang.String treePath) throws java.lang.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.
java.lang.IllegalArgumentException
public void unmount(java.lang.String path) throws java.lang.IllegalArgumentException
unmount
in interface hep.aida.ITree
path
- The path of the subtree to be unmounted.
java.lang.IllegalArgumentException
- If path does not exist.public void init(java.lang.String storeName, java.lang.String storeType, int mode, java.lang.String options) throws java.io.IOException
java.io.IOException
public void init(java.lang.String storeName, boolean readOnly, boolean createNew, java.lang.String storeType, java.lang.String options, boolean readOnlyUserDefined) throws java.io.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.
java.io.IOException
public void hasBeenFilled(java.lang.String path) throws java.lang.IllegalArgumentException
hasBeenFilled
in interface hep.aida.dev.IDevTree
path
- The path of the diretory which has been filled by the Store.
java.lang.IllegalArgumentException
- If the path does not exist, or if it is not a directory.public boolean isReadOnly()
isReadOnly
in interface hep.aida.ITree
public void add(java.lang.String path, hep.aida.IManagedObject child)
add
in interface hep.aida.dev.IDevTree
path
- The path of the diretory in which the object has to be added.child
- The IManagedObject to be added.public void addFromFactory(java.lang.String path, hep.aida.IManagedObject child)
public void fireConnectionEvent(java.lang.String pathString, boolean connect)
public void checkForChildren(java.lang.String path)
public void setFolderIsWatched(java.lang.String path, boolean state)
public java.util.Map getOptions()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |