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 String
content
protected JSPTreeNodeIF
parent
-
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 void
addAttribute(String key, String value)
Add a attribute to this JSPTreeNode.void
addChild(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.String
getContent()
The string content attached to this JSPTreeNode.JSPTreeNodeIF
getParent()
Gets the parent node of this JSPTreeNode.javax.servlet.jsp.tagext.TagSupport
getTag()
Gets the tag that this JSPTreeNode represents.String
getTagName()
Gets the tag name that this JSPTreeNode represents.JSPTreeNodeIF
makeClone()
Returns a node of the same class with the same internal state, but with a different tag object internally.void
setContent(String content)
void
setParent(JSPTreeNodeIF parent)
Sets the parent node of this JSPTreeNode.void
setTag(javax.servlet.jsp.tagext.TagSupport tag)
Sets the tag which this JSPTreeNode represents.void
setTagName(String name)
Sets the name of the tag which this JSPTreeNode represents.String
toString()
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:JSPTreeNodeIF
Returns the attributes for this JSPTreeNode.- Specified by:
getAttributes
in interfaceJSPTreeNodeIF
-
addAttribute
public void addAttribute(String key, String value)
Description copied from interface:JSPTreeNodeIF
Add a attribute to this JSPTreeNode.- Specified by:
addAttribute
in interfaceJSPTreeNodeIF
-
setTagName
public void setTagName(String name)
Description copied from interface:JSPTreeNodeIF
Sets the name of the tag which this JSPTreeNode represents.- Specified by:
setTagName
in interfaceJSPTreeNodeIF
-
getTagName
public String getTagName()
Description copied from interface:JSPTreeNodeIF
Gets the tag name that this JSPTreeNode represents.- Specified by:
getTagName
in interfaceJSPTreeNodeIF
-
getTag
public javax.servlet.jsp.tagext.TagSupport getTag()
Description copied from interface:JSPTreeNodeIF
Gets the tag that this JSPTreeNode represents.- Specified by:
getTag
in interfaceJSPTreeNodeIF
-
setTag
public void setTag(javax.servlet.jsp.tagext.TagSupport tag)
Description copied from interface:JSPTreeNodeIF
Sets the tag which this JSPTreeNode represents.- Specified by:
setTag
in interfaceJSPTreeNodeIF
-
getParent
public JSPTreeNodeIF getParent()
Description copied from interface:JSPTreeNodeIF
Gets the parent node of this JSPTreeNode.- Specified by:
getParent
in interfaceJSPTreeNodeIF
-
setParent
public void setParent(JSPTreeNodeIF parent)
Description copied from interface:JSPTreeNodeIF
Sets the parent node of this JSPTreeNode.- Specified by:
setParent
in interfaceJSPTreeNodeIF
-
addChild
public void addChild(JSPTreeNodeIF node)
Description copied from interface:JSPTreeNodeIF
Adds a child node to this JSPTreeNode.- Specified by:
addChild
in interfaceJSPTreeNodeIF
-
getChildren
public List<JSPTreeNodeIF> getChildren()
Description copied from interface:JSPTreeNodeIF
Gets the children (ordered) of this JSPTreeNode.- Specified by:
getChildren
in interfaceJSPTreeNodeIF
-
getContent
public String getContent()
Description copied from interface:JSPTreeNodeIF
The string content attached to this JSPTreeNode.- Specified by:
getContent
in interfaceJSPTreeNodeIF
-
setContent
public void setContent(String content)
-
toString
public String toString()
Description copied from interface:JSPTreeNodeIF
A string representation of this JSPTreeNode.- Specified by:
toString
in interfaceJSPTreeNodeIF
- Overrides:
toString
in classObject
-
makeClone
public JSPTreeNodeIF makeClone()
Description copied from interface:JSPTreeNodeIF
Returns 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:
makeClone
in interfaceJSPTreeNodeIF
-
-