|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.griphyn.vdl.Chimera
org.griphyn.vdl.dax.DAX
org.griphyn.vdl.dax.ADAG
This class is the container for an abstract DAG description. It consists of three parts.
Filename deals with the filenames that are used in the
picture of the DAG - does a file go into the DAG, come out of the
DAG, or is it an intermediary file. There are multiple instances
stored in a DAX.
Job deals with the description of all jobs in a DAG.
Each job has a logical transformation, commandline argument, possible
stdio redirection, and a potential set of Profile
settings. There are multiple instance stored in a DAX.
Child deals with the dependency in a two-level fashion.
It contains a list of child to parent(s) relationships. The children
and parents refer to jobs from the previous section. There are
multiple instances stored in a DAX.
| Field Summary | |
private TreeMap |
m_childMap
list of all child nodes to construct DAG. |
private boolean |
m_dirty
|
private TreeMap |
m_fileMap
list of all filenames in terms of Filename |
private int |
m_index
When generating alternatives, this is the zero-based count. |
private TreeMap |
m_jobMap
list of all jobs |
private String |
m_name
optional name of this document. |
private TreeMap |
m_replace
list of replacements for node collapsion from compounds. |
private int |
m_size
When generating alternatives, this is the total number of alternatives. |
private String |
m_version
The version to report back, or alternatively to the version that the DAX file had when reading. |
static String |
SCHEMA_LOCATION
The "not-so-official" location URL of the DAX schema definition. |
static String |
SCHEMA_NAMESPACE
The "official" namespace URI of the DAX schema. |
static String |
SCHEMA_VERSION
The version to report. |
| Constructor Summary | |
ADAG()
Default ctor: construct a hollow shell to add data later. |
|
ADAG(int size,
int index)
Ctor: Construct a hollow shell with the required arguments. |
|
ADAG(int size,
int index,
String name)
Ctor: Construct a hollow shell with all element attributes |
|
| Method Summary | |
boolean |
addChild(Child child)
Adds a child node which was constructed elsewhere to the list of known children. |
boolean |
addChild(String child_id)
Adds a child node without any parent relationship to the list of known children. |
boolean |
addChild(String child_id,
String parent_id)
Adds a child node with a parent relationship to the list of known children. |
protected boolean |
addFilename(Filename lfn)
Adds a completely constructed Filename structure to the
map of filenames. |
void |
addFilename(String lfn,
boolean isInput,
String temporary,
boolean dontRegister,
int dontTransfer)
Adds a logical filename string with input or output notion to the list of maintained filenames. |
boolean |
addJob(Job job)
Adds a completely constructed Job structure to the
map of jobs. |
int |
adjustLevels(String id,
int distance)
Adjusts all job levels along the search path. |
Object |
clone()
Creates and returns a copy of this object. |
Enumeration |
enumerateChild()
Deprecated. Use the new Collection based interfaces |
Enumeration |
enumerateFilename()
Deprecated. Use the new Collection based interfaces |
Enumeration |
enumerateJob()
Deprecated. Use the new Collection based interfaces |
int |
getChildCount()
Access: Counts the number of dependencies in the DAG. |
Filename |
getFilename(String lfn)
Accessor: Obtains a Filename from its string. |
int |
getFilenameCount()
Accessor: Obtains the index of filename instances. |
int |
getIndex()
Accessor: Obtains the zero-based index. |
Job |
getJob(String jobID)
Accessor: Obtains a job by its id from the job list. |
int |
getJobCount()
Accessor: Counts the number of jobs in the abstract DAG. |
String |
getName()
Accessor: Obtains the name of the DAX. |
int |
getSize()
Accessor: Obtains the total number of alternatives. |
String |
getVersion()
Accessor: Obtains the version that will be reported in the DAX. |
Iterator |
iterateChild()
Accessor: Provides an iterator for the bag of relationships. |
Iterator |
iterateFilename()
Accessor: Provides an iterator for the bag of filenames. |
Iterator |
iterateJob()
Accessor: Provides an iterator for the bag of jobs. |
void |
removeAllFilename()
Accessor: Removes all filename instances. |
Filename |
removeFilename(String lfn)
Accessor: Removes a specific logical filename instance from the bag. |
String |
replaceParent(String oldid,
String newid)
Registers a job node collapsion as a replacement. |
void |
setFilename(Collection files)
Accessor: Replace this filename instance list with a new list. |
void |
setFilename(Filename vFilename)
Accessor: Overwrites an filename instance with a new one. |
void |
setFilename(Filename[] fileArray)
Deprecated. Use the new Collection based interfaces |
void |
setFilename(Map files)
Accessor: Replace this filename instance list with a map. |
void |
setIndex(int index)
Acessor: Sets a new zero-based index for this document. |
void |
setName(String name)
Acessor: Sets a new optional name for this document. |
void |
setSize(int size)
Acessor: Sets a new total document count in this document. |
void |
setVersion(String version)
Acessor: Sets a new version number for this document. |
void |
toString(Writer stream)
Converts the active state into something meant for human consumption. |
void |
toXML(Writer stream,
String indent,
String namespace)
Dump the state of the current element as XML output. |
private void |
updateChildren()
|
void |
writeXMLHeader(Writer stream,
String indent,
String namespace)
Writes the header of the XML output. |
| Methods inherited from class org.griphyn.vdl.Chimera |
escape, quote, toString, toXML, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String SCHEMA_NAMESPACE
public static final String SCHEMA_LOCATION
public static final String SCHEMA_VERSION
private TreeMap m_fileMap
Filenameprivate TreeMap m_jobMap
Jobprivate TreeMap m_childMap
Childprivate TreeMap m_replace
private boolean m_dirty
private String m_name
private int m_size
private int m_index
private String m_version
| Constructor Detail |
public ADAG()
public ADAG(int size,
int index)
size - is the total number of DAXes that will be constructed.index - is the zero-based number in the total number of DAXes.
public ADAG(int size,
int index,
String name)
size - is the total number of DAXes that will be constructed.index - is the zero-based number in the total number of DAXes.name - is an optional name to use for the DAX. In later versions
this might be useful, if several DAXes are interleaved on the same
connection.| Method Detail |
public Object clone()
public void addFilename(String lfn,
boolean isInput,
String temporary,
boolean dontRegister,
int dontTransfer)
lfn - is the logical filename stringisInput - is a predicate with true to signal an input filename.temporary - is a temp file hint, currently unused.dontRegister - a true value will be propagated (mono-flop)dontTransfer - any non-mandatory value will be propagatedprotected boolean addFilename(Filename lfn)
Filename structure to the
map of filenames. The structure must be assembled outside. This
method is primarily a convenience for the clone() method.
lfn - is the Filename instance.
public boolean addJob(Job job)
Job structure to the
map of jobs. The structure must be assembled outside, using
the related classes. The job ID will be taken as unique key.
If a job with this ID already exists in the DAX, it will be
replaced with the new job.
job - is the new job to add
public boolean addChild(Child child)
child - is the new Child instance to put into the bag.
public boolean addChild(String child_id)
child_id - is the new child to put into the bag.
public boolean addChild(String child_id,
String parent_id)
child_id - is the id of the child for which to modify a parentparent_id - is the new parent to add to the specified child.
public String replaceParent(String oldid,
String newid)
public Enumeration enumerateFilename()
Filename elements.Filenamepublic Enumeration enumerateJob()
Job elements.Jobpublic Enumeration enumerateChild()
Child elements.Childpublic Filename getFilename(String lfn)
Filename from its string.
lfn - is the logical filename string to look it up with.
addFilename( Filename ),
setFilename( Filename )public int getFilenameCount()
Filenamepublic int getJobCount()
public int getChildCount()
public int getIndex()
setIndex( int )public Job getJob(String jobID)
addJob( Job )public String getName()
null, if no name
was specified.setName( String )public int getSize()
setSize( int )public String getVersion()
setVersion( String )public Iterator iterateFilename()
Filename elements.Filenamepublic Iterator iterateJob()
Job elements.Jobpublic Iterator iterateChild()
Child elements.Childpublic void removeAllFilename()
Filenamepublic Filename removeFilename(String lfn)
lfn - is the logical filename string to refer to a filename.
Filename instance to which this lfn had been mapped
in this hashtable, or null if the lfn did not have a mapping.public void setFilename(Filename vFilename)
vFilename - is the new filename instance, which contains all
necessary information.public void setFilename(Filename[] fileArray)
fileArray - is the new list of Filename instancesFilenamepublic void setFilename(Collection files)
files - is the new collection of Filename instancesFilenamepublic void setFilename(Map files)
files - is the new map of Filename instancesFilenamepublic void setIndex(int index)
index - is the new zero-based index of this element.getIndex()public void setName(String name)
name - is the new name.getName()public void setSize(int size)
size - is the new total document count.getSize()public void setVersion(String version)
version - is the new version number as string composed of two
integers separted by a period.getVersion()private void updateChildren()
public int adjustLevels(String id,
int distance)
id - is the job id to startdistance - is the increment (or decrement for negative).
public void toString(Writer stream)
throws IOException
toString in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.
IOException - if something fishy happens to the stream.
public void writeXMLHeader(Writer stream,
String indent,
String namespace)
throws IOException
stream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
The parameter is used internally for the recursive traversal.namespace - is the XML schema namespace prefix. If neither
empty nor null, each element will be prefixed with this prefix,
and the root element will map the XML namespace.
IOException - if something fishy happens to the stream.
public void toXML(Writer stream,
String indent,
String namespace)
throws IOException
toXML in class Chimerastream - is a stream opened and ready for writing. This can also
be a string stream for efficient output.indent - is a String of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
The parameter is used internally for the recursive traversal.namespace - is the XML schema namespace prefix. If neither
empty nor null, each element will be prefixed with this prefix,
and the root element will map the XML namespace.
IOException - if something fishy happens to the stream.BufferedWriter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||