public class BasicNode
extends java.lang.Object
Constructor and Description |
---|
BasicNode()
Construct a Basic Node
|
BasicNode(long node_id,
java.lang.String tagname,
long parent_id,
int nodeIndex)
Construct a Basic Node
|
BasicNode(java.lang.String tagname)
Construct a Basic Node
|
BasicNode(java.lang.String tagname,
long parent_id,
int nodeIndex)
Construct a Basic Node
|
Modifier and Type | Method and Description |
---|---|
void |
addChildNode(BasicNode child)
Add a child node to this node
|
java.lang.String |
getAttribute(java.lang.String attName)
Get an attribute value by name
|
java.lang.String |
getAttributes()
Get the attributes as a string
|
java.util.Enumeration |
getChildren()
Get the an enumeration of the children of this node
|
java.lang.String |
getDocID()
Get the doc id of this node
|
java.lang.String |
getNamespace(java.lang.String prefix)
Get an uri of the namespace prefix
|
long |
getNodeID()
Get the id of this node
|
int |
getNodeIndex()
Get nodeIndex of the node
|
java.lang.String |
getNodeType()
Get the type of this node
|
long |
getParentID()
Get the parent id of this node
|
long |
getRootNodeID()
Get the root node id of this node
|
java.lang.String |
getTagName()
Get the name of this node
|
int |
incChildNum()
increase childNum when new child for the node is created
|
void |
setAttribute(java.lang.String attName,
java.lang.String attValue)
Add a new attribute to this node, or set its value
|
void |
setDocID(java.lang.String doc_id)
Set the doc id of this node
|
void |
setNamespace(java.lang.String prefix,
java.lang.String uri)
Add a namespace to this node
|
void |
setNodeID(long node_id)
Set the id of this node
|
void |
setNodeIndex(int nodeIndex)
Set the node index of this node
|
void |
setNodeType(java.lang.String type)
Set the type of this node
|
void |
setParentID(long parent_id)
Set the parent id of this node
|
void |
setRootNodeID(long rootnode_id)
Set the root node id of this node
|
void |
setTagName(java.lang.String tagname)
Set the name of this node
|
public BasicNode()
public BasicNode(java.lang.String tagname)
tagname
- the name of the nodepublic BasicNode(java.lang.String tagname, long parent_id, int nodeIndex)
tagname
- the name of the nodeparent_id
- the id number of the parent nodenodeIndex
- - index of node among siblings in parent node
Every node initializes childNum to 0 when
created and has interface incChildNum
when new child is createdpublic BasicNode(long node_id, java.lang.String tagname, long parent_id, int nodeIndex)
node_id
- the id number of the nodetagname
- the name of the nodeparent_id
- the id number of the parent nodepublic long getNodeID()
public void setNodeID(long node_id)
public long getParentID()
public void setParentID(long parent_id)
public long getRootNodeID()
public void setRootNodeID(long rootnode_id)
public java.lang.String getDocID()
public void setDocID(java.lang.String doc_id)
public java.lang.String getTagName()
public void setTagName(java.lang.String tagname)
public java.lang.String getAttributes()
public void setAttribute(java.lang.String attName, java.lang.String attValue)
public java.lang.String getAttribute(java.lang.String attName)
public void setNamespace(java.lang.String prefix, java.lang.String uri)
public java.lang.String getNamespace(java.lang.String prefix)
public int getNodeIndex()
public void setNodeIndex(int nodeIndex)
public java.lang.String getNodeType()
public void setNodeType(java.lang.String type)
public void addChildNode(BasicNode child)
public java.util.Enumeration getChildren()
public int incChildNum()
Copyright © 2020 Regents of the University of California. All Rights Reserved.