IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.base
Class Identifier

java.lang.Object
  extended bycom.ibm.btt.base.FormatElement
      extended bycom.ibm.btt.base.FormatDecorator
          extended bycom.ibm.btt.base.Identifier
All Implemented Interfaces:
Cacheable, Externalizable, java.io.Externalizable, java.io.Serializable

public class Identifier
extends FormatDecorator

This decorator prepends a character to the string that identifies the data in the receiver.

See Also:
Serialized Form

Field Summary
 char id
           
static java.lang.String idSet
           
 
Fields inherited from class com.ibm.btt.base.FormatDecorator
decorated
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName, externalizer, name
 
Constructor Summary
Identifier()
          This is the default constructor used to create an Identifier object.
Identifier(java.lang.String aName)
          This is the constructor used by the Externalizer to create an Identifier object.
 
Method Summary
 java.lang.String addDecoration(java.lang.String aString)
          Prepends the ID character to the String.
 java.lang.String[] extract(java.lang.String aString)
          Extracts the String up to the next occurrence of any identifier included in the idSet attribute.
 char getId()
          Returns the value of id.
static java.lang.String getIdSet()
          Returns the value of the idSet attribute.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes an Identifier with the aTag attributes.
 java.lang.String removeDecoration(java.lang.String aString)
          Removes the id character from the beginning of the string.
 void setId(char anId)
          Sets the value of id.
static void setIdSet(java.lang.String aString)
          Sets the value of idSet.
 Vector toStrings()
          Returns a visual representation of this decorator.
 
Methods inherited from class com.ibm.btt.base.FormatDecorator
format, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat, unformat
 
Methods inherited from class com.ibm.btt.base.FormatElement
exceptionInfo, externalizer, getExternalizer, getTagName, isCacheable, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, setSize, toTags, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public char id

idSet

public static java.lang.String idSet
Constructor Detail

Identifier

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


Identifier

public Identifier(java.lang.String aName)
           throws java.io.IOException
This is the constructor used by the Externalizer to create an Identifier object.

Parameters:
aName - java.lang.String
Method Detail

addDecoration

public java.lang.String addDecoration(java.lang.String aString)
Prepends the ID character to the String.

Specified by:
addDecoration in class FormatDecorator

extract

public java.lang.String[] extract(java.lang.String aString)
                           throws DSEInvalidArgumentException
Extracts the String up to the next occurrence of any identifier included in the idSet attribute.

Overrides:
extract in class FormatDecorator
Parameters:
aString - String
Returns:
String[]
Throws:
DSEInvalidArgumentException

getId

public char getId()
Returns the value of id.

Returns:
char

getIdSet

public static java.lang.String getIdSet()
Returns the value of the idSet attribute.

Returns:
java.lang.String

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
Initializes an Identifier with the aTag attributes.

Specified by:
initializeFrom in interface Externalizable
Specified by:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object

removeDecoration

public java.lang.String removeDecoration(java.lang.String aString)
                                  throws DSEInvalidArgumentException
Removes the id character from the beginning of the string.

Specified by:
removeDecoration in class FormatDecorator
Parameters:
aString - String
Returns:
java.lang.String
Throws:
DSEInvalidArgumentException

setId

public void setId(char anId)
Sets the value of id.

Parameters:
anId - char

setIdSet

public static void setIdSet(java.lang.String aString)
Sets the value of idSet.

Parameters:
aString - java.lang.String

toStrings

public Vector toStrings()
Returns a visual representation of this decorator.

Specified by:
toStrings in interface Externalizable
Specified by:
toStrings in class FormatDecorator
Returns:
Vector

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005