org.exolab.castor.xml
Class NodeType

java.lang.Object
  |
  +--org.exolab.castor.xml.NodeType

public class NodeType
extends java.lang.Object

The possible node types for an XML field. A field can be represented as an attribute, an element or text content. The default is attribute.

Version:
$Revision: 1.2 $ $Date: 2000/11/04 01:31:14 $
Author:
Assaf Arkin, Keith Visco

Field Summary
static NodeType Attribute
          Attribute node type (attribute).
static short ATTRIBUTE
          The attribute type
static NodeType Element
          Element node type (element).
static short ELEMENT
          The element type
static NodeType Text
          Content node type (text).
static short TEXT
          The text type
 
Method Summary
static NodeType getNodeType(java.lang.String nodeType)
          Returns the node type from the name.
 short getType()
          Returns the type of this NodeType
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTRIBUTE

public static final short ATTRIBUTE
The attribute type

ELEMENT

public static final short ELEMENT
The element type

TEXT

public static final short TEXT
The text type

Attribute

public static final NodeType Attribute
Attribute node type (attribute). This field will appear in the XML document as an element's attribute.

Element

public static final NodeType Element
Element node type (element). This field will appear in the XML document as a contained element.

Text

public static final NodeType Text
Content node type (text). This field will appear in the XML document as the element text content.
Method Detail

getNodeType

public static NodeType getNodeType(java.lang.String nodeType)
Returns the node type from the name. If nodeType is null, return the default node type (Attribute). Otherwise returns the named node type mode.
Parameters:
nodeType - The node type name
Returns:
The node type

getType

public short getType()
Returns the type of this NodeType
Returns:
the type of this NodeType

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com