net.sf.saxon.type
Class AnyType

java.lang.Object
  |
  +--net.sf.saxon.type.SchemaType
        |
        +--net.sf.saxon.type.AnyType
All Implemented Interfaces:
ComplexType, java.io.Serializable, javax.xml.transform.SourceLocator, TypeInfo

public final class AnyType
extends SchemaType
implements ComplexType

This class has a singleton instance which represents the XML Schema built-in type xs:anyType, also known as the urtype.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.type.SchemaType
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION, finalProhibitions, INVALID, UNVALIDATED, VALIDATED, VALIDATING, validationPhase
 
Method Summary
 java.lang.String getDescription()
          Get a description of this type for use in diagnostics
static AnyType getInstance()
          Get the singular instance of this class
 java.lang.String getLocalName()
          Get the local name of this type.
 SimpleType getSimpleContentType()
          For a complex type with simple content, return the simple type of the content.
 SequenceIterator getTypedValue(NodeInfo node)
          Get the typed value of a node that is annotated with this schema 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 isComplexContent()
          Test whether this complex type has complex content
 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 isSimpleContent()
          Test whether this complex type has simple content
 boolean isSimpleType()
          Test whether this SchemaType is a simple type
 int relationshipTo(SchemaType other)
          Determine the relationship of this schema type to another schema type.
 
Methods inherited from class net.sf.saxon.type.SchemaType
allowsDerivation, checkDerivation, containingDeclarationIsElement, getBaseType, getBaseTypeFingerprint, getBlock, getColumnNumber, getContainingDeclarationName, getDerivationMethod, getDisplayName, getFingerprint, getLineNumber, getNamePool, getPublicId, getSystemId, getTypeName, getTypeNamespace, isComplexType, isDerivedFrom, isSameType, setBaseType, setBaseTypeFingerprint, setContainingDeclaration, setDerivationMethod, setDerivationMethodName, setFinalProhibitions, setFingerprint, setLineNumber, setLocalName, setLocator, setNamePool, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.saxon.type.ComplexType
getBaseType
 

Method Detail

getInstance

public static AnyType getInstance()
Get the singular instance of this class

Returns:
the singular object representing xs:anyType

isAbstract

public boolean isAbstract()
Test whether this ComplexType has been marked as abstract.

Specified by:
isAbstract in interface ComplexType
Returns:
false: this class is not abstract.

isSimpleType

public boolean isSimpleType()
Test whether this SchemaType is a simple type

Specified by:
isSimpleType in class SchemaType
Returns:
true if this SchemaType is a simple type

isComplexContent

public boolean isComplexContent()
Test whether this complex type has complex content

Specified by:
isComplexContent in interface ComplexType
Returns:
true: this complex type has complex content

isSimpleContent

public boolean isSimpleContent()
Test whether this complex type has simple content

Specified by:
isSimpleContent in interface ComplexType
Returns:
false: this complex type has complex content

isAllContent

public boolean isAllContent()
Test whether this complex type has "all" content, that is, a content model using an xs:all compositor

Specified by:
isAllContent in interface ComplexType
Returns:
false: this complex type does not use an "all" compositor

getSimpleContentType

public SimpleType getSimpleContentType()
For a complex type with simple content, return the simple type of the content. Otherwise, return null.

Specified by:
getSimpleContentType in interface ComplexType
Returns:
null: this complex type does not have simple content

isRestricted

public boolean isRestricted()
Test whether this complex type is derived by restriction

Specified by:
isRestricted in interface ComplexType
Returns:
false: this type is not a restriction

isEmptyContent

public boolean isEmptyContent()
Test whether the content type of this complex type is empty

Specified by:
isEmptyContent in interface ComplexType
Returns:
false: the content model is not empty

isEmptiable

public boolean isEmptiable()
Test whether the content model of this complexType allows empty content

Specified by:
isEmptiable in interface ComplexType
Returns:
true: the content is allowed to be empty

isMixedContent

public boolean isMixedContent()
Test whether this complex type allows mixed content

Specified by:
isMixedContent in interface ComplexType
Returns:
true: mixed content is allowed

getLocalName

public java.lang.String getLocalName()
Get the local name of this type.

Overrides:
getLocalName in class SchemaType
Returns:
the string "anyType".

relationshipTo

public int relationshipTo(SchemaType other)
Determine the relationship of this schema type to another schema type.

Specified by:
relationshipTo in class SchemaType
Parameters:
other - the other schema type
Returns:
Type.SAME_TYPE if the types are the same; Type.SUBSUMES if the first type subsumes the second (that is, all instances of the second type are also instances of the first); Type.SUBSUMED_BY if the second type subsumes the first; Type.OVERLAPS if the two types overlap (have a non-empty intersection); Type.DISJOINT if the two types are disjoint (have an empty intersection)

getDescription

public java.lang.String getDescription()
Get a description of this type for use in diagnostics

Overrides:
getDescription in class SchemaType
Returns:
the string "xs:anyType"

getTypedValue

public SequenceIterator getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type

Specified by:
getTypedValue in class SchemaType
Parameters:
node - the node whose typed value is required
Returns:
an iterator returning a single untyped atomic value, equivalent to the string value of the node. This follows the standard rules for elements with mixed content.