com.ibm.dse.base
Class IndexedCollectionFormat

java.lang.Object
  |
  +--com.ibm.dse.base.FormatElement
        |
        +--com.ibm.dse.base.IndexedCollectionFormat
Direct Known Subclasses:
VectoredIndexedCollectionFormat

public class IndexedCollectionFormat
extends FormatElement

This class formats the elements of a IndexedCollection using the same format for each one.

See Also:
Serialized Form

Field Summary
protected  int append
          The append attribute.
 FormatElement element
           
 
Fields inherited from class com.ibm.dse.base.FormatElement
dataElementName, name
 
Constructor Summary
IndexedCollectionFormat()
          This is the default constructor used to create an IndexedCollectionFormat object.
IndexedCollectionFormat(java.lang.String aName)
          This is the constructor used by the externalizer to create an IndexedCollectionFormat object
 
Method Summary
 java.lang.String[] extract(java.lang.String aString)
          Extracts an element a number of times equal to the timesRepeat attribute.
 java.lang.String format(DataElement aDataElement)
          Verifies that the passed DataElement is an IndexedCollection and then calls formatIndexedCollection().
 java.lang.String formatIndexedCollection(IndexedCollection anIndexedCollection)
          Formats the IndexedCollection elements according to the FormatElement in the element attribute
 java.lang.String getAppend()
          Returns the value of the append property.
 FormatElement getElement()
          Returns the value of element.
 int getTimesRepeat()
          Returns the value of timesRepeat.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes an IndexedCollectionFormat with the Tag attributes.
 void setAppend(java.lang.String aString)
          Sets the value of the append property.
 void setElement(FormatElement aFormatElement)
          Sets the value of element.
 void setTimesRepeat(int aNumber)
          Sets the value of timesRepeat.
 Vector toStrings()
          Returns an SGML representation of the instance.
 DataElement unformat(java.lang.String aString, DataElement aDataElement)
          Verifies that the passed DataElement is an IndexedCollection and calls unformatIndexedCollection().
 IndexedCollection unformatIndexedCollection(java.lang.String aString, IndexedCollection anIndexedCollection)
          Update the IndexedCollection elements by interpreting the formatted string.
 
Methods inherited from class com.ibm.dse.base.FormatElement
exceptionInfo, externalizer, format, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toString, toTags, unformat, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

public FormatElement element

append

protected int append
The append attribute.
Constructor Detail

IndexedCollectionFormat

public IndexedCollectionFormat()
This is the default constructor used to create an IndexedCollectionFormat object.

IndexedCollectionFormat

public IndexedCollectionFormat(java.lang.String aName)
                        throws java.io.IOException
This is the constructor used by the externalizer to create an IndexedCollectionFormat object
Parameters:
aName - java.lang.String
Method Detail

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Extracts an element a number of times equal to the timesRepeat attribute.
Overrides:
extract in class FormatElement
Parameters:
aString - java.lang.String
Returns:
java.lang.String[]

format

public java.lang.String format(DataElement aDataElement)
                        throws DSEInvalidClassException,
                               DSEInvalidRequestException,
                               DSEInvalidArgumentException
Verifies that the passed DataElement is an IndexedCollection and then calls formatIndexedCollection().
Overrides:
format in class FormatElement
Tags copied from class: FormatElement
Parameters:
aDataElement - DataElement
Returns:
String

formatIndexedCollection

public java.lang.String formatIndexedCollection(IndexedCollection anIndexedCollection)
                                         throws DSEInvalidClassException,
                                                DSEInvalidRequestException,
                                                DSEInvalidArgumentException
Formats the IndexedCollection elements according to the FormatElement in the element attribute
Parameters:
anIndexedCollection - IndexedCollection
Returns:
String

getAppend

public java.lang.String getAppend()
Returns the value of the append property.
Returns:
String - The current value of append.

getElement

public FormatElement getElement()
Returns the value of element.
Returns:
com.ibm.dse.base.FormatElement

getTimesRepeat

public int getTimesRepeat()
Returns the value of timesRepeat.
Returns:
int

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException
Initializes an IndexedCollectionFormat with the Tag attributes.
Overrides:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.dse.base.Tag

setAppend

public void setAppend(java.lang.String aString)
Sets the value of the append property.
Parameters:
aString - String The new value of the property.

setElement

public void setElement(FormatElement aFormatElement)
Sets the value of element.
Parameters:
aFormatElement - com.ibm.dse.base.FormatElement

setTimesRepeat

public void setTimesRepeat(int aNumber)
Sets the value of timesRepeat.
Parameters:
aNumber - int

toStrings

public Vector toStrings()
Returns an SGML representation of the instance.
Overrides:
toStrings in class FormatElement
Returns:
java.lang.String

unformat

public DataElement unformat(java.lang.String aString,
                            DataElement aDataElement)
                     throws DSEInvalidRequestException,
                            DSEInvalidArgumentException
Verifies that the passed DataElement is an IndexedCollection and calls unformatIndexedCollection().
Overrides:
unformat in class FormatElement
Parameters:
aString - String
aDataElement - DataElement
Returns:
DataElement

unformatIndexedCollection

public IndexedCollection unformatIndexedCollection(java.lang.String aString,
                                                   IndexedCollection anIndexedCollection)
                                            throws DSEInvalidRequestException,
                                                   DSEInvalidArgumentException
Update the IndexedCollection elements by interpreting the formatted string.
Parameters:
aString - String
anIndexedCollection - IndexedCollection
Returns:
IndexedCollection