Project 1

cscie259.project1.mf
Class Node

java.lang.Object
  extended by cscie259.project1.mf.Node
Direct Known Subclasses:
Attr, Document, Element, Text

public abstract class Node
extends java.lang.Object

A simplified version of org.w3c.dom.Node. You MAY NOT modify this file.

Version:
7.0
Author:
Computer Science E-259

Field Summary
static int ATTRIBUTE_NODE
          Short code identifying the type of a Attr node.
static int DOCUMENT_NODE
          Short code identifying the type of a Document node.
static int ELEMENT_NODE
          Short code identifying the type of an Element node.
static int TEXT_NODE
          Short code identifying the type of a Text node.
 
Constructor Summary
Node()
           
 
Method Summary
 void appendChild(Node newChild)
          Appends new child to node.
 java.util.List getChildNodes()
          Gets node's children.
 java.lang.String getNodeName()
          Gets node's name.
abstract  int getNodeType()
          Returns code signifying this node's type.
 java.lang.String getNodeValue()
          Gets node's value.
 Node getParentNode()
          Returns node's parent.
 void setNodeName(java.lang.String name)
          Sets node's name.
 void setNodeValue(java.lang.String value)
          Sets node's name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NODE

public static final int ATTRIBUTE_NODE
Short code identifying the type of a Attr node.

See Also:
Constant Field Values

DOCUMENT_NODE

public static final int DOCUMENT_NODE
Short code identifying the type of a Document node.

See Also:
Constant Field Values

ELEMENT_NODE

public static final int ELEMENT_NODE
Short code identifying the type of an Element node.

See Also:
Constant Field Values

TEXT_NODE

public static final int TEXT_NODE
Short code identifying the type of a Text node.

See Also:
Constant Field Values
Constructor Detail

Node

public Node()
Method Detail

appendChild

public void appendChild(Node newChild)
Appends new child to node.

Parameters:
newChild - child to be added

getChildNodes

public java.util.List getChildNodes()
Gets node's children.

Returns:
List of node's children.

getNodeName

public java.lang.String getNodeName()
Gets node's name.

Returns:
node's name.

getNodeType

public abstract int getNodeType()
Returns code signifying this node's type.

Returns:
node's type

getNodeValue

public java.lang.String getNodeValue()
Gets node's value.

Returns:
node's value.

getParentNode

public Node getParentNode()
Returns node's parent.

Returns:
node's parent

setNodeName

public void setNodeName(java.lang.String name)
Sets node's name.

Parameters:
name - node's name

setNodeValue

public void setNodeValue(java.lang.String value)
Sets node's name.

Parameters:
value - node's value

Project 1