Package net.ontopia.utils.ontojsp
Class JSPTreeNode
- java.lang.Object
-
- net.ontopia.utils.ontojsp.JSPTreeNode
-
- All Implemented Interfaces:
JSPTreeNodeIF
public class JSPTreeNode extends Object implements JSPTreeNodeIF
INTERNAL: Tree node representing a JSP tag.- See Also:
JSPContentHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>attrprotected List<JSPTreeNodeIF>childrenprotected booleandontCloneTagsprotected Stringnameprotected JSPTreeNodeIFparentprotected javax.servlet.jsp.tagext.TagSupporttag
-
Constructor Summary
Constructors Constructor Description JSPTreeNode(String name, JSPTreeNodeIF parent)JSPTreeNode(String name, JSPTreeNodeIF parent, boolean dontCloneTags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String key, String value)Add a attribute to this JSPTreeNode.voidaddChild(JSPTreeNodeIF node)Adds a child node to this JSPTreeNode.Map<String,String>getAttributes()Returns the attributes for this JSPTreeNode.List<JSPTreeNodeIF>getChildren()Gets the children (ordered) of this JSPTreeNode.StringgetContent()The string content attached to this JSPTreeNode.JSPTreeNodeIFgetParent()Gets the parent node of this JSPTreeNode.javax.servlet.jsp.tagext.TagSupportgetTag()Gets the tag that this JSPTreeNode represents.StringgetTagName()Gets the tag name that this JSPTreeNode represents.JSPTreeNodeIFmakeClone()Returns a node of the same class with the same internal state, but with a different tag object internally.voidsetParent(JSPTreeNodeIF parent)Sets the parent node of this JSPTreeNode.voidsetTag(javax.servlet.jsp.tagext.TagSupport tag)Sets the tag which this JSPTreeNode represents.voidsetTagName(String name)Sets the name of the tag which this JSPTreeNode represents.StringtoString()A string representation of this JSPTreeNode.
-
-
-
Field Detail
-
name
protected String name
-
parent
protected JSPTreeNodeIF parent
-
children
protected List<JSPTreeNodeIF> children
-
tag
protected javax.servlet.jsp.tagext.TagSupport tag
-
dontCloneTags
protected final boolean dontCloneTags
-
-
Constructor Detail
-
JSPTreeNode
public JSPTreeNode(String name, JSPTreeNodeIF parent)
-
JSPTreeNode
public JSPTreeNode(String name, JSPTreeNodeIF parent, boolean dontCloneTags)
-
-
Method Detail
-
getAttributes
public Map<String,String> getAttributes()
Description copied from interface:JSPTreeNodeIFReturns the attributes for this JSPTreeNode.- Specified by:
getAttributesin interfaceJSPTreeNodeIF
-
addAttribute
public void addAttribute(String key, String value)
Description copied from interface:JSPTreeNodeIFAdd a attribute to this JSPTreeNode.- Specified by:
addAttributein interfaceJSPTreeNodeIF
-
setTagName
public void setTagName(String name)
Description copied from interface:JSPTreeNodeIFSets the name of the tag which this JSPTreeNode represents.- Specified by:
setTagNamein interfaceJSPTreeNodeIF
-
getTagName
public String getTagName()
Description copied from interface:JSPTreeNodeIFGets the tag name that this JSPTreeNode represents.- Specified by:
getTagNamein interfaceJSPTreeNodeIF
-
getTag
public javax.servlet.jsp.tagext.TagSupport getTag()
Description copied from interface:JSPTreeNodeIFGets the tag that this JSPTreeNode represents.- Specified by:
getTagin interfaceJSPTreeNodeIF
-
setTag
public void setTag(javax.servlet.jsp.tagext.TagSupport tag)
Description copied from interface:JSPTreeNodeIFSets the tag which this JSPTreeNode represents.- Specified by:
setTagin interfaceJSPTreeNodeIF
-
getParent
public JSPTreeNodeIF getParent()
Description copied from interface:JSPTreeNodeIFGets the parent node of this JSPTreeNode.- Specified by:
getParentin interfaceJSPTreeNodeIF
-
setParent
public void setParent(JSPTreeNodeIF parent)
Description copied from interface:JSPTreeNodeIFSets the parent node of this JSPTreeNode.- Specified by:
setParentin interfaceJSPTreeNodeIF
-
addChild
public void addChild(JSPTreeNodeIF node)
Description copied from interface:JSPTreeNodeIFAdds a child node to this JSPTreeNode.- Specified by:
addChildin interfaceJSPTreeNodeIF
-
getChildren
public List<JSPTreeNodeIF> getChildren()
Description copied from interface:JSPTreeNodeIFGets the children (ordered) of this JSPTreeNode.- Specified by:
getChildrenin interfaceJSPTreeNodeIF
-
getContent
public String getContent()
Description copied from interface:JSPTreeNodeIFThe string content attached to this JSPTreeNode.- Specified by:
getContentin interfaceJSPTreeNodeIF
-
toString
public String toString()
Description copied from interface:JSPTreeNodeIFA string representation of this JSPTreeNode.- Specified by:
toStringin interfaceJSPTreeNodeIF- Overrides:
toStringin classObject
-
makeClone
public JSPTreeNodeIF makeClone()
Description copied from interface:JSPTreeNodeIFReturns a node of the same class with the same internal state, but with a different tag object internally. Calling this method 'makeClone' instead of 'clone' so we can override the return type (we want Eiffel, NOW!).- Specified by:
makeClonein interfaceJSPTreeNodeIF
-
-