com.amx.duet.tools.xml
Class Tag

java.lang.Object
  extended bycom.amx.duet.tools.xml.Tag

public class Tag
extends java.lang.Object

The Tag class was created to hold the properties and attributes of an XML tag object, but it could also be used to hold tag information for HTML tags and other user defined tags.

Attributes are stored in a list of Attribute objects that will store information for each of the individual attributes.

Since:
AMXTools 1.0.0
Version:
1.0.2

Constructor Summary
Tag(java.lang.String sName)
          Ensure that we will always have a tag name
 
Method Summary
 void addAttribute(Attribute attr)
          Add an Attribute object to this tag
 void clearAttributes()
          Clear all of the attributes listed for this tag
 void dump()
          Outputs all of the tag data to the print stream
 boolean equals(java.lang.Object obj)
           
 Attribute getAttribute(int index)
          Retrieve a single attribute at the asking index position for this tag
 Attribute getAttribute(java.lang.String attrName)
          Retrieve a single attribute matching the name for this attribute
 int getAttributeCount()
          Retrieve the number of attributes for this tag
 java.util.Vector getAttributes()
          Retrieve the entire list of attributes for this tag
 int getColumnNumber()
          Retrieve the file column number of this tag
 int getDepth()
          Retrieve the depth count for this tag
 int getLineNumber()
          Retrieve the file line number of this tag
 java.lang.String getName()
          Retrieve the name of this tag
 java.lang.String getNameSpace()
          Retrieve the name space for this tag
 java.lang.String getPositionDescription()
          Retrieve a description of the position for this tag
 java.lang.String getPrefix()
          Retrieve the prefix value of this tag
 java.lang.String getText()
          Retrieve the text contained within start and end of the tag set that this Tag object was created from.
 void setColumnNumber(int nColumn)
          Set the file column number of this tag.
 void setDepth(int nDepth)
          Set the XML tag depth count of this tag.
 void setLineNumber(int nLine)
          Set the file line number of this tag.
 void setName(java.lang.String sName)
          Set the name of this tag.
 void setNameSpace(java.lang.String sNameSpace)
          Set the name space for this tag.
 void setPositionDescription(java.lang.String sDescription)
          Set the position description for this tag.
 void setPrefix(java.lang.String sPrefix)
          Set the prefix value for this tag.
 void setText(java.lang.String sText)
          Set the tag set text of this tag.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tag

public Tag(java.lang.String sName)
Ensure that we will always have a tag name

Parameters:
sName - String
Method Detail

getAttributeCount

public int getAttributeCount()
Retrieve the number of attributes for this tag

Returns:
int containing the number of attributes for this tag

getAttributes

public java.util.Vector getAttributes()
Retrieve the entire list of attributes for this tag

Returns:
Vector containing a list of all the attributes for this tag

getAttribute

public Attribute getAttribute(int index)
Retrieve a single attribute at the asking index position for this tag

Parameters:
index -
Returns:
Attribute object that contains all of the information that makes up a single attribute

getAttribute

public Attribute getAttribute(java.lang.String attrName)
Retrieve a single attribute matching the name for this attribute

Returns:
Attribute object that contains all of the information that makes up a single attribute

addAttribute

public void addAttribute(Attribute attr)
Add an Attribute object to this tag

Parameters:
attr - Attribute

clearAttributes

public void clearAttributes()
Clear all of the attributes listed for this tag


getColumnNumber

public int getColumnNumber()
Retrieve the file column number of this tag

Returns:
int value of the current column

getDepth

public int getDepth()
Retrieve the depth count for this tag

Returns:
int value of the current depth

getLineNumber

public int getLineNumber()
Retrieve the file line number of this tag

Returns:
int value of the current line number

getName

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

Returns:
String value of the tag name

getNameSpace

public java.lang.String getNameSpace()
Retrieve the name space for this tag

Returns:
String value of the tag name space

getPositionDescription

public java.lang.String getPositionDescription()
Retrieve a description of the position for this tag

Returns:
String containing the description of this position

getPrefix

public java.lang.String getPrefix()
Retrieve the prefix value of this tag

Returns:
String containing the prefix for this tag

getText

public java.lang.String getText()
Retrieve the text contained within start and end of the tag set that this Tag object was created from.

Returns:
String value of the text within a complete tag set

setColumnNumber

public void setColumnNumber(int nColumn)
Set the file column number of this tag. This should only be called by the parser.

Parameters:
nColumn - int

setDepth

public void setDepth(int nDepth)
Set the XML tag depth count of this tag. This should only be called by the parser.

Parameters:
nDepth - int

setLineNumber

public void setLineNumber(int nLine)
Set the file line number of this tag. This should only be called by the parser.

Parameters:
nLine - int

setName

public void setName(java.lang.String sName)
Set the name of this tag.

Parameters:
sName - String

setNameSpace

public void setNameSpace(java.lang.String sNameSpace)
Set the name space for this tag.

Parameters:
sNameSpace - String

setPositionDescription

public void setPositionDescription(java.lang.String sDescription)
Set the position description for this tag.

Parameters:
sDescription - String

setPrefix

public void setPrefix(java.lang.String sPrefix)
Set the prefix value for this tag. This should only be called by the parser.

Parameters:
sPrefix - String

setText

public void setText(java.lang.String sText)
Set the tag set text of this tag.

Parameters:
sText - String

dump

public void dump()
Outputs all of the tag data to the print stream


toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)


Copyright © 2008 AMX LLC. All Rights Reserved.