|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.xml.TagClass
public class TagClass
Class corresponding to one XML tag, containing its tag name, attributes, content string and tree of the sub tags.
| Field Summary | |
|---|---|
protected boolean |
fInline
|
| Constructor Summary | |
|---|---|
TagClass()
Creates an empty tag node |
|
TagClass(int line,
java.lang.String name)
Creates tag node with specified name |
|
TagClass(int line,
java.lang.String name,
java.lang.String contentStr)
Creates tag node with specified name and content string |
|
TagClass(java.lang.String name)
Creates tag node with specified name |
|
TagClass(java.lang.String name,
java.lang.String contentStr)
Creates tag node with specified name and content string |
|
| Method Summary | |
|---|---|
void |
addTag(TagClass aTag)
Adds a child tag to this one |
protected void |
appendContent(com.prosyst.util.string.CharBuffer toAppend)
Appends the 'toAppend' CharBuffer content to the content buffer |
protected void |
appendContent(java.lang.String toAppend)
Appends the 'toAppend' string to the content buffer |
java.lang.String |
getAttribute(java.lang.String attrName)
Returns an attribute value for an attribute with a given name (attrName) |
java.lang.String |
getAttributes()
Returns string with all attribute names and values of the tag, as is in the XML content. |
java.lang.String |
getContent()
Returns content string of the tag |
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. |
protected com.prosyst.util.string.CharBuffer |
getContentBuffer()
Returns the internal content buffer |
int |
getLine()
Returns the line in the XML file where the tags begin. |
java.lang.String |
getName()
Returns name of the tag |
TagClass |
getTagAt(int aPos)
Returns sub tag of this one at a given position |
protected void |
setInline()
|
protected void |
setLine(int aLine)
Sets the tag line number (the line in the XML file where the current tag starts) |
protected void |
setName(java.lang.String aName)
Sets the name of the tag |
int |
size()
Returns children tags count |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean fInline
| Constructor Detail |
|---|
public TagClass()
public TagClass(java.lang.String name)
name - tag name
public TagClass(int line,
java.lang.String name)
line - the line in the XML file where the tags begin.name - tag name
public TagClass(java.lang.String name,
java.lang.String contentStr)
name - tag namecontentStr - content string of the tag
public TagClass(int line,
java.lang.String name,
java.lang.String contentStr)
line - the line in the XML file where the tags begin.name - tag namecontentStr - content string of the tag| Method Detail |
|---|
protected void appendContent(com.prosyst.util.string.CharBuffer toAppend)
toAppend - CharBuffer content to appendprotected void appendContent(java.lang.String toAppend)
toAppend - string to appendpublic java.lang.String getContent()
public java.lang.String getContent(int aPos,
java.lang.String aName)
aPos - index of the tag in its parent listaName - the name of the tag
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 nameprotected com.prosyst.util.string.CharBuffer getContentBuffer()
public java.lang.String getName()
protected void setName(java.lang.String aName)
aName - name of the tagpublic java.lang.String getAttributes()
public java.lang.String getAttribute(java.lang.String attrName)
attrName - the name of attribute
java.lang.NullPointerException - if attrName is nullpublic void addTag(TagClass aTag)
aTag - a tag to be added as a child tagpublic TagClass getTagAt(int aPos)
aPos - position of the searched tag
public int size()
public int getLine()
protected void setLine(int aLine)
aLine - current tag line numberprotected void setInline()
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||