public interface ComplexType extends SchemaType
Modifier and Type | Field and Description |
---|---|
static int |
OPEN_CONTENT_ABSENT |
static int |
OPEN_CONTENT_INTERLEAVE |
static int |
OPEN_CONTENT_NONE |
static int |
OPEN_CONTENT_SUFFIX |
static int |
VARIETY_ELEMENT_ONLY |
static int |
VARIETY_EMPTY |
static int |
VARIETY_MIXED |
static int |
VARIETY_SIMPLE |
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION
COMPONENT_FUNCTION_TYPE, FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
Modifier and Type | Method and Description |
---|---|
boolean |
allowsAttributes()
Return true if this type (or any known type derived from it by extension) allows the element
to have one or more attributes.
|
boolean |
containsElementWildcard()
Ask whether this type (or any known type derived from it by extension) allows the element
to have children that match a wildcard
|
void |
gatherAllPermittedChildren(java.util.HashSet<StructuredQName> children,
boolean ignoreWildcards)
Get a list of all the names of elements that can appear as children of an element having this
complex type, as integer fingerprints.
|
void |
gatherAllPermittedDescendants(java.util.HashSet<StructuredQName> descendants)
Get a list of all the names of elements that can appear as descendants of an element having this
complex type, as integer fingerprints.
|
int |
getAttributeUseCardinality(StructuredQName attributeName)
Find an attribute use within this complex type definition having a given attribute name
(identified by fingerprint), and return the cardinality associated with that attribute,
which will always be 0, 1, or 0-or-1.
|
SimpleType |
getAttributeUseType(StructuredQName attributeName)
Find an attribute use within this complex type definition having a given attribute name
(identified by fingerprint), and return the schema type associated with that attribute.
|
int |
getDescendantElementCardinality(StructuredQName elementName)
Assuming an element is a permitted descendant in the content model of this type, determine
the cardinality of the element when it appears as a descendant.
|
SchemaType |
getDescendantElementType(StructuredQName fingerprint)
Assuming an element is a permitted descendant in the content model of this type, determine
the type of the element when it appears as a descendant.
|
int |
getElementParticleCardinality(StructuredQName elementName,
boolean considerExtensions)
Find an element particle within this complex type definition having a given element name
(identified by elementName), and return the cardinality associated with that element particle,
that is, the number of times the element can occur within this complex type.
|
SchemaType |
getElementParticleType(StructuredQName elementName,
boolean considerExtensions)
Find an element particle within this complex type definition having a given element name
(identified by elementName), and return the schema type associated with that element particle.
|
SimpleType |
getSimpleContentType()
Get the simple content type.
|
int |
getVariety()
Get the variety of this complex type.
|
boolean |
hasAssertions()
Ask whether there are any assertions defined on this complex type
|
boolean |
isAbstract()
Test whether this complex type has been marked as abstract.
|
boolean |
isAllContent()
Test whether this complex type has "all" content, that is, a content model
using an xs:all compositor
|
boolean |
isComplexContent()
Test whether this complex type has complex content.
|
boolean |
isEmptiable()
Test whether the content model of this complex type allows empty content.
|
boolean |
isEmptyContent()
Test whether the content model of this complex type is empty.
|
boolean |
isMixedContent()
Test whether this complex type allows mixed content.
|
boolean |
isRestricted()
Test whether this complex type is derived by restriction.
|
boolean |
isSimpleContent()
Test whether this complexType has simple content.
|
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getEQName, getFinalProhibitions, getFingerprint, getName, getStructuredQName, getSystemId, getTargetNamespace, isAnonymousType, isAtomicType, isComplexType, isIdRefType, isIdType, isSameType, isSimpleType
getComponentAsFunction, getRedefinitionLevel, getValidationStatus
static final int VARIETY_EMPTY
static final int VARIETY_SIMPLE
static final int VARIETY_ELEMENT_ONLY
static final int VARIETY_MIXED
static final int OPEN_CONTENT_ABSENT
static final int OPEN_CONTENT_NONE
static final int OPEN_CONTENT_INTERLEAVE
static final int OPEN_CONTENT_SUFFIX
int getVariety()
VARIETY_EMPTY
, VARIETY_MIXED
, VARIETY_SIMPLE
, or
VARIETY_ELEMENT_ONLY
boolean isAbstract()
boolean isComplexContent()
boolean isSimpleContent()
boolean isAllContent()
SimpleType getSimpleContentType() throws MissingComponentException
MissingComponentException
boolean isRestricted()
boolean isEmptyContent()
boolean isEmptiable() throws SchemaException
SchemaException
boolean isMixedContent()
SchemaType getElementParticleType(StructuredQName elementName, boolean considerExtensions) throws SchemaException, ValidationException
elementName
- Identifies the name of the child element within this content modelconsiderExtensions
- True if types derived from this type by extension are to be included in the searchSchemaException
ValidationException
int getElementParticleCardinality(StructuredQName elementName, boolean considerExtensions) throws SchemaException, ValidationException
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
If there is no such particle, return StaticProperty.EMPTY
.elementName
- Identifies the name of the child element within this content modelconsiderExtensions
- True if types derived from this type by extension are to be included in the searchStaticProperty.EMPTY
.SchemaException
ValidationException
SimpleType getAttributeUseType(StructuredQName attributeName) throws SchemaException
attributeName
- Identifies the name of the required attribute within this content modelSchemaException
int getAttributeUseCardinality(StructuredQName attributeName) throws SchemaException
attributeName
- Identifies the name of the required attribute within this content modelSchemaException
boolean allowsAttributes() throws MissingComponentException
MissingComponentException
void gatherAllPermittedChildren(java.util.HashSet<StructuredQName> children, boolean ignoreWildcards) throws SchemaException
children
- a set, initially empty, which on return will hold the names of all permitted
child elements; if the result contains the value XS_INVALID_NAME, this indicates that it is not possible to enumerate
all the children, typically because of wildcards. In this case the other contents of the set should
be ignoredignoreWildcards
- true if wildcards should be ignoredSchemaException
void gatherAllPermittedDescendants(java.util.HashSet<StructuredQName> descendants) throws SchemaException
descendants
- a set, initially empty, which on return will hold the names of all permitted
descendant elements; if the result contains the value XS_INVALID_NAME, this indicates that it is not possible to enumerate
all the descendants, typically because of wildcards. In this case the other contents of the set should
be ignored.SchemaException
SchemaType getDescendantElementType(StructuredQName fingerprint) throws SchemaException
fingerprint
- the name of the required descendant elementSchemaException
int getDescendantElementCardinality(StructuredQName elementName) throws SchemaException
elementName
- the name of the required descendant elementSchemaException
boolean containsElementWildcard() throws MissingComponentException
MissingComponentException
boolean hasAssertions()
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.