de.fzi.XPath
Class NodeType

java.lang.Object
  |
  +--de.fzi.XPath.NodeTest
        |
        +--de.fzi.XPath.NodeType

public class NodeType
extends NodeTest

NodeType class.


Field Summary
static int COMMENT
          Comment node type.
static int INVALID
          Invalid node type.
static int NODE
          Any node type.
static int PROCESSING_INSTRUCTION
          PI node type.
static int TEXT
          Text node type.
 
Constructor Summary
NodeType(java.lang.String newName)
          Constructs NodeType for given name.
NodeType(java.lang.String newName, java.lang.String newValue)
          Constructs NodeType for given name and value (a case of processing-instruction).
 
Method Summary
 int getNodeType()
          Returns node type code for this NodeType instance.
static int getNodeType(java.lang.String NodeTypeName)
          Returns node type code for given name.
 java.lang.String getNodeTypeName()
          Returns node type name for this NodeType instance.
static java.lang.String getNodeTypeName(int nodetype)
          Returns node type name for given node type code.
 java.lang.String toString()
          Returns string representation of this NodeType instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INVALID

public static final int INVALID
Invalid node type.

COMMENT

public static final int COMMENT
Comment node type.

TEXT

public static final int TEXT
Text node type.

PROCESSING_INSTRUCTION

public static final int PROCESSING_INSTRUCTION
PI node type.

NODE

public static final int NODE
Any node type.
Constructor Detail

NodeType

public NodeType(java.lang.String newName)
Constructs NodeType for given name.
Parameters:
newName - name of node type.

NodeType

public NodeType(java.lang.String newName,
                java.lang.String newValue)
Constructs NodeType for given name and value (a case of processing-instruction).
Parameters:
newName - name of node type (should be "processing-instruction").
newValue - value of node type.
Method Detail

getNodeType

public static int getNodeType(java.lang.String NodeTypeName)
Returns node type code for given name.
Parameters:
NodeTypeName - name of node type.
Returns:
Returns node type code.

getNodeTypeName

public static java.lang.String getNodeTypeName(int nodetype)
Returns node type name for given node type code.
Parameters:
node - type code.
Returns:
Returns node type name.

getNodeTypeName

public java.lang.String getNodeTypeName()
Returns node type name for this NodeType instance.
Returns:
Returns node type name.

getNodeType

public int getNodeType()
Returns node type code for this NodeType instance.
Returns:
Returns node type code.

toString

public java.lang.String toString()
Returns string representation of this NodeType instance.
Overrides:
toString in class java.lang.Object
Returns:
String representation.