org.apache.xerces.impl.xs

Class XSComplexTypeDecl

public class XSComplexTypeDecl extends Object implements XSComplexTypeDefinition, TypeInfo

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

Version: $Id: XSComplexTypeDecl.java,v 1.22 2005/06/13 20:43:27 mrglavas Exp $

Author: Elena Litani, IBM Sandy Gao, IBM

UNKNOWN:

Constructor Summary
XSComplexTypeDecl()
Method Summary
booleancontainsTypeID()
booleanderivedFrom(String ancestorNS, String ancestorName, short derivationMethod)
booleanderivedFromType(XSTypeDefinition ancestor, short derivationMethod)
booleangetAbstract()
{abstract} A boolean.
XSObjectListgetAnnotations()
Optional.
booleangetAnonymous()
A boolean that specifies if the type definition is anonymous.
XSAttributeGroupDeclgetAttrGrp()
XSAttributeUsegetAttributeUse(String namespace, String name)
XSObjectListgetAttributeUses()
{attribute uses} A set of attribute uses.
XSWildcardgetAttributeWildcard()
{attribute wildcard} Optional.
XSTypeDefinitiongetBaseType()
{base type definition} Either a simple type definition or a complex type definition.
XSCMValidatorgetContentModel(CMBuilder cmBuilder)
shortgetContentType()
{content type} One of empty, a simple type definition (see simpleType, or mixed, element-only (see cmParticle).
shortgetDerivationMethod()
{derivation method} Either extension or restriction.
shortgetFinal()
{final} For complex type definition it is a subset of {extension, restriction}.
shortgetFinalSet()
StringgetName()
The name of this XSObject depending on the XSObject type.
StringgetNamespace()
The namespace URI of this node, or null if it is unspecified. defines how a namespace URI is attached to schema components.
XSNamespaceItemgetNamespaceItem()
XSParticlegetParticle()
A particle for mixed or element-only content model, otherwise null
shortgetProhibitedSubstitutions()
{prohibited substitutions}
XSSimpleTypeDefinitiongetSimpleType()
A simple type definition corresponding to simple content model, otherwise null
StringgetTargetNamespace()
shortgetType()
Get the type of the object, i.e ELEMENT_DECLARATION.
shortgetTypeCategory()
StringgetTypeName()
StringgetTypeNamespace()
booleanisDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)
booleanisDOMDerivedFrom(String ancestorNS, String ancestorName, int derivationMethod)
Checks if a type is derived from another given the the name, namespace and derivation method.
booleanisFinal(short derivation)
{final} For complex type definition it is a subset of {extension, restriction}.
booleanisProhibitedSubstitution(short prohibited)
{prohibited substitutions} A subset of {extension, restriction}.
voidreset()
voidsetContainsTypeID()
voidsetIsAbstractType()
voidsetIsAnonymous()
voidsetName(String name)
voidsetValues(String name, String targetNamespace, XSTypeDefinition baseType, short derivedBy, short schemaFinal, short block, short contentType, boolean isAbstract, XSAttributeGroupDecl attrGrp, XSSimpleType simpleType, XSParticleDecl particle, XSObjectListImpl annotations)
StringtoString()

Constructor Detail

XSComplexTypeDecl

public XSComplexTypeDecl()

Method Detail

containsTypeID

public boolean containsTypeID()

derivedFrom

public boolean derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)

derivedFromType

public boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod)

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.

getAnnotations

public XSObjectList getAnnotations()
Optional. Annotation.

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.

getAttrGrp

public XSAttributeGroupDecl getAttrGrp()

getAttributeUse

public XSAttributeUse getAttributeUse(String namespace, String name)

getAttributeUses

public XSObjectList getAttributeUses()
{attribute uses} A set of attribute uses.

getAttributeWildcard

public XSWildcard getAttributeWildcard()
{attribute wildcard} Optional. A wildcard.

getBaseType

public XSTypeDefinition getBaseType()
{base type definition} Either a simple type definition or a complex type definition.

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).

getDerivationMethod

public short getDerivationMethod()
{derivation method} Either extension or restriction. The valid constant value for this XSConstants EXTENTION, RESTRICTION.

getFinal

public short getFinal()
{final} For complex type definition it is a subset of {extension, restriction}.

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.

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.

getNamespaceItem

public XSNamespaceItem getNamespaceItem()

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

getParticle

public XSParticle getParticle()
A particle for mixed or element-only content model, otherwise null

getProhibitedSubstitutions

public short getProhibitedSubstitutions()
{prohibited substitutions}

Returns: A bit flag corresponding to prohibited substitutions

getSimpleType

public XSSimpleTypeDefinition getSimpleType()
A simple type definition corresponding to simple content model, otherwise null

getTargetNamespace

public String getTargetNamespace()

getType

public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.

getTypeCategory

public short getTypeCategory()

getTypeName

public String getTypeName()

getTypeNamespace

public String getTypeNamespace()

isDerivedFrom

public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)

isDOMDerivedFrom

public boolean isDOMDerivedFrom(String ancestorNS, String ancestorName, int derivationMethod)
Checks if a type is derived from another given the the name, namespace and derivation method. See: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo-isDerivedFrom

Parameters: ancestorNS The namspace of the ancestor type declaration ancestorName The name of the ancestor type declaration derivation The derivation method

Returns: boolean True if the ancestor type is derived from the reference type by the specifiied derivation method.

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}.

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}.

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, 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 © 1999-2005 Apache XML Project. All Rights Reserved.