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.


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_ELEMENT

static final int NODE_ELEMENT
See Also:
Constant Field Values

NODE_TYPE

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

getAnnotation

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


getAnonymousGroupIndex

int getAnonymousGroupIndex()

getDefaultValue

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


getElementSet

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


getFixedValue

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


getLocation

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


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.


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

getNode

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

getParent

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


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)

getRefName

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

Specified by:
getRefName in interface QName

getRoot

SchemaNode getRoot()

getSchema

XMLSchema getSchema()
Returns the whole XML Schema definition.


getSchemaKeyRefs

java.util.ArrayList getSchemaKeyRefs()

getSchemaKeys

java.util.Hashtable getSchemaKeys()

getSchemaType

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


getSubElement

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


getTargetNS

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


getXPath

java.lang.String getXPath()

getXPath

java.lang.String getXPath(SchemaNode root)

hasExtension

boolean hasExtension()

hasSchemaKeyRefs

boolean hasSchemaKeyRefs()

hasSchemaKeys

boolean hasSchemaKeys()

hasType

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


hasUnnamedOptionalParent

boolean hasUnnamedOptionalParent()

isAnonymous

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


isChoice

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


isGlobal

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


isGlobalReference

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


isGlobalType

boolean isGlobalType()

isGroup

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


isReferenceToGlobalElement

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


isReferenceToGlobalGroup

boolean isReferenceToGlobalGroup()

isReferenceToGlobalType

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


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.


isRequired

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


isSimple

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


markAsOptional

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


markAsUnnamedOptionalParent

void markAsUnnamedOptionalParent()

putSchemaKey

void putSchemaKey(SchemaNode selectorNode,
                  SchemaKey schemakey)

putSchemaKeyRef

void putSchemaKeyRef(SchemaNode selectorKeyNode,
                     SchemaKeyRef schemakey)

release

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


setAnonymousGroupIndex

void setAnonymousGroupIndex(int anonymousGroupIndex)

setSchemaType

void setSchemaType(SchemaType type)
Sets the SchemaType.

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