| java.lang.Object net.sf.saxon.type.AnyType
AnyType | final public class AnyType implements ComplexType,Serializable(Code) | | This class has a singleton instance which represents the XML Schema built-in type xs:anyType,
also known as the urtype.
|
Method Summary | |
public boolean | allowsDerivation(int derivation) | public 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. | public Value | atomize(NodeInfo node) Get the typed value of a node that is annotated with this schema type. | public 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.
If there is no such attribute use, return null. | public SchemaType | getBaseType() | public int | getBlock() | public int | getDerivationMethod() Gets the integer code of the derivation method used to derive this type from its
parent. | public String | getDescription() | public String | getDisplayName() | public int | getElementParticleCardinality(int fingerprint) 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. | public SchemaType | getElementParticleType(int fingerprint) 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.
If there is no such particle, return null. | public int | getFingerprint() | public static AnyType | getInstance() | public SchemaType | getKnownBaseType() Returns the base type that this type inherits from. | public int | getNameCode() Get the namecode of the name of this type. | public SimpleType | getSimpleContentType() For a complex type with simple content, return the simple type of the content. | public SequenceIterator | getTypedValue(NodeInfo node) Get the typed value of a node that is annotated with this schema type
Parameters: node - the node whose typed value is required an iterator returning a single untyped atomic value, equivalent to the string value of the node. | public int | getValidationStatus() | public boolean | isAbstract() Test whether this ComplexType has been marked as abstract. | public boolean | isAllContent() | public boolean | isComplexContent() | public boolean | isComplexType() | public boolean | isEmptiable() | public boolean | isEmptyContent() | public boolean | isMixedContent() | public boolean | isRestricted() | public boolean | isSameType(SchemaType other) Test whether this is the same type as another type. | public boolean | isSimpleContent() | public boolean | isSimpleType() | public void | isTypeDerivationOK(SchemaType type, int block) | public String | subsumes(ComplexType sub) Test whether this complex type subsumes another complex type. |
allowsDerivation | public boolean allowsDerivation(int derivation)(Code) | | Determines whether derivation (of a particular kind)
from this type is allowed, based on the "final" property
Parameters: derivation - the kind of derivation, for example SchemaType.DERIVATION_LIST true if this kind of derivation is allowed |
atomize | public Value atomize(NodeInfo node)(Code) | | Get the typed value of a node that is annotated with this schema type. The result of this method will always be consistent with the method
AnyType.getTypedValue . 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.
Parameters: node - the node whose typed value is required the typed value. since: 8.5 |
getAttributeUseType | public SchemaType getAttributeUseType(int fingerprint)(Code) | | 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.
If there is no such attribute use, return null. If the fingerprint matches an attribute wildcard,
return the type of the global attribute declaration with the given name if one exists, or AnySimpleType
if none exists and lax validation is permitted by the wildcard.
Parameters: fingerprint - Identifies the name of the child element within this content model |
getBaseType | public SchemaType getBaseType()(Code) | | Get the base type
null (this is the root of the type hierarchy) |
getDerivationMethod | public int getDerivationMethod()(Code) | | Gets the integer code of the derivation method used to derive this type from its
parent. Returns zero for primitive types.
a numeric code representing the derivation method, for exampleSchemaType.DERIVATION_RESTRICTION |
getDescription | public String getDescription()(Code) | | Get a description of this type for use in diagnostics
the string "xs:anyType" |
getDisplayName | public String getDisplayName()(Code) | | Get the display name of the type: that is, a lexical QName with an arbitrary prefix
a lexical QName identifying the type |
getElementParticleType | public SchemaType getElementParticleType(int fingerprint)(Code) | | 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.
If there is no such particle, return null. If the fingerprint matches an element wildcard,
return the type of the global element declaration with the given name if one exists, or AnyType
if none exists and lax validation is permitted by the wildcard.
Parameters: fingerprint - Identifies the name of the child element within this content model |
getFingerprint | public int getFingerprint()(Code) | | Get the fingerprint of the name of this type
the fingerprint. |
getInstance | public static AnyType getInstance()(Code) | | Get the singular instance of this class
the singular object representing xs:anyType |
getKnownBaseType | public SchemaType getKnownBaseType() throws IllegalStateException(Code) | | Returns the base type that this type inherits from. This method can be used to get the
base type of a type that is known to be valid.
If this type is a Simpletype that is a built in primitive type then null is returned.
the base type. throws: IllegalStateException - if this type is not valid. |
getNameCode | public int getNameCode()(Code) | | Get the namecode of the name of this type. This includes the prefix from the original
type declaration: in the case of built-in types, there may be a conventional prefix
or there may be no prefix.
|
getSimpleContentType | public SimpleType getSimpleContentType()(Code) | | For a complex type with simple content, return the simple type of the content.
Otherwise, return null.
null: this complex type does not have simple content |
getTypedValue | public SequenceIterator getTypedValue(NodeInfo node)(Code) | | Get the typed value of a node that is annotated with this schema type
Parameters: node - the node whose typed value is required an iterator returning a single untyped atomic value, equivalent to the string value of the node. Thisfollows the standard rules for elements with mixed content. |
getValidationStatus | public int getValidationStatus()(Code) | | Get the validation status - always valid
|
isAbstract | public boolean isAbstract()(Code) | | Test whether this ComplexType has been marked as abstract.
false: this class is not abstract. |
isAllContent | public boolean isAllContent()(Code) | | Test whether this complex type has "all" content, that is, a content model
using an xs:all compositor
false: this complex type does not use an "all" compositor |
isComplexContent | public boolean isComplexContent()(Code) | | Test whether this complex type has complex content
true: this complex type has complex content |
isComplexType | public boolean isComplexType()(Code) | | Test whether this SchemaType is a complex type
true if this SchemaType is a complex type |
isEmptiable | public boolean isEmptiable()(Code) | | Test whether the content model of this complexType allows empty content
true: the content is allowed to be empty |
isEmptyContent | public boolean isEmptyContent()(Code) | | Test whether the content type of this complex type is empty
false: the content model is not empty |
isMixedContent | public boolean isMixedContent()(Code) | | Test whether this complex type allows mixed content
true: mixed content is allowed |
isRestricted | public boolean isRestricted()(Code) | | Test whether this complex type is derived by restriction
false: this type is not a restriction |
isSameType | public boolean isSameType(SchemaType other)(Code) | | Test whether this is the same type as another type. They are considered to be the same type
if they are derived from the same type definition in the original XML representation (which
can happen when there are multiple includes of the same file)
|
isSimpleContent | public boolean isSimpleContent()(Code) | | Test whether this complex type has simple content
false: this complex type has complex content |
isSimpleType | public boolean isSimpleType()(Code) | | Test whether this SchemaType is a simple type
true if this SchemaType is a simple type |
isTypeDerivationOK | public void isTypeDerivationOK(SchemaType type, int block) throws SchemaException(Code) | | Check that this type is validly derived from a given type
Parameters: type - the type from which this type is derived Parameters: block - the derivations that are blocked by the relevant element declaration throws: SchemaException - if the derivation is not allowed |
subsumes | public String subsumes(ComplexType sub)(Code) | | Test whether this complex type subsumes another complex type. The algorithm
used is as published by Thompson and Tobin, XML Europe 2003.
Parameters: sub - the other type (the type that is derived by restriction, validly or otherwise) null indicating that this type does indeed subsume the other; or a string indicatingwhy it doesn't. |
|
|