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

Variable Index

 o dmAlias
 o dmAttributes
 o dmBuf
 o dmContent
 o dmDocument
 o dmEndRequired
 o dmIdent
 o dmLevel
 o dmName
 o dmParent
 o dmSourceLine
 o dmTabSize

Constructor Index

 o Tag()
Constructor
 o Tag(Document, String, int)
Constructor
 o Tag(Tag, String)
Constructor

Method Index

 o addAttribute(String, String)
Creates an attribute object with the given params.
 o addContent(Content)
Adds the given content object.
 o getAlias()
 o getAttribute(String)
Return the attribute with the given name.
 o getAttributesToString()
Iterates through the attributes concatinating them into a buffer in SGML format.
 o getAttributesToStringBuffer(StringBuffer)
Iterates through the attributes concatinating them into a buffer in SGML format.
 o getAttributeValue(String)
Returns the value of the attribute with the given name.
 o getContentToString()
Iterates through the content concatinating them into a buffer in SGML format.
 o getContentToStringBuffer(StringBuffer)
Iterates through the content concatinating them into a buffer in SGML format.
 o getDocument()
 o getLevel()
 o getName()
 o getSourceLine()
 o 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.
 o isEndRequired()
 o isVisible()
 o removeAttribute(String)
Removes the attribute with the given name.
 o removeContent()
 o setAlias(String)
 o setAttributeValue(String, String)
Finds the attribute with the given name and sets its value to the given value.
 o setDocument(Document)
 o setEndRequired(boolean)
 o setLevel(int)
 o setName(String)
 o setSourceLine(int)
 o toString()
Returns the tag as a string of SGML including its attributes and embeded content.
 o toStringBuffer(StringBuffer)
Returns the tag as a string of SGML including its attributes and embeded content.

Variables

 o dmTabSize
 public static final String dmTabSize
 o dmParent
 protected Tag dmParent
 o dmDocument
 protected Document dmDocument
 o dmName
 protected String dmName
 o dmAlias
 protected String dmAlias
 o dmLevel
 protected int dmLevel
 o dmAttributes
 protected Hashtable dmAttributes
 o dmContent
 protected Vector dmContent
 o dmSourceLine
 protected int dmSourceLine
 o dmBuf
 protected StringBuffer dmBuf
 o dmIdent
 protected StringBuffer dmIdent
 o dmEndRequired
 protected boolean dmEndRequired

Constructors

 o Tag
 public Tag()
Constructor

 o Tag
 public Tag(Tag parent,
            String name)
Constructor

 o Tag
 public Tag(Document doc,
            String name,
            int level)
Constructor

Methods

 o 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.

 o getDocument
 public Document getDocument()
 o getName
 public String getName()
 o getAlias
 public String getAlias()
 o getLevel
 public int getLevel()
 o getSourceLine
 public int getSourceLine()
 o isEndRequired
 public boolean isEndRequired()
 o setName
 public void setName(String name)
 o setAlias
 public void setAlias(String alias)
 o setDocument
 public void setDocument(Document doc)
 o setSourceLine
 public void setSourceLine(int line)
 o setEndRequired
 public void setEndRequired(boolean set)
 o setLevel
 public void setLevel(int level)
 o removeContent
 public void removeContent()
 o isVisible
 public boolean isVisible()
 o 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.
 o getAttribute
 public Attribute getAttribute(String name)
Return the attribute with the given name.

Parameters:
name - the attribute name.
Returns:
the atribute.
 o removeAttribute
 public void removeAttribute(String name)
Removes the attribute with the given name.

Parameters:
name - the attribute name.
 o 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.
 o 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.
 o addContent
 public void addContent(Content content)
Adds the given content object.

Parameters:
content - the content object.
 o getAttributesToString
 public String getAttributesToString()
Iterates through the attributes concatinating them into a buffer in SGML format.

Returns:
the attributes
 o getContentToString
 public String getContentToString()
Iterates through the content concatinating them into a buffer in SGML format.

Returns:
the content
 o 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
 o getAttributesToStringBuffer
 public void getAttributesToStringBuffer(StringBuffer buf)
Iterates through the attributes concatinating them into a buffer in SGML format.

Parameters:
buf - the string buffer.
 o getContentToStringBuffer
 public void getContentToStringBuffer(StringBuffer buf)
Iterates through the content concatinating them into a buffer in SGML format.

Parameters:
buf - the string buffer.
 o 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