org.exolab.castor.xml

Class NodeType

public class NodeType extends 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.1.1.1 $ $Date: 2003/03/03 07:09:12 $

Author: Assaf Arkin Keith Visco

Field Summary
static NodeTypeAttribute
Attribute node type (attribute).
static shortATTRIBUTE
The attribute type
static NodeTypeElement
Element node type (element).
static shortELEMENT
The element type
static shortNAMESPACE
The namespace node type
static NodeTypeNamespace
Namespace node type (namespace).
static NodeTypeText
Content node type (text).
static shortTEXT
The text type
Method Summary
static NodeTypegetNodeType(String nodeType)
Returns the node type from the name.
shortgetType()
Returns the type of this NodeType
StringtoString()

Field Detail

Attribute

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

ATTRIBUTE

public static final short ATTRIBUTE
The attribute type

Element

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

ELEMENT

public static final short ELEMENT
The element type

NAMESPACE

public static final short NAMESPACE
The namespace node type

Namespace

public static final NodeType Namespace
Namespace node type (namespace). This field will appear in the XML document as a namespace declaration.

Text

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

TEXT

public static final short TEXT
The text type

Method Detail

getNodeType

public static NodeType getNodeType(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 String toString()
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com