com.jaxfront.core.schema
Interface SchemaNode

All Superinterfaces:
QName
All Known Implementing Classes:
DummySchemaRoot, SchemaNodeImpl

public interface SchemaNode
extends QName

Represents an XML Schema element from the XML Schema holding a simple or a complex XML SchemaType.

Version:
1.60

Field Summary
static int NODE_ELEMENT
           
static int NODE_TYPE
           
 
Method Summary
 java.util.Hashtable getAnnotation()
          Returns annotation for this Schema element.
 int getAnonymousGroupIndex()
           
 java.lang.String getDefaultValue()
          Returns the default value.
 SchemaNode[] getElementSet()
          Returns the element set from the underlying schematype.
 java.lang.String getFixedValue()
          Returns the fixed value.
 java.lang.String getLocation()
          Returns location relative to its root (root or global type/element).
 int getMaxOccurs()
          Returns the cardinality of the maximum occurance of this elment.
 int getMinOccurs()
          Returns the cardinality of the maximum occurance of this elment.
 java.lang.String getName()
          Returns the name specified in the XML Schema (without namespace prefix)
 java.lang.String getNamespacePrefix()
          Returns the namespace prefix of the current schema element
 org.apache.xerces.xs.XSObject getNode()
           
 SchemaNode getParent()
          Returns the schema element parent or null if this is the root.
 java.lang.String getQName()
          Returns the name specified in the XML Schema (including namespace prefix).
 java.lang.String getRefName()
          Returns name of the referenced type/element in the XML Schema.
 SchemaNode getRoot()
           
 XMLSchema getSchema()
          Returns the whole XML Schema definition.
 java.util.ArrayList getSchemaKeyRefs()
           
 java.util.Hashtable getSchemaKeys()
           
 SchemaType getSchemaType()
          Returns a simple or a complex SchemaType.
 SchemaNode getSubElement(java.lang.String name)
          Returns a direct sub schema element for a given name.
 java.lang.String getTargetNS()
          Returns the target namespace.
 java.lang.String getXPath()
           
 java.lang.String getXPath(SchemaNode root)
           
 boolean hasExtension()
           
 boolean hasSchemaKeyRefs()
           
 boolean hasSchemaKeys()
           
 boolean hasType()
          Returns true if a SchemaType has been assigned yet.
 boolean hasUnnamedOptionalParent()
           
 boolean isAnonymous()
          Returns true if this element has no name.
 boolean isChoice()
          Returns true if this element is a choice.
 boolean isGlobal()
          Returns true if this element is a global Schema Element definition.
 boolean isGlobalReference()
          Returns true if this element is a global schema element.
 boolean isGlobalType()
           
 boolean isGroup()
          Returns true if this element is a group.
 boolean isReferenceToGlobalElement()
          Returns true if this element is a reference to a global schema Element only!
 boolean isReferenceToGlobalGroup()
           
 boolean isReferenceToGlobalType()
          Returns true if this element is a reference to a global schema Type only!
 boolean isReferenceWithNoExtension()
          Returns true if this element is a reference to another schema element (isRef) or a simple reference to a global type with NO local extensions/restrictions.
 boolean isRequired()
          Returns true if this element is mandatory.
 boolean isSimple()
          Returns true if this element is a leaf.
 void markAsOptional()
          Marks this element as optional.
 void markAsUnnamedOptionalParent()
           
 void putSchemaKey(SchemaNode selectorNode, SchemaKey schemakey)
           
 void putSchemaKeyRef(SchemaNode selectorKeyNode, SchemaKeyRef schemakey)
           
 void release()
          Release the resources of this schema element.
 void setAnonymousGroupIndex(int anonymousGroupIndex)
           
 void setSchemaType(SchemaType type)
          Sets the SchemaType.
 
Methods inherited from interface com.jaxfront.core.schema.QName
getNamespace
 

Field Detail

NODE_TYPE

static final int NODE_TYPE
See Also:
Constant Field Values

NODE_ELEMENT

static final int NODE_ELEMENT
See Also:
Constant Field Values
Method Detail

getRoot

SchemaNode getRoot()

getXPath

java.lang.String getXPath()

getXPath

java.lang.String getXPath(SchemaNode root)

