|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.ibm.dse.base.DataElement
|
+--com.ibm.dse.base.DataCollection
|
+--com.ibm.dse.base.KeyedCollection
Instances of this class contain data elements ordered by insertion or definition. This class provides a protocol for accessing the data elements by name or by position, and for changing and removing these elements.
| Fields inherited from class com.ibm.dse.base.DataElement |
description,
name,
state |
| Constructor Summary | |
KeyedCollection()
This is the default constructor used to create a KeyedCollection object. |
|
KeyedCollection(java.lang.String aName)
This is the constructor used by the externalizer used to create a KeyedCollection object. |
|
| Method Summary | |
void |
addElement(DataElement aDataElement)
Add an entry to the hashtable of elements using as key the dataElement name. |
void |
addElement(java.lang.String aName,
java.lang.Object aValue,
java.lang.String aPath,
java.lang.String aType)
Adds a data element (instance of aType) to the KeyedCollection when the dynamic behavior is active. |
Hashtable |
calculeNestedElements()
Gets the nested elements property (java.util.Hashtable) value. |
Hashtable |
calculeNestedQualifiedElements()
Returns a Hastable with the elements present at any level of this KeyedCollection. |
java.lang.Object |
clone()
Returns a new KeyedCollection cloned from the current one |
java.lang.String |
getDynamic()
Gets the dynamic property (String) value. |
DataElement |
getElementAt(int index)
Returns the value of the element located at the index position. |
DataElement |
getElementAt(java.lang.String aName)
Returns the data element by its name. |
DataElement |
getElementAtAnyLevel(java.lang.String aName)
Returns the first element that matches aName at any level of depth of the keyedCollection. |
protected DataElement |
getElementAtFirstLevel(java.lang.String aName)
Returns the element that matches aName. |
Hashtable |
getElements()
Gets the elements property (java.util.Hashtable) value. |
java.util.Enumeration |
getEnumeration()
Returns the elements of the keyedCollection as an Enumeration. |
int |
getIndexOf(int from,
java.lang.String aName)
Returns the position of the element aName. |
int |
getIndexOf(java.lang.String aName)
Returns the position of the element aName. |
Hashtable |
getNestedElements()
Gets the nested elements property (java.util.Hashtable) value. |
Hashtable |
getOrder()
Gets the order property (java.util.Hashtable) value. |
java.lang.Object |
getValue()
Returns the elements of the keyedCollections. |
java.lang.Object |
initializeFrom(Tag aTag)
Initialize a keyedCollection from its tag in SGML. |
boolean |
isDynamic()
Returns the boolean value of the dynamic property. |
void |
readExternal(java.io.ObjectInput s)
Invokes the object creation from an ObjectInput. |
void |
removeAll()
Remove all elements of the keyedCollection. |
DataElement |
removeElementAt(int index)
Removes the element at the index indicated by the index parameter. |
DataElement |
removeElementAt(java.lang.String aName)
Removes the named data element. |
protected DataElement |
removeElementAtFirstLevel(java.lang.String aName)
Removes the element identified by aName. |
protected void |
reorderElements(int from)
Reorders all the elements from the index indicated by the from parameter to the last element. |
void |
setDynamic(java.lang.String aValue)
Sets the dynamic property (java.lang.String) value. |
void |
setElements(Hashtable anElements)
Sets the elements property (java.util.Hashtable) value. |
void |
setOrder(Hashtable anOrder)
Sets the order property (java.util.Hashtable) value. |
void |
setValue(java.lang.Object aValue)
Sets the value to the KeyedCollection from a Hashtable. |
void |
setValueAt(java.lang.String aName,
java.lang.Object aValue)
This method call the addElement method to create the DataElement aName with the value aValue |
void |
setValueAt(java.lang.String aName,
java.lang.Object aValue,
java.lang.String aType)
Calls the addElement() method to create the aName DataElement (instance of aType) with its value set to aValue. |
int |
size()
Returns the number of elements in the keyedCollection. |
java.lang.String |
toString()
Returns a visual representation of the keyedCollection. |
Vector |
toStrings()
Returns a visual representation of the keyedCollection. |
java.lang.Object |
validate(java.lang.Object toValidate)
Validates the object passing it to its descriptor and if successful, the object is returned, otherwise an appropriate exception is thrown. |
void |
writeExternal(java.io.ObjectOutput s)
Provides concrete serialization handling for KeyedCollection. |
| Methods inherited from class com.ibm.dse.base.DataCollection |
getValueAt,
nestedElements,
nestedElements,
nestedFields,
nestedKeyedCollections,
nestedQualifiedElements |
| Methods inherited from class com.ibm.dse.base.DataElement |
externalizer,
getDescription,
getDescriptor,
getErrorInfo,
getExternalizer,
getKey,
getName,
getState,
getTagName,
readExternal,
readObject,
removeExternal,
setDescription,
setDescriptor,
setErrorInfo,
setExternalizer,
setName,
setState,
toTags,
writeExternal |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public KeyedCollection()
public KeyedCollection(java.lang.String aName)
throws java.io.IOException
aName - java.lang.String| Method Detail |
public void addElement(DataElement aDataElement)
aDataElement - DataElement
public void addElement(java.lang.String aName,
java.lang.Object aValue,
java.lang.String aPath,
java.lang.String aType)
throws DSEInvalidArgumentException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
aName - java.lang.String. The Name of the DataElementaValue - Object. The Value of the DataElementaPath - java.lang.String. The Path to the DataElementaType - java.lang.String The Type of the DataElementpublic Hashtable calculeNestedElements()
public Hashtable calculeNestedQualifiedElements()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
public java.lang.String getDynamic()
setDynamic(java.lang.String)
public DataElement getElementAt(int index)
throws DSEObjectNotFoundException
index - int
public DataElement getElementAt(java.lang.String aName)
throws DSEObjectNotFoundException
aName - java.lang.String
public DataElement getElementAtAnyLevel(java.lang.String aName)
throws DSEObjectNotFoundException
aName - java.lang.String
protected DataElement getElementAtFirstLevel(java.lang.String aName)
throws DSEObjectNotFoundException
aName - java.lang.Stringpublic Hashtable getElements()
setElements(com.ibm.dse.base.Hashtable)public java.util.Enumeration getEnumeration()
public int getIndexOf(int from,
java.lang.String aName)
public int getIndexOf(java.lang.String aName)
String - theNamepublic Hashtable getNestedElements()
public Hashtable getOrder()
setOrder(com.ibm.dse.base.Hashtable)public java.lang.Object getValue()
public java.lang.Object initializeFrom(Tag aTag)
throws java.io.IOException
aTag - Tagpublic boolean isDynamic()
public void readExternal(java.io.ObjectInput s)
throws java.io.IOException,
java.lang.ClassNotFoundException
s - java.io.ObjectInputpublic void removeAll()
public DataElement removeElementAt(int index)
throws DSEObjectNotFoundException
index - int
public DataElement removeElementAt(java.lang.String aName)
throws DSEObjectNotFoundException
aName - java.lang.String
protected DataElement removeElementAtFirstLevel(java.lang.String aName)
throws DSEObjectNotFoundException
aName - java.lang.String
protected void reorderElements(int from)
throws DSEObjectNotFoundException
from - intpublic void setDynamic(java.lang.String aValue)
String - aValue The new value for the property.getDynamic()public void setElements(Hashtable anElements)
elements - The new value for the property.getElements()public void setOrder(Hashtable anOrder)
anOrder - The new value for the property.getOrder()
public void setValue(java.lang.Object aValue)
throws DSEInvalidArgumentException
aValue - java.lang.Object Must be a Hastable. The keys are Strings that represent the names of the dataelement
and the values of this keys are the DataElements Objects.
public void setValueAt(java.lang.String aName,
java.lang.Object aValue)
throws DSEInvalidArgumentException,
DSEObjectNotFoundException
aName - java.lang.StringaKeyedCollection - KeyedCollectionaType - java.lang.String
public void setValueAt(java.lang.String aName,
java.lang.Object aValue,
java.lang.String aType)
throws DSEInvalidArgumentException,
DSEObjectNotFoundException
aName - java.lang.StringaKeyedCollection - KeyedCollectionaType - java.lang.Stringpublic int size()
public java.lang.String toString()
public Vector toStrings()
public java.lang.Object validate(java.lang.Object toValidate)
throws DSETypeException
toValidate - java.lang.Object
public void writeExternal(java.io.ObjectOutput s)
throws java.io.IOException
s - java.io.ObjectOutput
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||