Package net.ontopia.utils.ontojsp
Class JSPContentTreeNode
- java.lang.Object
-
- net.ontopia.utils.ontojsp.JSPContentTreeNode
-
- All Implemented Interfaces:
JSPTreeNodeIF
public class JSPContentTreeNode extends Object implements JSPTreeNodeIF
INTERNAL: The Ontopia JSPTreeNode class. This class is the node of the JSPTree build by the JSPContentHandler.- See Also:
JSPContentHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringcontentprotected JSPTreeNodeIFparent
-
Constructor Summary
Constructors Constructor Description JSPContentTreeNode(JSPTreeNodeIF parent, String content)Constructor that accepts the parent of this JSPTreeNode as an argument.
-
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.voidsetContent(String content)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
-
content
protected String content
-
parent
protected JSPTreeNodeIF parent
-
-
Constructor Detail
-
JSPContentTreeNode
public JSPContentTreeNode(JSPTreeNodeIF parent, String content)
Constructor that accepts the parent of this JSPTreeNode as an argument. If this is the root node, the parent should null.
-
-
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
-
setContent
public void setContent(String content)
-
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
-
-