org.apache.xerces.impl.xs

Class XSComplexTypeDecl

Implemented Interfaces:
org.apache.xerces.xs.XSComplexTypeDefinition

public class XSComplexTypeDecl
extends java.lang.Object
implements org.apache.xerces.xs.XSComplexTypeDefinition

The XML representation for a complexType schema component is a element information item

Version:
$Id: XSComplexTypeDecl.java,v 1.17 2003/11/11 20:14:58 sandygao Exp $

Authors:
Elena Litani, IBM
Sandy Gao, IBM

Fields inherited from interface org.apache.xerces.xs.XSComplexTypeDefinition

CONTENTTYPE_ELEMENT, CONTENTTYPE_EMPTY, CONTENTTYPE_MIXED, CONTENTTYPE_SIMPLE

Constructor Summary

XSComplexTypeDecl()

Method Summary

boolean
containsTypeID()
boolean
derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)
boolean
derivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestor, short derivationMethod)
boolean
getAbstract()
{abstract} A boolean.
org.apache.xerces.xs.XSObjectList
getAnnotations()
Optional.
boolean
getAnonymous()
A boolean that specifies if the type definition is anonymous.
XSAttributeGroupDecl
getAttrGrp()
org.apache.xerces.xs.XSAttributeUse
getAttributeUse(String namespace, String name)
org.apache.xerces.xs.XSObjectList
getAttributeUses()
{attribute uses} A set of attribute uses.
org.apache.xerces.xs.XSWildcard
getAttributeWildcard()
{attribute wildcard} Optional.
org.apache.xerces.xs.XSTypeDefinition
getBaseType()
{base type definition} Either a simple type definition or a complex type definition.
XSCMValidator
getContentModel(CMBuilder cmBuilder)
short
getContentType()
{content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).
short
getDerivationMethod()
{derivation method} Either extension or restriction.
short
getFinal()
{final} For complex type definition it is a subset of {extension, restriction}.
short
getFinalSet()
String
getName()
The name of this XSObject depending on the XSObject type.
String
getNamespace()
The namespace URI of this node, or null if it is unspecified.
org.apache.xerces.xs.XSNamespaceItem
getNamespaceItem()
org.apache.xerces.xs.XSParticle
getParticle()
A particle for mixed or element-only content model, otherwise null
short
getProhibitedSubstitutions()
{prohibited substitutions}
org.apache.xerces.xs.XSSimpleTypeDefinition
getSimpleType()
A simple type definition corresponding to simple content model, otherwise null
String
getTargetNamespace()
short
getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
short
getTypeCategory()
String
getTypeName()
boolean
isFinal(short derivation)
{final} For complex type definition it is a subset of {extension, restriction}.
boolean
isProhibitedSubstitution(short prohibited)
{prohibited substitutions} A subset of {extension, restriction}.
void
reset()
void
setContainsTypeID()
void
setIsAbstractType()
void
setIsAnonymous()
void
setName(String name)
void
setValues(String name, String targetNamespace, org.apache.xerces.xs.XSTypeDefinition baseType, short derivedBy, short schemaFinal, short block, short contentType, boolean isAbstract, XSAttributeGroupDecl attrGrp, XSSimpleType simpleType, XSParticleDecl particle, XSObjectListImpl annotations)
String
toString()

Constructor Details

XSComplexTypeDecl

public XSComplexTypeDecl()

Method Details

containsTypeID

public boolean containsTypeID()


derivedFrom

public boolean derivedFrom(String ancestorNS,
                           String ancestorName,
                           short derivationMethod)
Specified by:
derivedFrom in interface org.apache.xerces.xs.XSTypeDefinition


derivedFromType

public boolean derivedFromType(org.apache.xerces.xs.XSTypeDefinition ancestor,
                               short derivationMethod)
Specified by:
derivedFromType in interface org.apache.xerces.xs.XSTypeDefinition


getAbstract

public boolean getAbstract()
{abstract} A boolean. Complex types for which {abstract} is true must not be used as the {type definition} for the validation of element information items.
Specified by:
getAbstract in interface org.apache.xerces.xs.XSComplexTypeDefinition


getAnnotations

public org.apache.xerces.xs.XSObjectList getAnnotations()
Optional. Annotation.
Specified by:
getAnnotations in interface org.apache.xerces.xs.XSComplexTypeDefinition


getAnonymous

public boolean getAnonymous()
A boolean that specifies if the type definition is anonymous. Convenience attribute. This is a field is not part of XML Schema component model.
Specified by:
getAnonymous in interface org.apache.xerces.xs.XSTypeDefinition


getAttrGrp

public XSAttributeGroupDecl getAttrGrp()


getAttributeUse

