IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Class Tag

java.lang.Object
  extended by com.ibm.btt.base.Tag
All Implemented Interfaces:
DSECloneable, java.io.Serializable, java.lang.Cloneable

public class Tag
extends java.lang.Object
implements java.io.Serializable, DSECloneable

Every XML tag, in the files specified in btt.xml, is converted to an instance of this class. A tag is composed of a name and a list of attributes.

See Also:
Serialized Form

Nested Class Summary
static class Tag.TagStringReader
          String Reader for Tag use
 
Field Summary
protected  Vector attrList
           
 java.lang.String name
           
 
Constructor Summary
Tag()
          This is the default constructor used to create a Tag object.
Tag(java.lang.String aString)
          This constructor creates a Tag from a String.
Tag(Tag.TagStringReader aReader)
          new constructor, for object cycling efficiency takes a TagStreamReader that has internal work buffers
 
Method Summary
 void addSubTag(Tag aSubTag)
          Adds a subTag to the tag.
 java.lang.Object clone()
          Returns a new Tag cloned from the current one.
 Vector getAttrList()
          Returns a list of attributes.
 Tag getDecorator(int index)
          Returns the decorator at the specified index.
 Vector getDecorators()
          Returns a list of decorators for the tag (format tag).
 java.lang.String getId()
          Examines the attribute list for the one that has the ID and returns its value.
 java.lang.String getName()
          Returns the name of the tag.
 java.lang.String getSkipCharSet()
          Returns the set of characters used to separate words in XML.
 int getStringIndex()
          Returns the current index inside the tag.
 Tag getSubTag(int index)
          Returns the subTag at the specified index.
 Vector getSubTags()
          Returns a list of subtags.
 boolean hasDecorators()
          Indicates whether the tag contains decorators or not.
 boolean isAComposedTag()
          Indicates whether the Tag is a composed tag or a simple tag.
 boolean isSupported()
          Indicates whether the Tag is supported in the btt.xml file.
 void readExternal(java.io.ObjectInput s)
          Invokes the object creation from an ObjectInput.
 void set(Tag aTag)
          Sets this Tag with the attributes of the Tag passed by parameter.
 void setAttrList(Vector aAttrList)
          Sets the list of attributes.
 void setDecoratorAt(Tag aDecorator, int index)
          Sets the decorator at the specified index of the vector of decorators.
 void setDecorators(Vector someDecorators)
          Sets the list of decorators.
 void setHasDecorators(boolean aBoolean)
          Sets the value of the hasDecorators attribute.
 void setIsAComposedTag(boolean aBoolean)
          Sets the value of the isAComposedTag attribute.
 void setName(java.lang.String aName)
          Sets the name of the tag.
 void setStringIndex(int anIndex)
          Sets the current index inside the tag.
 void setSubTagAt(Tag aSubTag, int index)
          Sets the subTag at the specified index of the vector of subTags.
 void setSubTags(Vector someSubTags)
          Sets the list of subtags.
 java.lang.String toString()
          Shows the Tag in XML format.
 void writeExternal(java.io.ObjectOutput s)
          Provides concrete serialization handling for Context.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

attrList

protected Vector attrList

name

public java.lang.String name
Constructor Detail

Tag

public Tag()
This is the default constructor used to create a Tag object.


Tag

public Tag(java.lang.String aString)
    throws java.io.IOException
This constructor creates a Tag from a String.

Parameters:
aString - java.lang.String
Throws:
java.io.IOException

Tag

public Tag(Tag.TagStringReader aReader)
    throws java.io.IOException
new constructor, for object cycling efficiency takes a TagStreamReader that has internal work buffers

Parameters:
aReader -
Throws:
java.io.IOException
Method Detail

addSubTag

public void addSubTag(Tag aSubTag)
Adds a subTag to the tag.

Parameters:
aSubTag - com.ibm.btt.base.Tag

clone

public java.lang.Object clone()
Returns a new Tag cloned from the current one.

Specified by:
clone in interface DSECloneable
Overrides:
clone in class java.lang.Object
Returns:
java.lang.Object

getAttrList

public Vector getAttrList()
Returns a list of attributes.

Returns:
Vector

