|
||||||||||
| 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.classes.VDL
org.griphyn.vdl.classes.Profile
public class Profile
A Profile captures scheduler system and application
environment specific stuff in a uniform fashion. Each profile
declaration assigns a value to a key within a namespace. As of
this writing, valid namespaces are
Transformation itself.
| Field Summary | |
|---|---|
private static String |
c_error_message
Throws this message, if neither <text> nor <use> elements are tried to be added. |
private String |
m_key
The identifier within a namespace. |
private ArrayList |
m_leafList
The value to above keys. |
private String |
m_namespace
The namespace of a profile. |
| Constructor Summary | |
|---|---|
Profile()
Array ctor. |
|
Profile(String namespace,
String key)
Standard ctor: set up everything except a value of the ns.key pair. |
|
Profile(String namespace,
String key,
Collection children)
Convenience ctor: set up the first piece of the value in one go. |
|
Profile(String namespace,
String key,
Leaf firstChild)
Convenience ctor: set up the first piece of the value in one go. |
|
| Method Summary | |
|---|---|
void |
addLeaf(int index,
Leaf vLeaf)
Accessor: Inserts a Leaf value into a specific position
of the list of gathered values. |
void |
addLeaf(Leaf vLeaf)
Accessor: Append a value fragment to this profile instance. |
Enumeration |
enumerateLeaf()
Deprecated. Use the new Collection based interfaces |
String |
getKey()
Accessor: Gets the key identifier for the profile. |
Leaf[] |
getLeaf()
Deprecated. Use the new Collection based interfaces |
Leaf |
getLeaf(int index)
Accessor: Obtains the Leaf at a certain position in the
list of profile value fragments. |
int |
getLeafCount()
Accessor: Obtains the number of profile value fragments. |
List |
getLeafList()
Accessor: Gets an array of all values that constitute the current content. |
String |
getNamespace()
Accessor: Gets the namespace value for the profile. |
Iterator |
iterateLeaf()
Accessor: Enumerates the internal values that constitute the content of the Scalar element. |
ListIterator |
listIterateLeaf()
Accessor: Enumerates the internal values that constitute the content of the Scalar element. |
ListIterator |
listIterateLeaf(int start)
Accessor: Enumerates the internal values that constitute the content of the Scalar element. |
void |
removeAllLeaf()
Accessor: Removes all value fragments from the profile. |
Leaf |
removeLeaf(int index)
Accessor: Remove a single fragment from the list of value fragments. |
void |
setKey(String key)
Accessor: Adjusts the identifier within a namespace. |
void |
setLeaf(Collection leaves)
Accessor: Overwrites internal list with an external list representing a Scalar value. |
void |
setLeaf(int index,
Leaf vLeaf)
Accessor: Overwrites a Use or Text value
fragment at a certain position in the profile value fragment list. |
void |
setLeaf(Leaf[] leafArray)
Deprecated. Use the new Collection based interfaces |
void |
setNamespace(String namespace)
Accessor: Adjusts a namespace value to a new state. |
String |
toString()
Converts the profile state into textual format for human consumption. |
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. |
| Methods inherited from class org.griphyn.vdl.Chimera |
|---|
escape, quote, toXML, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final String c_error_message
private String m_namespace
private String m_key
private ArrayList m_leafList
Leaf types. A profile value element
only allows for Text and LFN children in arbitrary
number and order.
Leaf,
Text,
LFN| Constructor Detail |
|---|
public Profile()
public Profile(String namespace,
String key)
namespace - is the namespace within which to operate.key - is an identifier unique within the namespace.
public Profile(String namespace,
String key,
Leaf firstChild)
namespace - is the namespace within which to operate.key - is an identifier unique within the namespace.firstChild - is the first fragment of the value. Only
Leafs of type Use or Text
are permissable.Leaf,
Use,
Text
public Profile(String namespace,
String key,
Collection children)
namespace - is the namespace within which to operate.key - is an identifier unique within the namespace.children - is a collection of fragments for the value. Only
Leafs of type Filename or
PseudoText are permissable.Leaf,
Use,
Text| Method Detail |
|---|
public void addLeaf(Leaf vLeaf)
throws IndexOutOfBoundsException,
IllegalArgumentException
vLeaf - is the fragment to add. Note that only leaf values of
Use or Text are allowed.
IndexOutOfBoundsException - if the value cannot be added.
IllegalArgumentException - if the value type is neither
Use nor Text.Leaf,
Text,
Use
public void addLeaf(int index,
Leaf vLeaf)
throws IndexOutOfBoundsException,
IllegalArgumentException
Leaf value into a specific position
of the list of gathered values.
index - is the position to insert the item intovLeaf - is the value to append to the list. Note that only leaf
values of Use or Text are allowed.
IndexOutOfBoundsException - if the value cannot be added.
IllegalArgumentException - if the value type is neither
Use nor Text.Text,
Usepublic Enumeration enumerateLeaf()
Profile value.
public Leaf getLeaf(int index)
throws IndexOutOfBoundsException
Leaf at a certain position in the
list of profile value fragments.
index - is the position in the list to obtain a value from
Use or Text at the position.
IndexOutOfBoundsException - if the index points to an element
in the list that does not contain any elments.Use,
Textpublic Leaf[] getLeaf()
Text or
Use values.Use,
Textpublic int getLeafCount()
public List getLeafList()
Text or
LFN values.LFN,
Textpublic String getNamespace()
setNamespace(java.lang.String)public String getKey()
setKey(java.lang.String)public Iterator iterateLeaf()
Scalar element.
public ListIterator listIterateLeaf()
Scalar element.
public ListIterator listIterateLeaf(int start)
Scalar element.
start - is the start index
public void removeAllLeaf()
public Leaf removeLeaf(int index)
index - is the position at which an element is to be removed.
Use or a Text.Use,
Text
public void setLeaf(int index,
Leaf vLeaf)
throws IndexOutOfBoundsException,
IllegalArgumentException
Use or Text value
fragment at a certain position in the profile value fragment list.
index - position to overwrite an elment in.vLeaf - is either a Use or Text object.
IndexOutOfBoundsException - if the position pointed to is invalid.
IllegalArgumentException - if the added element is of the
incorrect Leaf type.Use,
Textpublic void setLeaf(Leaf[] leafArray)
leafArray - is the external list of Text or
Use objects used to overwrite things.Text,
Usepublic void setLeaf(Collection leaves)
Scalar value.
leaves - is the external list of Text or
LFN objects used to overwrite things.Text,
LFNpublic void setNamespace(String namespace)
namespace - is the new namespace to use.getNamespace()public void setKey(String key)
key - is the new identifier to use from now on.getKey()public String toString()
toString in class Chimera
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 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.
If a null value is specified, no indentation nor
linefeeds will be generated.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 | |||||||||