|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.type.AnyType
public final class AnyType
This class has a singleton instance which represents the XML Schema built-in type xs:anyType, also known as the urtype. See XML Schema 1.1 Part 1 section 3.4.7
| Field Summary |
|---|
| Fields inherited from interface net.sf.saxon.type.ComplexType |
|---|
OPEN_CONTENT_ABSENT, OPEN_CONTENT_INTERLEAVE, OPEN_CONTENT_NONE, OPEN_CONTENT_SUFFIX, VARIETY_ELEMENT_ONLY, VARIETY_EMPTY, VARIETY_MIXED, VARIETY_SIMPLE |
| Fields inherited from interface net.sf.saxon.type.SchemaType |
|---|
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION |
| Fields inherited from interface net.sf.saxon.type.SchemaComponent |
|---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
| Method Summary | |
|---|---|
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 |
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(IntHashSet 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(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. |
int |
getAttributeUseCardinality(int fingerprint)
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(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()
Get the base type |
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. |
int |
getDescendantElementCardinality(int fingerprint)
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(int 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. |
String |
getDescription()
Get a description of this type for use in diagnostics |
String |
getDisplayName()
Get the display name of the type: that is, a lexical QName with an arbitrary prefix |
int |
getElementParticleCardinality(int fingerprint,
boolean considerExtensions)
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 AnyType |
getInstance()
Get the singular instance of this class |
SchemaType |
getKnownBaseType()
Returns the base type that this type inherits from. |
String |
getName()
Get the local name of this type |
int |
getNameCode()
Get the namecode of the name of this type. |
int |
getRedefinitionLevel()
Get the redefinition level. |
SimpleType |
getSimpleContentType()
For a complex type with simple content, return the simple type of the content. |
String |
getSystemId()
Get the URI of the schema document containing the definition of this type |
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 |
int |
getVariety()
Get the variety of this complex type. |
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 |
isIdRefType()
Ask whether this type is an IDREF or IDREFS type. |
boolean |
isIdType()
Ask whether this type is an ID type. |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AnyType getInstance()
public String getName()
getName in interface SchemaTypepublic String getTargetNamespace()
getTargetNamespace in interface SchemaTypepublic int getVariety()
ComplexType.VARIETY_EMPTY, ComplexType.VARIETY_MIXED, ComplexType.VARIETY_SIMPLE, or
ComplexType.VARIETY_ELEMENT_ONLY
getVariety in interface ComplexTypepublic int getValidationStatus()
getValidationStatus in interface SchemaComponentSchemaComponent.UNVALIDATED, SchemaComponent.VALIDATING,
SchemaComponent.VALIDATED, SchemaComponent.INVALID, SchemaComponent.INCOMPLETEpublic int getRedefinitionLevel()
getRedefinitionLevel in interface SchemaComponentpublic SchemaType getBaseType()
getBaseType in interface SchemaType
public SchemaType getKnownBaseType()
throws IllegalStateException
IllegalStateException - if this type is not valid.public int getDerivationMethod()
getDerivationMethod in interface SchemaTypeSchemaType.DERIVATION_RESTRICTIONpublic boolean allowsDerivation(int derivation)
allowsDerivation in interface SchemaTypederivation - the kind of derivation, for example SchemaType.DERIVATION_LIST
public boolean isAbstract()
isAbstract in interface ComplexTypepublic boolean isComplexType()
isComplexType in interface SchemaTypepublic boolean isAnonymousType()
isAnonymousType in interface SchemaTypepublic boolean isSimpleType()
isSimpleType in interface SchemaTypepublic boolean isAtomicType()
isAtomicType in interface SchemaTypepublic boolean isIdType()
isIdType in interface SchemaTypepublic boolean isIdRefType()
isIdRefType in interface SchemaTypepublic int getBlock()
SchemaType.DERIVATION_LIST and SchemaType.DERIVATION_EXTENSION
getBlock in interface SchemaTypepublic boolean isComplexContent()
isComplexContent in interface ComplexTypepublic boolean isSimpleContent()
isSimpleContent in interface ComplexTypepublic boolean isAllContent()
isAllContent in interface ComplexTypepublic SimpleType getSimpleContentType()
getSimpleContentType in interface ComplexTypepublic boolean isRestricted()
isRestricted in interface ComplexTypepublic boolean isEmptyContent()
isEmptyContent in interface ComplexTypepublic boolean isEmptiable()
isEmptiable in interface ComplexTypepublic boolean isMixedContent()
isMixedContent in interface ComplexTypepublic int getFingerprint()
getFingerprint in interface SchemaTypepublic int getNameCode()
getNameCode in interface SchemaTypepublic String getDescription()
getDescription in interface SchemaTypepublic String getDisplayName()
getDisplayName in interface SchemaTypepublic String getSystemId()
getSystemId in interface SchemaTypepublic boolean isSameType(SchemaType other)
isSameType in interface SchemaTypeother - the other type
public void analyzeContentExpression(Expression expression,
int kind,
StaticContext env)
analyzeContentExpression in interface SchemaTypeexpression - the expression that delivers the contentkind - the node kind whose content is being delivered: Type.ELEMENT,
Type.ATTRIBUTE, or Type.DOCUMENTenv - public SequenceIterator getTypedValue(NodeInfo node)
getTypedValue in interface SchemaTypenode - the node whose typed value is required
public 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 in interface SchemaTypenode - the node whose typed value is required
public void checkTypeDerivationIsOK(SchemaType type,
int block)
throws SchemaException
checkTypeDerivationIsOK in interface SchemaTypetype - the type from which this type is derivedblock - the derivations that are blocked by the relevant element declaration
SchemaException - if the derivation is not allowed
public SchemaType getElementParticleType(int fingerprint,
boolean considerExtensions)
getElementParticleType in interface ComplexTypefingerprint - Identifies the name of the child element within this content modelconsiderExtensions -
public int getElementParticleCardinality(int fingerprint,
boolean considerExtensions)
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 in interface ComplexTypefingerprint - Identifies the name of the child element within this content modelconsiderExtensions -
StaticProperty.EMPTY.public SimpleType getAttributeUseType(int fingerprint)
getAttributeUseType in interface ComplexTypefingerprint - Identifies the name of the child element within this content model
public int getAttributeUseCardinality(int fingerprint)
throws SchemaException
getAttributeUseCardinality in interface ComplexTypefingerprint - Identifies the name of the child element within this content model
SchemaExceptionpublic boolean allowsAttributes()
allowsAttributes in interface ComplexType
public void gatherAllPermittedChildren(IntHashSet children,
boolean ignoreWildcards)
throws SchemaException
gatherAllPermittedChildren in interface ComplexTypechildren - 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 shouldignoreWildcards -
SchemaException
public void gatherAllPermittedDescendants(IntHashSet descendants)
throws SchemaException
gatherAllPermittedDescendants in interface ComplexTypedescendants - 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
public SchemaType getDescendantElementType(int fingerprint)
throws SchemaException
getDescendantElementType in interface ComplexTypefingerprint - the name of the required descendant element
SchemaException
public int getDescendantElementCardinality(int fingerprint)
throws SchemaException
getDescendantElementCardinality in interface ComplexTypefingerprint - the name of the required descendant element
SchemaExceptionpublic boolean containsElementWildcard()
containsElementWildcard in interface ComplexType
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||