All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.dom.Tag
java.lang.Object
|
+----com.netobjects.nfx.dom.Tag
- public class Tag
- extends Object
- implements Content
Supports modeling of SGML tags.
- Version:
- 1.0
- Author:
- Scott Cinnamond
-
dmAlias
-
-
dmAttributes
-
-
dmBuf
-
-
dmContent
-
-
dmDocument
-
-
dmEndRequired
-
-
dmIdent
-
-
dmLevel
-
-
dmName
-
-
dmParent
-
-
dmSourceLine
-
-
dmTabSize
-
-
Tag()
- Constructor
-
Tag(Document, String, int)
- Constructor
-
Tag(Tag, String)
- Constructor
-
addAttribute(String, String)
- Creates an attribute object with the given params.
-
addContent(Content)
- Adds the given content object.
-
getAlias()
-
-
getAttribute(String)
- Return the attribute with the given name.
-
getAttributesToString()
- Iterates through the attributes concatinating them into
a buffer in SGML format.
-
getAttributesToStringBuffer(StringBuffer)
- Iterates through the attributes concatinating them into
a buffer in SGML format.
-
getAttributeValue(String)
- Returns the value of the attribute with the given name.
-
getContentToString()
- Iterates through the content concatinating them into
a buffer in SGML format.
-
getContentToStringBuffer(StringBuffer)
- Iterates through the content concatinating them into
a buffer in SGML format.
-
getDocument()
-
-
getLevel()
-
-
getName()
-
-
getSourceLine()
-
-
initialize()
- Facilitates performance of the toString() method
in composite tags by providing a hook to be called
after all attributes for the tag have been set.
-
isEndRequired()
-
-
isVisible()
-
-
removeAttribute(String)
- Removes the attribute with the given name.
-
removeContent()
-
-
setAlias(String)
-
-
setAttributeValue(String, String)
- Finds the attribute with the given name and sets its
value to the given value.
-
setDocument(Document)
-
-
setEndRequired(boolean)
-
-
setLevel(int)
-
-
setName(String)
-
-
setSourceLine(int)
-
-
toString()
- Returns the tag as a string of SGML including
its attributes and embeded content.
-
toStringBuffer(StringBuffer)
- Returns the tag as a string of SGML including
its attributes and embeded content.
dmTabSize
public static final String dmTabSize
dmParent
protected Tag dmParent
dmDocument
protected Document dmDocument
dmName
protected String dmName
dmAlias
protected String dmAlias
dmLevel
protected int dmLevel
dmAttributes
protected Hashtable dmAttributes
dmContent
protected Vector dmContent
dmSourceLine
protected int dmSourceLine
dmBuf
protected StringBuffer dmBuf
dmIdent
protected StringBuffer dmIdent
dmEndRequired
protected boolean dmEndRequired
Tag
public Tag()
- Constructor
Tag
public Tag(Tag parent,
String name)
- Constructor
Tag
public Tag(Document doc,
String name,
int level)
- Constructor
initialize
public void initialize() throws AttributeExpectedException
- Facilitates performance of the toString() method
in composite tags by providing a hook to be called
after all attributes for the tag have been set. This allows
us to allocate memory for any embedded tags and
their attributes and any other data which will not
change with repeated toString() calls.
getDocument
public Document getDocument()
getName
public String getName()
getAlias
public String getAlias()
getLevel
public int getLevel()
getSourceLine
public int getSourceLine()
isEndRequired
public boolean isEndRequired()
setName
public void setName(String name)
setAlias
public void setAlias(String alias)
setDocument
public void setDocument(Document doc)
setSourceLine
public void setSourceLine(int line)
setEndRequired
public void setEndRequired(boolean set)
setLevel
public void setLevel(int level)
removeContent
public void removeContent()
isVisible
public boolean isVisible()
addAttribute
public void addAttribute(String name,
String value)
- Creates an attribute object with the given params.
- Parameters:
- name - the attribute name.
- value - the attribute value.
getAttribute
public Attribute getAttribute(String name)
- Return the attribute with the given name.
- Parameters:
- name - the attribute name.
- Returns:
- the atribute.
removeAttribute
public void removeAttribute(String name)
- Removes the attribute with the given name.
- Parameters:
- name - the attribute name.
getAttributeValue
public String getAttributeValue(String name)
- Returns the value of the attribute with the given name.
- Parameters:
- name - the attribute name.
- Returns:
- the attribute value.
setAttributeValue
public void setAttributeValue(String name,
String value)
- Finds the attribute with the given name and sets its
value to the given value.
- Parameters:
- name - the attribute name.
- value - the attribute value.
- Returns:
- true if the value was set.
addContent
public void addContent(Content content)
- Adds the given content object.
- Parameters:
- content - the content object.
getAttributesToString
public String getAttributesToString()
- Iterates through the attributes concatinating them into
a buffer in SGML format.
- Returns:
- the attributes
getContentToString
public String getContentToString()
- Iterates through the content concatinating them into
a buffer in SGML format.
- Returns:
- the content
toString
public String toString()
- Returns the tag as a string of SGML including
its attributes and embeded content.
- Returns:
- the tag as a string
- Overrides:
- toString in class Object
getAttributesToStringBuffer
public void getAttributesToStringBuffer(StringBuffer buf)
- Iterates through the attributes concatinating them into
a buffer in SGML format.
- Parameters:
- buf - the string buffer.
getContentToStringBuffer
public void getContentToStringBuffer(StringBuffer buf)
- Iterates through the content concatinating them into
a buffer in SGML format.
- Parameters:
- buf - the string buffer.
toStringBuffer
public void toStringBuffer(StringBuffer buf)
- Returns the tag as a string of SGML including
its attributes and embeded content.
- Parameters:
- buf - the string buffer.
All Packages Class Hierarchy This Package Previous Next Index