com.ibm.dse.base
Class Tag

java.lang.Object
  |
  +--com.ibm.dse.base.Tag

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

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

See Also:
Serialized Form

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.
 
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 SGML.
 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 DSE.INI file.
 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.
 
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
Method Detail

addSubTag

public void addSubTag(Tag aSubTag)
Adds a subTag to the tag.
Parameters:
aSubTag - com.ibm.dse.base.Tag

clone

public java.lang.Object clone()
Returns a new Tag cloned from the current one.
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.
Parameters:
i - int
Returns:
com.ibm.dse.base.Tag
Throws:
java.io.IOException. -  

getDecorators

public Vector getDecorators()
Returns a list of decorators for the tag (format tag).
Returns:
com.ibm.dse.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 SGML.
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.
Parameters:
i - int
Returns:
com.ibm.dse.base.Tag
Throws:
java.io.IOException. -  

getSubTags

public Vector getSubTags()
Returns a list of subtags.
Returns:
com.ibm.dse.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 DSE.INI file.
Returns:
boolean

set

public void set(Tag aTag)
Sets this Tag with the attributes of the Tag passed by parameter.
Parameters:
param - com.ibm.dse.base.Tag

setAttrList

public void setAttrList(Vector aAttrList)
Sets the list of attributes.
Parameters:
aTagAttrList - java.util.Vector

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.
Parameters:
aSubTag - com.ibm.dse.base.Tag
index - int
Throws:
java.io.IOException. -  

setDecorators

public void setDecorators(Vector someDecorators)
Sets the list of decorators.
Parameters:
someDecorators - com.ibm.dse.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.dse.base.Tag
index - int
Throws:
java.io.IOException. -  

setSubTags

public void setSubTags(Vector someSubTags)
Sets the list of subtags.
Parameters:
someSubTags - com.ibm.dse.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