| org.griphyn.vdl.dax.DAX org.griphyn.vdl.dax.ADAG
ADAG | public class ADAG extends DAX implements Cloneable(Code) | | 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.
author: Jens-S. Vöckler author: Yong Zhao version: $Revision: 366 $ |
Constructor Summary | |
public | ADAG() Default ctor: construct a hollow shell to add data later. | public | ADAG(int size, int index) Ctor: Construct a hollow shell with the required arguments. | public | ADAG(int size, int index, String name) Ctor: Construct a hollow shell with all element attributes
Parameters: size - is the total number of DAXes that will be constructed. Parameters: index - is the zero-based number in the total number of DAXes. Parameters: name - is an optional name to use for the DAX. |
Method Summary | |
public boolean | addChild(Child child) Adds a child node which was constructed elsewhere to the list of
known children. | public boolean | addChild(String child_id) Adds a child node without any parent relationship to the list of
known children. | public boolean | addChild(String child_id, String parent_id) Adds a child node with a parent relationship to the list of known
children. | public 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. | protected boolean | addFilename(Filename lfn) Adds a completely constructed
Filename structure to the
map of filenames. | public boolean | addJob(Job job) Adds a completely constructed
Job structure to the
map of jobs. | public int | adjustLevels(String id, int distance) Adjusts all job levels along the search path. | public Object | clone() Creates and returns a copy of this object. | public Enumeration | enumerateChild() Accessor: Provides an iterator for the bag of relationships. | public Enumeration | enumerateFilename() Accessor: Provides an iterator for the bag of filenames. | public Enumeration | enumerateJob() Accessor: Provides an iterator for the bag of jobs. | public int | getChildCount() Access: Counts the number of dependencies in the DAG. | public Filename | getFilename(String lfn) Accessor: Obtains a Filename from its string.
Parameters: lfn - is the logical filename string to look it up with. | public int | getFilenameCount() Accessor: Obtains the index of filename instances. | public int | getIndex() Accessor: Obtains the zero-based index. | public Job | getJob(String jobID) Accessor: Obtains a job by its id from the job list. | public int | getJobCount() Accessor: Counts the number of jobs in the abstract DAG. | public String | getName() Accessor: Obtains the name of the DAX. | public int | getSize() Accessor: Obtains the total number of alternatives. | public String | getVersion() Accessor: Obtains the version that will be reported in the DAX. | public Iterator | iterateChild() Accessor: Provides an iterator for the bag of relationships. | public Iterator | iterateFilename() Accessor: Provides an iterator for the bag of filenames. | public Iterator | iterateJob() Accessor: Provides an iterator for the bag of jobs. | public void | removeAllFilename() Accessor: Removes all filename instances. | public Filename | removeFilename(String lfn) Accessor: Removes a specific logical filename instance from the bag.
Parameters: lfn - is the logical filename string to refer to a filename. | public String | replaceParent(String oldid, String newid) Registers a job node collapsion as a replacement. | public void | setFilename(Filename vFilename) Accessor: Overwrites an filename instance with a new one. | public void | setFilename(Filename[] fileArray) Accessor: Replace this filename instance list with a new list. | public void | setFilename(java.util.Collection files) Accessor: Replace this filename instance list with a new list. | public void | setFilename(java.util.Map files) Accessor: Replace this filename instance list with a map. | public void | setIndex(int index) Acessor: Sets a new zero-based index for this document. | public void | setName(String name) Acessor: Sets a new optional name for this document. | public void | setSize(int size) Acessor: Sets a new total document count in this document. | public void | setVersion(String version) Acessor: Sets a new version number for this document. | public void | toString(Writer stream) Converts the active state into something meant for human consumption.
The method will be called when recursively traversing the instance
tree.
Parameters: stream - is a stream opened and ready for writing. | public void | toXML(Writer stream, String indent, String namespace) Dump the state of the current element as XML output. | public void | writeXMLHeader(Writer stream, String indent, String namespace) Writes the header of the XML output. |
SCHEMA_LOCATION | final public static String SCHEMA_LOCATION(Code) | | The "not-so-official" location URL of the DAX schema definition.
|
SCHEMA_NAMESPACE | final public static String SCHEMA_NAMESPACE(Code) | | The "official" namespace URI of the DAX schema.
|
SCHEMA_VERSION | final public static String SCHEMA_VERSION(Code) | | The version to report.
|
ADAG | public ADAG()(Code) | | Default ctor: construct a hollow shell to add data later.
|
ADAG | public ADAG(int size, int index)(Code) | | Ctor: Construct a hollow shell with the required arguments.
Parameters: size - is the total number of DAXes that will be constructed. Parameters: index - is the zero-based number in the total number of DAXes. |
ADAG | public ADAG(int size, int index, String name)(Code) | | Ctor: Construct a hollow shell with all element attributes
Parameters: size - is the total number of DAXes that will be constructed. Parameters: index - is the zero-based number in the total number of DAXes. Parameters: name - is an optional name to use for the DAX. In later versionsthis might be useful, if several DAXes are interleaved on the sameconnection. |
addChild | public boolean addChild(Child child)(Code) | | Adds a child node which was constructed elsewhere to the list of
known children. If the child already exists, nothing is done.
Parameters: child - is the new Child instance to put into the bag. true if the bag did not already contain the specified element. |
addChild | public boolean addChild(String child_id)(Code) | | Adds a child node without any parent relationship to the list of
known children. If the child already exists, nothing is done.
Parameters: child_id - is the new child to put into the bag. true if the bag did not already contain the specified element. |
addChild | public boolean addChild(String child_id, String parent_id)(Code) | | Adds a child node with a parent relationship to the list of known
children. If the child already exists, but the parent relationship
is not known, it will be added to the child's list of parents. If
the child already exists and the parent relationship is known,
nothing is done.
Parameters: child_id - is the id of the child for which to modify a parent Parameters: parent_id - is the new parent to add to the specified child. true if the bag did not already contain the relationship. |
addFilename | public void addFilename(String lfn, boolean isInput, String temporary, boolean dontRegister, int dontTransfer)(Code) | | Adds a logical filename string with input or output notion to the
list of maintained filenames. If the filename does not exist
previously, a new entry is added. If the filename does exist, the
io state will be checked. A filename that was previously an input,
and is now an output, will become inout. If a filename was ever
declared not-transfer or not-register, it will maintain these
attributes. Each filename is only added once.
Parameters: lfn - is the logical filename string Parameters: isInput - is a predicate with true to signal an input filename. Parameters: temporary - is a temp file hint, currently unused. Parameters: dontRegister - a true value will be propagated (mono-flop) Parameters: dontTransfer - any non-mandatory value will be propagated |
addFilename | protected boolean addFilename(Filename lfn)(Code) | | Adds a completely constructed
Filename structure to the
map of filenames. The structure must be assembled outside. This
method is primarily a convenience for the
ADAG.clone() method.
Parameters: lfn - is the Filename instance. true, if the bag did not contain an identical Filename already. |
addJob | public boolean addJob(Job job)(Code) | | Adds a completely constructed
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.
Parameters: job - is the new job to add true, if the bag did not contain this job already. |
adjustLevels | public int adjustLevels(String id, int distance)(Code) | | Adjusts all job levels along the search path. Given a starting point,
this method will re-iterate the search-tree, and adjust the level of
each known job by the specified distance.
Parameters: id - is the job id to start Parameters: distance - is the increment (or decrement for negative). number of jobs adjusted? |
clone | public Object clone()(Code) | | Creates and returns a copy of this object.
a new instance, deep copy of elements |
enumerateChild | public Enumeration enumerateChild()(Code) | | Accessor: Provides an iterator for the bag of relationships.
the iterator for Child elements. See Also: Child |
enumerateFilename | public Enumeration enumerateFilename()(Code) | | Accessor: Provides an iterator for the bag of filenames.
the iterator for Filename elements. See Also: Filename |
enumerateJob | public Enumeration enumerateJob()(Code) | | Accessor: Provides an iterator for the bag of jobs.
the iterator for Job elements. See Also: Job |
getChildCount | public int getChildCount()(Code) | | Access: Counts the number of dependencies in the DAG.
dependency count, which may be zilch. |
getFilenameCount | public int getFilenameCount()(Code) | | Accessor: Obtains the index of filename instances.
the number of arguments in the filename list. See Also: Filename |
getIndex | public int getIndex()(Code) | | Accessor: Obtains the zero-based index.
a number in the interval [0,size-1]. See Also: ADAG.setIndex(int) |
getJobCount | public int getJobCount()(Code) | | Accessor: Counts the number of jobs in the abstract DAG.
the number of jobs. |
getName | public String getName()(Code) | | Accessor: Obtains the name of the DAX.
the name of this DAX, or null , if no namewas specified. See Also: ADAG.setName(String) |
getSize | public int getSize()(Code) | | Accessor: Obtains the total number of alternatives. This is the
number of DAXes generatable from alternatives.
a positive natural integer. See Also: ADAG.setSize(int) |
iterateChild | public Iterator iterateChild()(Code) | | Accessor: Provides an iterator for the bag of relationships.
the iterator for Child elements. See Also: Child |
iterateFilename | public Iterator iterateFilename()(Code) | | Accessor: Provides an iterator for the bag of filenames.
the iterator for Filename elements. See Also: Filename |
iterateJob | public Iterator iterateJob()(Code) | | Accessor: Provides an iterator for the bag of jobs.
the iterator for Job elements. See Also: Job |
removeAllFilename | public void removeAllFilename()(Code) | | Accessor: Removes all filename instances.
See Also: Filename |
removeFilename | public Filename removeFilename(String lfn)(Code) | | Accessor: Removes a specific logical filename instance from the bag.
Parameters: lfn - is the logical filename string to refer to a filename. the Filename instance to which this lfn had been mappedin this hashtable, or null if the lfn did not have a mapping. |
replaceParent | public String replaceParent(String oldid, String newid)(Code) | | Registers a job node collapsion as a replacement.
|
setFilename | public void setFilename(Filename vFilename)(Code) | | Accessor: Overwrites an filename instance with a new one.
Parameters: vFilename - is the new filename instance, which contains allnecessary information. |
setFilename | public void setFilename(Filename[] fileArray)(Code) | | Accessor: Replace this filename instance list with a new list.
Parameters: fileArray - is the new list of Filename instances See Also: Filename |
setFilename | public void setFilename(java.util.Collection files)(Code) | | Accessor: Replace this filename instance list with a new list.
Parameters: files - is the new collection of Filename instances See Also: Filename |
setFilename | public void setFilename(java.util.Map files)(Code) | | Accessor: Replace this filename instance list with a map.
Parameters: files - is the new map of Filename instances See Also: Filename |
setIndex | public void setIndex(int index)(Code) | | Acessor: Sets a new zero-based index for this document. The index
is used in conjunction with the total number of documents count.
Parameters: index - is the new zero-based index of this element. See Also: ADAG.getIndex() |
setName | public void setName(String name)(Code) | | Acessor: Sets a new optional name for this document.
Parameters: name - is the new name. See Also: ADAG.getName() |
setSize | public void setSize(int size)(Code) | | Acessor: Sets a new total document count in this document. The count
is used in conjunction with the zero-based document index.
Parameters: size - is the new total document count. See Also: ADAG.getSize() |
setVersion | public void setVersion(String version)(Code) | | Acessor: Sets a new version number for this document. The version
number is taken by the abstract planner to support a range of valid
DAX documents.
Parameters: version - is the new version number as string composed of twointegers separted by a period. See Also: ADAG.getVersion() since: 1.7 |
toString | public void toString(Writer stream) throws IOException(Code) | | Converts the active state into something meant for human consumption.
The method will be called when recursively traversing the instance
tree.
Parameters: stream - is a stream opened and ready for writing. This can alsobe a string stream for efficient output. |
toXML | public void toXML(Writer stream, String indent, String namespace) throws IOException(Code) | | Dump the state of the current element as XML output. This function
traverses all sibling classes as necessary, and converts the data
into pretty-printed XML output. The stream interface should be able
to handle large output efficiently.
Parameters: stream - is a stream opened and ready for writing. This can alsobe a string stream for efficient output. Parameters: indent - is a String of spaces used for prettyprinting. The initial amount of spaces should be an empty string.The parameter is used internally for the recursive traversal. Parameters: namespace - is the XML schema namespace prefix. If neitherempty nor null, each element will be prefixed with this prefix,and the root element will map the XML namespace. exception: IOException - if something fishy happens to the stream. |
writeXMLHeader | public void writeXMLHeader(Writer stream, String indent, String namespace) throws IOException(Code) | | Writes the header of the XML output. The output contains the special
strings to start an XML document, some comments, and the root element.
The latter points to the XML schema via XML Instances.
Parameters: stream - is a stream opened and ready for writing. This can alsobe a string stream for efficient output. Parameters: indent - is a String of spaces used for prettyprinting. The initial amount of spaces should be an empty string.The parameter is used internally for the recursive traversal. Parameters: namespace - is the XML schema namespace prefix. If neitherempty nor null, each element will be prefixed with this prefix,and the root element will map the XML namespace. exception: IOException - if something fishy happens to the stream. |
|
|