public final class Untyped extends java.lang.Object implements ComplexType, java.io.Serializable
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING
?????? | ????? |
---|---|
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 |
allowsDerivation(int derivation)
Determines whether derivation (of a particular kind)
from this type is allowed, based on the "final" property
|
void |
analyzeContentExpression(Expression expression,
int kind,
StaticContext env)
Analyze an expression to see whether the expression is capable of delivering a value of this
type.
|
Value |
atomize(NodeInfo node)
Get the typed value of a node that is annotated with this schema type.
|
void |
checkTypeDerivationIsOK(SchemaType type,
int block)
Check that this type is validly derived from a given type
|
void |
gatherAllPermittedChildren(IntHashSet children)
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(IntHashSet 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.
|
SchemaType |
getAttributeUseType(int fingerprint)
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.
|
SchemaType |
getBaseType()
Returns the base type that this type inherits from.
|
int |
getBlock()
Returns the value of the 'block' attribute for this type, as a bit-signnificant
integer with fields such as
SchemaType.DERIVATION_LIST and SchemaType.DERIVATION_EXTENSION |
int |
getDerivationMethod()
Gets the integer code of the derivation method used to derive this type from its
parent.
|
java.lang.String |
getDescription()
Get a description of this type for use in diagnostics
|
java.lang.String |
getDisplayName()
Get the display name of the type: that is, a lexical QName with an arbitrary prefix
|
int |
getElementParticleCardinality(int fingerprint,
boolean searchExtensionTypes)
Find an element particle within this complex type definition having a given element name
(identified by fingerprint), 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(int fingerprint,
boolean considerExtensions)
Find an element particle within this complex type definition having a given element name
(identified by fingerprint), and return the schema type associated with that element particle.
|
int |
getFingerprint()
Get the fingerprint of the name of this type
|
static Untyped |
getInstance()
Get the singular instance of this class
|
SchemaType |
getKnownBaseType()
Returns the base type that this type inherits from.
|
java.lang.String |
getName()
Get the local name of this type
|
int |
getNameCode()
Get the namecode of the name of this type.
|
SimpleType |
getSimpleContentType()
For a complex type with simple content, return the simple type of the content.
|
java.lang.String |
getSystemId()
Get the URI of the schema document containing the definition of this type
|
java.lang.String |
getTargetNamespace()
Get the target namespace of this type
|
SequenceIterator |
getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type
|
int |
getValidationStatus()
Get the validation status - always valid
|
boolean |
isAbstract()
Test whether this ComplexType 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 |
isAnonymousType()
Test whether this is an anonymous type
|
boolean |
isAtomicType()
Test whether this SchemaType is an atomic type
|
boolean |
isComplexContent()
Test whether this complex type has complex content
|
boolean |
isComplexType()
Test whether this SchemaType is a complex type
|
boolean |
isEmptiable()
Test whether the content model of this complexType allows empty content
|
boolean |
isEmptyContent()
Test whether the content type 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 |
isSameType(SchemaType other)
Test whether this is the same type as another type.
|
boolean |
isSimpleContent()
Test whether this complex type has simple content
|
boolean |
isSimpleType()
Test whether this SchemaType is a simple type
|
public int getValidationStatus()
getValidationStatus
???? SchemaComponent
SchemaComponent.UNVALIDATED
, SchemaComponent.VALIDATING
,
SchemaComponent.VALIDATED
, SchemaComponent.INVALID
, SchemaComponent.INCOMPLETE
public java.lang.String getName()
getName
???? SchemaType
public java.lang.String getTargetNamespace()
getTargetNamespace
???? SchemaType
public java.lang.String getSystemId()
getSystemId
???? SchemaType
public int getBlock()
SchemaType.DERIVATION_LIST
and SchemaType.DERIVATION_EXTENSION
getBlock
???? SchemaType
public int getDerivationMethod()
getDerivationMethod
???? SchemaType
SchemaType.DERIVATION_RESTRICTION
public boolean allowsDerivation(int derivation)
allowsDerivation
???? SchemaType
derivation
- the kind of derivation, for example SchemaType.DERIVATION_LIST
public void checkTypeDerivationIsOK(SchemaType type, int block)
checkTypeDerivationIsOK
???? SchemaType
type
- the type from which this type is derivedblock
- the derivations that are blocked by the relevant element declarationpublic int getFingerprint()
getFingerprint
???? SchemaType
public int getNameCode()
getNameCode
???? SchemaType
public java.lang.String getDisplayName()
getDisplayName
???? SchemaType
public boolean isComplexType()
isComplexType
???? SchemaType
public boolean isAnonymousType()
isAnonymousType
???? SchemaType
public SchemaType getKnownBaseType() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if this type is not valid.public boolean isSameType(SchemaType other)
isSameType
???? SchemaType
other
- the other typepublic SchemaType getBaseType()
getBaseType
???? SchemaType
public static Untyped getInstance()
public boolean isAbstract()
isAbstract
???? ComplexType
public boolean isSimpleType()
isSimpleType
???? SchemaType
public boolean isAtomicType()
isAtomicType
???? SchemaType
public boolean isComplexContent()
isComplexContent
???? ComplexType
public boolean isSimpleContent()
isSimpleContent
???? ComplexType
public boolean isAllContent()
isAllContent
???? ComplexType
public SimpleType getSimpleContentType()
getSimpleContentType
???? ComplexType
public boolean isRestricted()
isRestricted
???? ComplexType
public boolean isEmptyContent()
isEmptyContent
???? ComplexType
public boolean isEmptiable()
isEmptiable
???? ComplexType
public boolean isMixedContent()
isMixedContent
???? ComplexType
public java.lang.String getDescription()
getDescription
???? SchemaType
public void analyzeContentExpression(Expression expression, int kind, StaticContext env)
analyzeContentExpression
???? SchemaType
expression
- the expression that delivers the contentkind
- the node kind whose content is being delivered: Type.ELEMENT
,
Type.ATTRIBUTE
, or Type.DOCUMENT
env
- the static contextpublic SequenceIterator getTypedValue(NodeInfo node)
getTypedValue
???? SchemaType
node
- the node whose typed value is requiredpublic Value atomize(NodeInfo node)
getTypedValue(net.sf.saxon.om.NodeInfo)
. However, this method is often more convenient and may be
more efficient, especially in the common case where the value is expected to be a singleton.atomize
???? SchemaType
node
- the node whose typed value is requiredpublic SchemaType getElementParticleType(int fingerprint, boolean considerExtensions)
getElementParticleType
???? ComplexType
fingerprint
- Identifies the name of the child element within this content modelconsiderExtensions
- public int getElementParticleCardinality(int fingerprint, boolean searchExtensionTypes)
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 zero.getElementParticleCardinality
???? ComplexType
fingerprint
- Identifies the name of the child element within this content modelsearchExtensionTypes
- StaticProperty.EMPTY
.public SchemaType getAttributeUseType(int fingerprint)
getAttributeUseType
???? ComplexType
fingerprint
- Identifies the name of the child element within this content modelpublic boolean allowsAttributes()
allowsAttributes
???? ComplexType
public void gatherAllPermittedChildren(IntHashSet children) throws SchemaException
gatherAllPermittedChildren
???? ComplexType
children
- an integer set, initially empty, which on return will hold the fingerprints of all permitted
child elements; if the result contains the value -1, 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 ignored.SchemaException
public void gatherAllPermittedDescendants(IntHashSet descendants) throws SchemaException
gatherAllPermittedDescendants
???? ComplexType
descendants
- an integer set, initially empty, which on return will hold the fingerprints of all permitted
descendant elements; if the result contains the value -1, 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