com.jaxfront.core.schema.impl
Class SchemaComplexTypeImpl

java.lang.Object
  extended by com.jaxfront.core.schema.impl.SchemaComplexTypeImpl
All Implemented Interfaces:
QName, SchemaComplexType, SchemaType, java.io.Serializable
Direct Known Subclasses:
SchemaSimpleTypeImpl

public class SchemaComplexTypeImpl
extends java.lang.Object
implements SchemaComplexType, java.io.Serializable

Represents a XML Schema complex type. Holds an oracle XSD Node from the oracle Schema Parser (oracle.xml.parser.schema.XSDNode).

Version:
1.60
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jaxfront.core.schema.SchemaType
NO_NAME
 
Constructor Summary
SchemaComplexTypeImpl(java.lang.String nameSpace, java.lang.String name, XMLSchema schema, SchemaNode element)
           
SchemaComplexTypeImpl(java.lang.String nameSpace, java.lang.String name, org.apache.xerces.xs.XSAttributeGroupDefinition attrGroup, XMLSchema schema, SchemaNode element)
          Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.
SchemaComplexTypeImpl(java.lang.String nameSpace, java.lang.String name, org.apache.xerces.xs.XSModelGroup unnamedNode, XMLSchema schema, SchemaNode element)
          Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.
SchemaComplexTypeImpl(java.lang.String nameSpace, java.lang.String name, org.apache.xerces.xs.XSTypeDefinition node, XMLSchema schema, SchemaNode element)
          Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.
SchemaComplexTypeImpl(org.apache.xerces.xs.XSTypeDefinition node, XMLSchema schema, SchemaNode element)
          Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.
 
Method Summary
 void addRecursiveElement(SchemaNode element)
           
 int countSubNodes()
          Returns the number of subnodes.
static java.lang.String createQName(java.lang.String nameSpace, java.lang.String name)
           
 SchemaNode[] getAttributeSet()
          Returns all attributes which are defined for this complex type.
 java.lang.String getBaseName()
          Returns the base name (if type is an extension or restriction) of the inherited type.
 SchemaNode getChild(java.lang.String name)
           
 int getChoiceMaxOccurs()
          Returns the max occurs of a choice element defined in xsd schema.
 int getChoiceMinOccurs()
          Returns the min occurs of a choice element defined in xsd schema.
 SchemaNode[] getElementSet()
          Returns all agregated child elements.
 java.lang.String getName()
          Returns the name of this type.
 java.lang.String getNamespace()
           
 java.lang.String getNamespacePrefix()
           
 java.lang.Object getParserXSDNode()
          Returns the XML Schema node from an underlying schema parser. e.q.: oracle.xml.parser.schema.XSDNode
 java.lang.String getQName()
          Returns the name of this type.
 java.lang.String[] getRecursiveElementNames()
          Returns the name of the recursive start element if any otherwise return null.
 SchemaNode[] getRecursiveElements()
          Returns a recursive start element or null.
 java.lang.String getRefName()
           
 SchemaNode getSchemaElement()
          Returns the holding Schema Element.
 SchemaSimpleType getSimpleContent()
          Returns the simple text content of this complex type if available else return null.
 Type getType()
          Returns the analysed JAXFront Type.
 boolean hasBeenAnalysed()
          Indicates if this schema type has been analysed yet.
 boolean isAbstract()
          Indicates if this schema type is abstract.
 boolean isAnonymous()
           
 boolean isChoice()
          Returns true if this schema type is a choice.
 boolean isEmptyComplexType()
          Returns true if this type is an empty complex type.
 boolean isGlobal()
          Returns true if this type is a global type.
 boolean isGroup()
          Returns true if this schema type is a group.
 boolean isMixedContent()
          Returns true if this schema type is a simple text content.
 boolean isRecursive()
           
 boolean isSimple()
          Returns true if this schema type is simple.
 void release()
          Releases all allocated resources for this type.
 void setIsSimpleContent(boolean simpleContentFlag)
          Marks this schema type as a simple content text.
 void setRecursive(boolean isRecursion)
           
 void setType(Type type)
          Sets the analysed JAXFront type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaComplexTypeImpl

public SchemaComplexTypeImpl(java.lang.String nameSpace,
                             java.lang.String name,
                             org.apache.xerces.xs.XSTypeDefinition node,
                             XMLSchema schema,
                             SchemaNode element)
Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.

Parameters:
node - an oracle XSD Node (from oracle schema parser)
schema - an XML Schema
element - an XML Schema Element

SchemaComplexTypeImpl

public SchemaComplexTypeImpl(java.lang.String nameSpace,
                             java.lang.String name,
                             org.apache.xerces.xs.XSModelGroup unnamedNode,
                             XMLSchema schema,
                             SchemaNode element)
Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.

Parameters:
node - an oracle XSD Node (from oracle schema parser)
schema - an XML Schema
element - an XML Schema Element

SchemaComplexTypeImpl

public SchemaComplexTypeImpl(java.lang.String nameSpace,
                             java.lang.String name,
                             org.apache.xerces.xs.XSAttributeGroupDefinition attrGroup,
                             XMLSchema schema,
                             SchemaNode element)
Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.

Parameters:
node - an oracle XSD Node (from oracle schema parser)
schema - an XML Schema
element - an XML Schema Element

SchemaComplexTypeImpl

public SchemaComplexTypeImpl(java.lang.String nameSpace,
                             java.lang.String name,
                             XMLSchema schema,
                             SchemaNode element)

