|
||||||||||
| 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.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
| Field Summary | |
|---|---|
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. |
private String |
m_origin
This value records which entity was responsible for setting the profile in the first place. |
| 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. |
Object |
clone()
Creates and returns a copy of this object. |
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. |
String |
getOrigin()
Accessor: Obtains the originator for a 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 Leaf element. |
ListIterator |
listIterateLeaf(int start)
Accessor: Enumerates the internal values that constitute the content of the Leaf 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 Filename or PseudoText 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. |
void |
setOrigin(String origin)
Accessor: Sets the originator for a profile. |
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, toString, toXML, toXML, writeAttribute |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String m_namespace
private String m_key
private ArrayList m_leafList
Leaf types. A profile value element
only allows for PseudoText and Filename children in
arbitrary number and order.
Leaf,
PseudoText,
Filenameprivate String m_origin
| 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 Filename or
PseudoText are permissable.Leaf,
Filename,
PseudoText
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,
Filename,
PseudoText| Method Detail |
|---|
public Object clone()
clone in class Objectpublic void addLeaf(Leaf vLeaf)
vLeaf - is the fragment to add. Note that only leaf values of
Filename or PseudoText are allowed.Leaf,
PseudoText,
Filename
public void addLeaf(int index,
Leaf vLeaf)
throws IndexOutOfBoundsException
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 Filename or PseudoText
are allowed.
IndexOutOfBoundsException - if the value cannot be added.Leaf,
PseudoText,
Filenamepublic 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
Filename or PseudoText at the position.
IndexOutOfBoundsException - if the index points to an element
in the list that does not contain any elments.Filename,
PseudoTextpublic Leaf[] getLeaf()
PseudoText or
Filename values.Filename,
PseudoTextpublic int getLeafCount()
public List getLeafList()
PseudoText or
Filename values.PseudoText,
Filenamepublic String getNamespace()
setNamespace(java.lang.String)public String getOrigin()
setOrigin( java.lang.String )public String getKey()
setKey(java.lang.String)public Iterator iterateLeaf()
Scalar element.
public ListIterator listIterateLeaf()
Leaf element.
public ListIterator listIterateLeaf(int start)
Leaf 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.
Filename or a PseudoText.Filename,
PseudoText
public void setLeaf(int index,
Leaf vLeaf)
throws IndexOutOfBoundsException
Filename or PseudoText value
fragment at a certain position in the profile value fragment list.
index - position to overwrite an elment in.vLeaf - is either a Filename or PseudoText object.
IndexOutOfBoundsException - if the position pointed to is invalid.Filename,
PseudoTextpublic void setLeaf(Leaf[] leafArray)
leafArray - is the external list of PseudoText or
Filename objects used to overwrite things.PseudoText,
Filenamepublic void setLeaf(Collection leaves)
Scalar value.
leaves - is the external list of PseudoText or
Filename objects used to overwrite things.PseudoText,
Filenamepublic void setOrigin(String origin)
origin - is the new originator to use, may be null.getOrigin()public 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 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.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 | |||||||||