Framework Professional Edition Package


com.prosyst.util.xml
Interface Tag


public interface Tag

Author:
Ivan Dimitrov

Method Summary
 java.lang.String getAttribute(java.lang.String aAttrName)
          Returns an attribute value for an attribute with a given name (aAttrName)
 java.util.Enumeration getAttributeNames()
          Returns an Enumeration of all the attributes' names for attributes belong to the tag object
 java.util.Enumeration getAttributeValues()
          Returns an Enumeration that contains the attribute values for the attributes that belong to the tag object
 java.lang.String getContent()
          Returns a tag content
 java.lang.String getContent(int aPos, java.lang.String aName)
          Returns the content of a child tag with index position equals to aPos but only if its name is equal to aName.
 int getLine()
          Returns the line in the XML file where the tag definition starts
 java.lang.String getName()
          Returns the name of the tag
 Tag getTagAt(int aPosition)
          Returns the child tag at a given position in order that is equivalent to the order of child tags defined in the XML file
 int size()
          Returns the number of the child tags of this tag
 

Method Detail

getAttribute

java.lang.String getAttribute(java.lang.String aAttrName)
Returns an attribute value for an attribute with a given name (aAttrName)

Parameters:
aAttrName - the name of attribute
Returns:
Attribute value for attribute with name given by attrName or null if there is no such an attribute

getAttributeNames

java.util.Enumeration getAttributeNames()
Returns an Enumeration of all the attributes' names for attributes belong to the tag object

Returns:
Enumeration that contains the attribute names of the attributes for this tag. If there is no attributes then the method returns Empty enumeration

getAttributeValues

java.util.Enumeration getAttributeValues()
Returns an Enumeration that contains the attribute values for the attributes that belong to the tag object

Returns:
EEnumeration that contains the attribute values for the attributes that belong to the tag object. If there is no attributes then the method returns Empty enumeration

getName

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

Returns:
the name of the tag

getContent

java.lang.String getContent()
Returns a tag content

Returns:
tag content. If the tag does not have a content, the method returns empty string

getLine

int getLine()
Returns the line in the XML file where the tag definition starts

Returns:
the line in the XML file where the tag definition starts

size

int size()
Returns the number of the child tags of this tag

Returns:
child tags number

getTagAt

Tag getTagAt(int aPosition)
Returns the child tag at a given position in order that is equivalent to the order of child tags defined in the XML file

Parameters:
aPosition - child tag's position
Returns:
the child tag at a given position

getContent

java.lang.String getContent(int aPos,
                            java.lang.String aName)
Returns the content of a child tag with index position equals to aPos but only if its name is equal to aName. Otherwise the method throws an exception

Parameters:
aPos - index of the tag in its parent list
aName - the name of the tag
Returns:
tag content
Throws:
java.lang.NullPointerException - if there is no tag on the given position
java.lang.IllegalArgumentException - if the name of the tag on the given position does not match the requested name

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved