public class XSComplexTypeDecl extends Object implements XSComplexTypeDefinition, TypeInfo
CONTENTTYPE_ELEMENT, CONTENTTYPE_EMPTY, CONTENTTYPE_MIXED, CONTENTTYPE_SIMPLECOMPLEX_TYPE, SIMPLE_TYPE| Constructor and Description |
|---|
XSComplexTypeDecl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsTypeID() |
boolean |
derivedFrom(String ancestorNS,
String ancestorName,
short derivationMethod)
Convenience method which checks if this type is derived from the given
ancestor type.
|
boolean |
derivedFromType(XSTypeDefinition ancestor,
short derivationMethod)
Convenience method which checks if this type is derived from the given
ancestorType. |
boolean |
getAbstract()
{abstract} A boolean.
|
XSObjectList |
getAnnotations()
Optional.
|
boolean |
getAnonymous()
A boolean that specifies if the type definition is anonymous.
|
XSAttributeGroupDecl |
getAttrGrp() |
XSAttributeUse |
getAttributeUse(String namespace,
String name) |
XSObjectList |
getAttributeUses()
{attribute uses} A set of attribute uses.
|
XSWildcard |
getAttributeWildcard()
{attribute wildcard} Optional.
|
XSTypeDefinition |
getBaseType()
{base type definition} Either a simple type definition or a complex
type definition.
|
XSCMValidator |
getContentModel(CMBuilder cmBuilder) |
XSCMValidator |
getContentModel(CMBuilder cmBuilder,
boolean forUPA) |
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. |
XSNamespaceItem |
getNamespaceItem()
A namespace schema information item corresponding to the target
namespace of the component, if it is globally declared; or
null otherwise. |
XSParticle |
getParticle()
A particle for mixed or element-only content model, otherwise
null |
short |
getProhibitedSubstitutions()
{prohibited substitutions}
|
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()
Return whether this type definition is a simple type or complex type.
|
String |
getTypeName() |
String |
getTypeNamespace() |
boolean |
isDerivedFrom(String typeNamespaceArg,
String typeNameArg,
int derivationMethod) |
boolean |
isDOMDerivedFrom(String ancestorNS,
String ancestorName,
int derivationMethod)
Checks if a type is derived from another given the the name, namespace
and derivation method.
|
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,
XSTypeDefinition baseType,
short derivedBy,
short schemaFinal,
short block,
short contentType,
boolean isAbstract,
XSAttributeGroupDecl attrGrp,
XSSimpleType simpleType,
XSParticleDecl particle,
XSObjectListImpl annotations) |
String |
toString() |
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)
public void setName(String name)
public short getTypeCategory()
XSTypeDefinitiongetTypeCategory in interface XSTypeDefinitionpublic String getTypeName()
getTypeName in interface TypeInfopublic short getFinalSet()
public String getTargetNamespace()
public boolean containsTypeID()
public void setIsAbstractType()
public void setContainsTypeID()
public void setIsAnonymous()
public XSCMValidator getContentModel(CMBuilder cmBuilder)
public XSCMValidator getContentModel(CMBuilder cmBuilder, boolean forUPA)
public XSAttributeGroupDecl getAttrGrp()
public boolean derivedFromType(XSTypeDefinition ancestor, short derivationMethod)
XSTypeDefinitionancestorType.derivedFromType in interface XSTypeDefinitionancestor - An ancestor type definition.derivationMethod - A bit combination representing a subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST
}.ancestorType
using only derivation methods from the derivationMethod
.public boolean derivedFrom(String ancestorNS, String ancestorName, short derivationMethod)
XSTypeDefinitionderivedFrom in interface XSTypeDefinitionancestorNS - An ancestor type namespace.ancestorName - An ancestor type name.derivationMethod - A bit combination representing a subset of {
DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST
}.ancestorType
using only derivation methods from the derivationMethod
.public boolean isDOMDerivedFrom(String ancestorNS, String ancestorName, int derivationMethod)
ancestorNS - The namspace of the ancestor type declarationancestorName - The name of the ancestor type declarationderivationMethod - The derivation methodpublic void reset()
public short getType()
public String getName()
name of this XSObject depending on the
XSObject type.public boolean getAnonymous()
getAnonymous in interface XSTypeDefinitionpublic String getNamespace()
null if it is
unspecified. defines how a namespace URI is attached to schema
components.getNamespace in interface XSObjectpublic XSTypeDefinition getBaseType()
getBaseType in interface XSTypeDefinitionpublic short getDerivationMethod()
XSConstants EXTENTION, RESTRICTION.getDerivationMethod in interface XSComplexTypeDefinitionpublic boolean isFinal(short derivation)
isFinal in interface XSTypeDefinitionderivation - Extension, restriction, list, union constants
(defined in XSConstants).public short getFinal()
getFinal in interface XSTypeDefinitionpublic boolean getAbstract()
getAbstract in interface XSComplexTypeDefinitionpublic XSObjectList getAttributeUses()
getAttributeUses in interface XSComplexTypeDefinitionpublic XSWildcard getAttributeWildcard()
getAttributeWildcard in interface XSComplexTypeDefinitionpublic short getContentType()
simpleType, or mixed, element-only (see
cmParticle).getContentType in interface XSComplexTypeDefinitionpublic XSSimpleTypeDefinition getSimpleType()
nullgetSimpleType in interface XSComplexTypeDefinitionpublic XSParticle getParticle()
nullgetParticle in interface XSComplexTypeDefinitionpublic boolean isProhibitedSubstitution(short prohibited)
isProhibitedSubstitution in interface XSComplexTypeDefinitionprohibited - extention or restriction constants (defined in
XSConstants).public short getProhibitedSubstitutions()
getProhibitedSubstitutions in interface XSComplexTypeDefinitionpublic XSObjectList getAnnotations()
getAnnotations in interface XSComplexTypeDefinitionpublic XSNamespaceItem getNamespaceItem()
XSObjectnull otherwise.getNamespaceItem in interface XSObjectXSObject.getNamespaceItem()public XSAttributeUse getAttributeUse(String namespace, String name)
public String getTypeNamespace()
getTypeNamespace in interface TypeInfopublic boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg, int derivationMethod)
isDerivedFrom in interface TypeInfoCopyright © 2018 JBoss by Red Hat. All rights reserved.