public org.apache.xerces.xs.XSAttributeUse getAttributeUse(String namespace,
                                                           String name)


getAttributeUses

public org.apache.xerces.xs.XSObjectList getAttributeUses()
{attribute uses} A set of attribute uses.
Specified by:
getAttributeUses in interface org.apache.xerces.xs.XSComplexTypeDefinition


getAttributeWildcard

public org.apache.xerces.xs.XSWildcard getAttributeWildcard()
{attribute wildcard} Optional. A wildcard.
Specified by:
getAttributeWildcard in interface org.apache.xerces.xs.XSComplexTypeDefinition


getBaseType

public org.apache.xerces.xs.XSTypeDefinition getBaseType()
{base type definition} Either a simple type definition or a complex type definition.
Specified by:
getBaseType in interface org.apache.xerces.xs.XSTypeDefinition


getContentModel

public XSCMValidator getContentModel(CMBuilder cmBuilder)


getContentType

public short getContentType()
{content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).
Specified by:
getContentType in interface org.apache.xerces.xs.XSComplexTypeDefinition


getDerivationMethod

public short getDerivationMethod()
{derivation method} Either extension or restriction. The valid constant value for this XSConstants EXTENTION, RESTRICTION.
Specified by:
getDerivationMethod in interface org.apache.xerces.xs.XSComplexTypeDefinition


getFinal

public short getFinal()
{final} For complex type definition it is a subset of {extension, restriction}.
Specified by:
getFinal in interface org.apache.xerces.xs.XSTypeDefinition

Returns:
A bit flag that represents: {extension, restriction) or none for complexTypes; {extension, list, restriction, union} or none for simpleTypes;


getFinalSet

public short getFinalSet()


getName

public String getName()
The name of this XSObject depending on the XSObject type.
Specified by:
getName in interface org.apache.xerces.xs.XSObject


getNamespace

public String getNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
Specified by:
getNamespace in interface org.apache.xerces.xs.XSObject


getNamespaceItem

public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()
Specified by:
getNamespaceItem in interface org.apache.xerces.xs.XSObject

See Also:
org.apache.xerces.xs.XSObject.getNamespaceItem()


getParticle

public org.apache.xerces.xs.XSParticle getParticle()
A particle for mixed or element-only content model, otherwise null
Specified by:
getParticle in interface org.apache.xerces.xs.XSComplexTypeDefinition


getProhibitedSubstitutions

public short getProhibitedSubstitutions()
{prohibited substitutions}
Specified by:
getProhibitedSubstitutions in interface org.apache.xerces.xs.XSComplexTypeDefinition

Returns:
A bit flag corresponding to prohibited substitutions


getSimpleType

public org.apache.xerces.xs.XSSimpleTypeDefinition getSimpleType()
A simple type definition corresponding to simple content model, otherwise null
Specified by:
getSimpleType in interface org.apache.xerces.xs.XSComplexTypeDefinition


getTargetNamespace

public String getTargetNamespace()


getType

public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
Specified by:
getType in interface org.apache.xerces.xs.XSObject


getTypeCategory

public short getTypeCategory()
Specified by:
getTypeCategory in interface org.apache.xerces.xs.XSTypeDefinition


getTypeName

public String getTypeName()


isFinal

public boolean isFinal(short derivation)
{final} For complex type definition it is a subset of {extension, restriction}. For simple type definition it is a subset of {extension, list, restriction, union}.
Specified by:
isFinal in interface org.apache.xerces.xs.XSTypeDefinition

Parameters:
derivation - Extension, restriction, list, union constants (defined in XSConstants).

Returns:
True if derivation is in the final set, otherwise false.


isProhibitedSubstitution

public boolean isProhibitedSubstitution(short prohibited)
{prohibited substitutions} A subset of {extension, restriction}.
Specified by:
isProhibitedSubstitution in interface org.apache.xerces.xs.XSComplexTypeDefinition

Parameters:
prohibited - extention or restriction constants (defined in XSConstants).

Returns:
True if prohibited is a prohibited substitution, otherwise false.


reset

public void reset()


setContainsTypeID

public void setContainsTypeID()


setIsAbstractType

public void setIsAbstractType()


setIsAnonymous

public void setIsAnonymous()


setName

public void setName(String name)


setValues

public void setValues(String name,
                      String targetNamespace,
                      org.apache.xerces.xs.XSTypeDefinition baseType,
                      short derivedBy,
                      short schemaFinal,
                      short block,
                      short contentType,
                      boolean isAbstract,
                      XSAttributeGroupDecl attrGrp,
                      XSSimpleType simpleType,
                      XSParticleDecl particle,
                      XSObjectListImpl annotations)


toString

public String toString()


Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.