getDecorator

public Tag getDecorator(int index)
                 throws java.io.IOException
Returns the decorator at the specified index.

Returns:
com.ibm.btt.base.Tag
Throws:
java.io.IOException.
java.io.IOException

getDecorators

public Vector getDecorators()
Returns a list of decorators for the tag (format tag).

Returns:
com.ibm.btt.base.Vector

getId

public java.lang.String getId()
Examines the attribute list for the one that has the ID and returns its value.

Returns:
java.lang.String

getName

public java.lang.String getName()
Returns the name of the tag.

Returns:
java.lang.String

getSkipCharSet

public java.lang.String getSkipCharSet()
Returns the set of characters used to separate words in XML.

Returns:
java.lang.String

getStringIndex

public int getStringIndex()
Returns the current index inside the tag. The next word will be extracted from this index.

Returns:
int

getSubTag

public Tag getSubTag(int index)
              throws java.io.IOException
Returns the subTag at the specified index.

Returns:
com.ibm.btt.base.Tag
Throws:
java.io.IOException.
java.io.IOException

getSubTags

public Vector getSubTags()
Returns a list of subtags.

Returns:
com.ibm.btt.base.Vector

hasDecorators

public boolean hasDecorators()
Indicates whether the tag contains decorators or not.

Returns:
boolean

isAComposedTag

public boolean isAComposedTag()
Indicates whether the Tag is a composed tag or a simple tag.

Returns:
boolean

isSupported

public boolean isSupported()
Indicates whether the Tag is supported in the btt.xml file.

Returns:
boolean

readExternal

public void readExternal(java.io.ObjectInput s)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Invokes the object creation from an ObjectInput. In the ObjectInput will arrive a context and all its children.

Parameters:
s - java.io.ObjectInput
Throws:
java.io.IOException.
java.lang.ClassNotFoundException.
java.io.IOException
java.lang.ClassNotFoundException

set

public void set(Tag aTag)
Sets this Tag with the attributes of the Tag passed by parameter.


setAttrList

public void setAttrList(Vector aAttrList)
Sets the list of attributes.


setDecoratorAt

public void setDecoratorAt(Tag aDecorator,
                           int index)
                    throws java.io.IOException
Sets the decorator at the specified index of the vector of decorators. The previous decorator at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector.

Throws:
java.io.IOException.
java.io.IOException

setDecorators

public void setDecorators(Vector someDecorators)
Sets the list of decorators.

Parameters:
someDecorators - com.ibm.btt.base.Vector

setHasDecorators

public void setHasDecorators(boolean aBoolean)
Sets the value of the hasDecorators attribute. This attribute indicates whether a tag contains one or more docorators.

Parameters:
aBoolean - boolean

setIsAComposedTag

public void setIsAComposedTag(boolean aBoolean)
Sets the value of the isAComposedTag attribute. This attribute indicates whether a tag is a composed tag or not.

Parameters:
aBoolean - boolean

setName

public void setName(java.lang.String aName)
Sets the name of the tag.

Parameters:
aName - java.lang.String

setStringIndex

public void setStringIndex(int anIndex)
Sets the current index inside the tag. The next word will be extracted from this index.

Parameters:
anIndex - int

setSubTagAt

public void setSubTagAt(Tag aSubTag,
                        int index)
                 throws java.io.IOException
Sets the subTag at the specified index of the vector of subTags. The previous subTag at that position is discarded. The index must be a value greater than or equal to 0 and less than the current size of the vector.

Parameters:
aSubTag - com.ibm.btt.base.Tag
index - int
Throws:
java.io.IOException.
java.io.IOException

setSubTags

public void setSubTags(Vector someSubTags)
Sets the list of subtags.

Parameters:
someSubTags - com.ibm.btt.base.Vector

toString

public java.lang.String toString()
Shows the Tag in XML format.

Overrides:
toString in class java.lang.Object
Returns:
java.lang.String

writeExternal

public void writeExternal(java.io.ObjectOutput s)
                   throws java.io.IOException
Provides concrete serialization handling for Context. Will be serialized the current context and all its children.

Parameters:
s - java.io.ObjectOutput
Throws:
java.io.IOException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010