getNode

org.apache.xerces.xs.XSObject getNode()

getDefaultValue

java.lang.String getDefaultValue()
Returns the default value.


getFixedValue

java.lang.String getFixedValue()
Returns the fixed value.


getMaxOccurs

int getMaxOccurs()
Returns the cardinality of the maximum occurance of this elment.


getMinOccurs

int getMinOccurs()
Returns the cardinality of the maximum occurance of this elment.


getQName

java.lang.String getQName()
Returns the name specified in the XML Schema (including namespace prefix).

Specified by:
getQName in interface QName
Returns:
the name specified in the XML Schema (including namespace prefix)

getName

java.lang.String getName()
Returns the name specified in the XML Schema (without namespace prefix)

Specified by:
getName in interface QName
Returns:
the name specified in the XML Schema (without namespace prefix)

getNamespacePrefix

java.lang.String getNamespacePrefix()
Returns the namespace prefix of the current schema element

Returns:
the namespace prefix

getRefName

java.lang.String getRefName()
Returns name of the referenced type/element in the XML Schema.

Specified by:
getRefName in interface QName

getSchema

XMLSchema getSchema()
Returns the whole XML Schema definition.


getSchemaType

SchemaType getSchemaType()
Returns a simple or a complex SchemaType.


getTargetNS

java.lang.String getTargetNS()
Returns the target namespace.


hasType

boolean hasType()
Returns true if a SchemaType has been assigned yet.


isAnonymous

boolean isAnonymous()
Returns true if this element has no name.


isChoice

boolean isChoice()
Returns true if this element is a choice.


isGlobalReference

boolean isGlobalReference()
Returns true if this element is a global schema element.


isGroup

boolean isGroup()
Returns true if this element is a group.


isReferenceWithNoExtension

boolean isReferenceWithNoExtension()
Returns true if this element is a reference to another schema element (isRef) or a simple reference to a global type with NO local extensions/restrictions.


hasExtension

boolean hasExtension()

isReferenceToGlobalType

boolean isReferenceToGlobalType()
Returns true if this element is a reference to a global schema Type only!


isReferenceToGlobalElement

boolean isReferenceToGlobalElement()
Returns true if this element is a reference to a global schema Element only!


isReferenceToGlobalGroup

boolean isReferenceToGlobalGroup()

isRequired

boolean isRequired()
Returns true if this element is mandatory.


isSimple

boolean isSimple()
Returns true if this element is a leaf.


release

void release()
Release the resources of this schema element.


setSchemaType

void setSchemaType(SchemaType type)
Sets the SchemaType.

Parameters:
type - XML Schema type (simple or complex)

getSchemaKeyRefs

java.util.ArrayList getSchemaKeyRefs()

getSchemaKeys

java.util.Hashtable getSchemaKeys()

hasSchemaKeys

boolean hasSchemaKeys()

putSchemaKey

void putSchemaKey(SchemaNode selectorNode,
                  SchemaKey schemakey)

hasSchemaKeyRefs

boolean hasSchemaKeyRefs()

putSchemaKeyRef

void putSchemaKeyRef(SchemaNode selectorKeyNode,
                     SchemaKeyRef schemakey)

markAsOptional

void markAsOptional()
Marks this element as optional. MinOccurs may be 0.


getSubElement

SchemaNode getSubElement(java.lang.String name)
Returns a direct sub schema element for a given name.


isGlobal

boolean isGlobal()
Returns true if this element is a global Schema Element definition.


isGlobalType

boolean isGlobalType()

hasUnnamedOptionalParent

boolean hasUnnamedOptionalParent()

markAsUnnamedOptionalParent

void markAsUnnamedOptionalParent()

getAnnotation

java.util.Hashtable getAnnotation()
Returns annotation for this Schema element.


getParent

SchemaNode getParent()
Returns the schema element parent or null if this is the root.


getLocation

java.lang.String getLocation()
Returns location relative to its root (root or global type/element).


getElementSet

SchemaNode[] getElementSet()
Returns the element set from the underlying schematype.


setAnonymousGroupIndex

void setAnonymousGroupIndex(int anonymousGroupIndex)

getAnonymousGroupIndex

int getAnonymousGroupIndex()