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

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
ALL_DERIVATIONS, DERIVE_BY_EXTENSION, DERIVE_BY_LIST, DERIVE_BY_RESTRICTION, DERIVE_BY_SUBSTITUTION, DERIVE_BY_UNION, 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 type is a SimpleType
 
Methods inherited from class net.sf.saxon.type.SchemaType
allowsDerivation, checkDerivation, containingDeclarationIsElement, getBaseType, getBaseTypeFingerprint, getBlock, getColumnNumber, getContainingDeclarationName, getDerivationMethod, getDisplayName, getFingerprint, getLineNumber, getNamePool, getPublicId, getSystemId, isComplexType, 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

isSimpleType

public boolean isSimpleType()
Test whether this type is a SimpleType

Specified by:
isSimpleType in interface ComplexType
Specified by:
isSimpleType in class SchemaType
Returns:
false

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.

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".

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)
                               throws XPathException
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.
XPathException