org.exolab.castor.builder.info
Class XMLInfo
java.lang.Object
org.exolab.castor.builder.info.XMLInfo
public class XMLInfo
extends java.lang.Object
A class for storing XML related information.
$Revision: 6678 $ $Date: 2006-02-23 01:37:50 -0700 (Thu, 23 Feb 2006) $
XMLInfo() - Creates a new XML Info.
|
XMLInfo(String name, short nodeType) - Creates a new XMLInfo with the given XML name and node type.
|
XMLInfo(short nodeType) - Creates a new XMLInfo with the given node type.
|
String | getNamespacePrefix() - Returns the namespace prefix of the object described by this XMLInfo.
|
String | getNamespaceURI() - Returns the namespace URI of the object described by this XMLInfo.
|
String | getNodeName() - Returns the XML name for the object described by this XMLInfo.
|
short | getNodeType() - Returns the node type for the object described by this XMLInfo.
|
String | getNodeTypeName() - Returns the string name of the nodeType, either "attribute", "element" or
"text".
|
XSType | getSchemaType() - Returns the XML Schema type for the described object.
|
boolean | isElementDefinition() - Returns true if XSD is global element or element with anonymous type.
|
boolean | isMultivalued() - Return whether or not the object described by this XMLInfo is
multi-valued (appears more than once in the XML document).
|
boolean | isRequired() - Return true if the XML object described by this XMLInfo must appear at
least once in the XML document (or object model).
|
void | setElementDefinition(boolean elementDef) - Sets whether or not XSD is element or not.
|
void | setMultivalued(boolean multivalued) - Sets whether the XML object can appear more than once in the XML document.
|
void | setNamespacePrefix(String nsPrefix) - Sets the desired namespace prefix for this XMLInfo There is no guarantee
that this prefix will be used.
|
void | setNamespaceURI(String nsURI) - Sets the Namespace URI for this XMLInfo.
|
void | setNodeName(String name) - Sets the XML name of the object described by this XMLInfo.
|
void | setNodeType(short nodeType) - Sets the nodeType for this XMLInfo.
|
void | setRequired(boolean required) - Sets whether or not the XML object must appear at least once.
|
void | setSchemaType(XSType xsType) - Sets the XML Schema type for this XMLInfo.
|
ATTRIBUTE_TYPE
public static final short ATTRIBUTE_TYPE
Represents the attribute node type.
CHOICE_NODE_NAME_ERROR_INDICATION
public static final String CHOICE_NODE_NAME_ERROR_INDICATION
Identifies the node name for a choice group.
ELEMENT_TYPE
public static final short ELEMENT_TYPE
Represents the element node type.
TEXT_TYPE
public static final short TEXT_TYPE
Represents the text node type.
XMLInfo
public XMLInfo()
Creates a new XML Info.
XMLInfo
public XMLInfo(String name,
short nodeType)
Creates a new XMLInfo with the given XML name and node type.
name
- the xml node namenodeType
- the nodeType which this XMLInfo represents
XMLInfo
public XMLInfo(short nodeType)
Creates a new XMLInfo with the given node type.
nodeType
- the nodeType which this XMLInfo represents
getNamespacePrefix
public final String getNamespacePrefix()
Returns the namespace prefix of the object described by this XMLInfo.
- the namespace prefix of the object described by this XMLInfo
getNamespaceURI
public final String getNamespaceURI()
Returns the namespace URI of the object described by this XMLInfo.
- the namespace URI of the object described by this XMLInfo
getNodeName
public final String getNodeName()
Returns the XML name for the object described by this XMLInfo.
- the XML name for the object described by this XMLInfo, or null if
no name has been set
getNodeType
public final short getNodeType()
Returns the node type for the object described by this XMLInfo.
- the node type for the object described by this XMLInfo
getNodeTypeName
public final String getNodeTypeName()
Returns the string name of the nodeType, either "attribute", "element" or
"text".
- the name of the node-type of the object described by this
XMLInfo.
getSchemaType
public final XSType getSchemaType()
Returns the XML Schema type for the described object.
isElementDefinition
public final boolean isElementDefinition()
Returns true if XSD is global element or element with anonymous type.
isMultivalued
public boolean isMultivalued()
Return whether or not the object described by this XMLInfo is
multi-valued (appears more than once in the XML document).
- true if this object can appear more than once.
isRequired
public final boolean isRequired()
Return true if the XML object described by this XMLInfo must appear at
least once in the XML document (or object model).
- true if the XML object must appear at least once.
setElementDefinition
public final void setElementDefinition(boolean elementDef)
Sets whether or not XSD is element or not.
elementDef
- The flag indicating whether or not XSD is global
element, element with anonymous type or not.
setMultivalued
public final void setMultivalued(boolean multivalued)
Sets whether the XML object can appear more than once in the XML document.
multivalued
- The boolean indicating whether or not the object can appear
more than once.
setNamespacePrefix
public final void setNamespacePrefix(String nsPrefix)
Sets the desired namespace prefix for this XMLInfo There is no guarantee
that this prefix will be used.
nsPrefix
- the desired namespace prefix
setNamespaceURI
public final void setNamespaceURI(String nsURI)
Sets the Namespace URI for this XMLInfo.
nsURI
- the Namespace URI for this XMLInfo
setNodeName
public final void setNodeName(String name)
Sets the XML name of the object described by this XMLInfo.
name
- the XML node name of the described object.
setNodeType
public final void setNodeType(short nodeType)
Sets the nodeType for this XMLInfo.
nodeType
- the node type of the described object
setRequired
public final void setRequired(boolean required)
Sets whether or not the XML object must appear at least once.
required
- the flag indicating whether or not this XML object is
required
setSchemaType
public final void setSchemaType(XSType xsType)
Sets the XML Schema type for this XMLInfo.
xsType
- the XML Schema type
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com