SchemaComplexTypeImpl

public SchemaComplexTypeImpl(org.apache.xerces.xs.XSTypeDefinition node,
                             XMLSchema schema,
                             SchemaNode element)
Creates a SchemaComplexType based on a oracle XSDNode, a XMLSchema and a SchemaNode.

Parameters:
node - an oracle XSD Node (from oracle schema parser)
schema - an XML Schema
element - an XML Schema Element
Method Detail

getAttributeSet

public SchemaNode[] getAttributeSet()
Returns all attributes which are defined for this complex type.

Specified by:
getAttributeSet in interface SchemaComplexType

getBaseName

public java.lang.String getBaseName()
Returns the base name (if type is an extension or restriction) of the inherited type.

Specified by:
getBaseName in interface SchemaType

getElementSet

public SchemaNode[] getElementSet()
Returns all agregated child elements.

Specified by:
getElementSet in interface SchemaComplexType

getQName

public java.lang.String getQName()
Returns the name of this type.

Specified by:
getQName in interface QName
Specified by:
getQName in interface SchemaType

getParserXSDNode

public java.lang.Object getParserXSDNode()
Returns the XML Schema node from an underlying schema parser. e.q.: oracle.xml.parser.schema.XSDNode

Specified by:
getParserXSDNode in interface SchemaType

addRecursiveElement

public void addRecursiveElement(SchemaNode element)
Specified by:
addRecursiveElement in interface SchemaType

getRecursiveElements

public SchemaNode[] getRecursiveElements()
Returns a recursive start element or null.

Specified by:
getRecursiveElements in interface SchemaType

getChild

public SchemaNode getChild(java.lang.String name)

getSimpleContent

public SchemaSimpleType getSimpleContent()
Returns the simple text content of this complex type if available else return null.

Specified by:
getSimpleContent in interface SchemaComplexType

getType

public Type getType()
Returns the analysed JAXFront Type.

Specified by:
getType in interface SchemaType

hasBeenAnalysed

public boolean hasBeenAnalysed()
Indicates if this schema type has been analysed yet.

Specified by:
hasBeenAnalysed in interface SchemaType

getChoiceMinOccurs

public int getChoiceMinOccurs()
Description copied from interface: SchemaType
Returns the min occurs of a choice element defined in xsd schema.

Specified by:
getChoiceMinOccurs in interface SchemaType

getChoiceMaxOccurs

public int getChoiceMaxOccurs()
Description copied from interface: SchemaType
Returns the max occurs of a choice element defined in xsd schema.

Specified by:
getChoiceMaxOccurs in interface SchemaType

isAnonymous

public boolean isAnonymous()

isAbstract

public boolean isAbstract()
Indicates if this schema type is abstract.

Specified by:
isAbstract in interface SchemaType

isChoice

public boolean isChoice()
Returns true if this schema type is a choice.

Specified by:
isChoice in interface SchemaType

isGroup

public boolean isGroup()
Returns true if this schema type is a group.

Specified by:
isGroup in interface SchemaType

isSimple

public boolean isSimple()
Returns true if this schema type is simple.

Specified by:
isSimple in interface SchemaType

isMixedContent

public boolean isMixedContent()
Returns true if this schema type is a simple text content.

Specified by:
isMixedContent in interface SchemaType

setIsSimpleContent

public void setIsSimpleContent(boolean simpleContentFlag)
Marks this schema type as a simple content text.

Specified by:
setIsSimpleContent in interface SchemaType

setType

public void setType(Type type)
Sets the analysed JAXFront type.

Specified by:
setType in interface SchemaType

toString

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

release

public void release()
Description copied from interface: SchemaType
Releases all allocated resources for this type.

Specified by:
release in interface SchemaType
See Also:
SchemaType.release()

isGlobal

public boolean isGlobal()
Description copied from interface: SchemaType
Returns true if this type is a global type.

Specified by:
isGlobal in interface SchemaType
See Also:
SchemaType.isGlobal()

countSubNodes

public int countSubNodes()
Description copied from interface: SchemaType
Returns the number of subnodes.

Specified by:
countSubNodes in interface SchemaType

getSchemaElement

public SchemaNode getSchemaElement()
Description copied from interface: SchemaType
Returns the holding Schema Element.

Specified by:
getSchemaElement in interface SchemaType

isEmptyComplexType

public boolean isEmptyComplexType()
Description copied from interface: SchemaType
Returns true if this type is an empty complex type.

Specified by:
isEmptyComplexType in interface SchemaType

isRecursive

public boolean isRecursive()
Specified by:
isRecursive in interface SchemaType

getRecursiveElementNames

public java.lang.String[] getRecursiveElementNames()
Returns the name of the recursive start element if any otherwise return null.

Specified by:
getRecursiveElementNames in interface SchemaType

setRecursive

public void setRecursive(boolean isRecursion)
Specified by:
setRecursive in interface SchemaType

getNamespace

public java.lang.String getNamespace()
Specified by:
getNamespace in interface QName

getRefName

public java.lang.String getRefName()
Specified by:
getRefName in interface QName

createQName

public static java.lang.String createQName(java.lang.String nameSpace,
                                           java.lang.String name)

getName

public java.lang.String getName()
Description copied from interface: SchemaType
Returns the name of this type.

Specified by:
getName in interface QName
Specified by:
getName in interface SchemaType

getNamespacePrefix

public java.lang.String getNamespacePrefix()
Specified by:
getNamespacePrefix in interface SchemaType