Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.type
Class Untyped

    java.lang.Object
      net.sf.saxon.type.Untyped

All Implemented Interfaces:
  Serializable, ComplexType, SchemaComponent, SchemaType

    public final class Untyped

extends Object
implements ComplexType, Serializable

This class has a singleton instance which represents the complex type xdt:untyped, used for elements that have not been validated.

See Also:
  Serialized Form

Field Summary

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` | `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
`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.
`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)` 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)` 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.
`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.
`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
`String` | `subsumes(ComplexType sub, ISchemaCompiler compiler)` Test whether this complex type subsumes another complex type.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getValidationStatus

    public int getValidationStatus()

  Get the validation status - always valid

  Specified by:
    `getValidationStatus` in interface `SchemaComponent`
  Returns:
    one of the values `SchemaComponent.UNVALIDATED`, `SchemaComponent.VALIDATING`, `SchemaComponent.VALIDATED`, `SchemaComponent.INVALID`, `SchemaComponent.INCOMPLETE`

### getBlock

    public 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`

  Specified by:
    `getBlock` in interface `SchemaType`
  Returns:
    the value of the 'block' attribute for this type

### getDerivationMethod

    public int getDerivationMethod()

  Gets the integer code of the derivation method used to derive this type from its parent. Returns zero for primitive types.

  Specified by:
    `getDerivationMethod` in interface `SchemaType`
  Returns:
    a numeric code representing the derivation method, for example `SchemaType.DERIVATION_RESTRICTION`

### allowsDerivation

    public boolean allowsDerivation(int derivation)

  Determines whether derivation (of a particular kind) from this type is allowed, based on the "final" property

  Specified by:
    `allowsDerivation` in interface `SchemaType`
  Parameters:
    `derivation` - the kind of derivation, for example `SchemaType.DERIVATION_LIST`
  Returns:
    true if this kind of derivation is allowed

### checkTypeDerivationIsOK

    public void checkTypeDerivationIsOK(SchemaType type,
                                        int block)

  Check that this type is validly derived from a given type

  Specified by:
    `checkTypeDerivationIsOK` in interface `SchemaType`
  Parameters:
    `type` - the type from which this type is derived
    `block` - the derivations that are blocked by the relevant element declaration

### getFingerprint

    public int getFingerprint()

  Get the fingerprint of the name of this type

  Specified by:
    `getFingerprint` in interface `SchemaType`
  Returns:
    the fingerprint. Returns an invented fingerprint for an anonymous type.

### getNameCode

    public int getNameCode()

  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.

  Specified by:
    `getNameCode` in interface `SchemaType`

### getDisplayName

    public String getDisplayName()

  Get the display name of the type: that is, a lexical QName with an arbitrary prefix

  Specified by:
    `getDisplayName` in interface `SchemaType`
  Returns:
    a lexical QName identifying the type

### isComplexType

    public boolean isComplexType()

  Test whether this SchemaType is a complex type

  Specified by:
    `isComplexType` in interface `SchemaType`
  Returns:
    true if this SchemaType is a complex type

### isAnonymousType

    public boolean isAnonymousType()

  Test whether this is an anonymous type

  Specified by:
    `isAnonymousType` in interface `SchemaType`
  Returns:
    true if this SchemaType is an anonymous type

### getKnownBaseType

    public SchemaType getKnownBaseType()
                                throws IllegalStateException

  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.

  Returns:
    the base type.
  Throws:
    `IllegalStateException` - if this type is not valid.

### isSameType

    public boolean isSameType(SchemaType other)

  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)

  Specified by:
    `isSameType` in interface `SchemaType`

### getBaseType

    public SchemaType getBaseType()

  Returns the base type that this type inherits from. If this type is a Simpletype that is a built in primitive type then null is returned.

  Specified by:
    `getBaseType` in interface `SchemaType`
  Returns:
    the base type.

### getInstance

    public static Untyped 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 interface `SchemaType`
  Returns:
    true if this SchemaType is a simple type

### isAtomicType

    public boolean isAtomicType()

  Test whether this SchemaType is an atomic type

  Specified by:
    `isAtomicType` in interface `SchemaType`
  Returns:
    true if this SchemaType is an atomic 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:
    true: this type is treated as a restriction of xs:anyType

### 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

### getDescription

    public String getDescription()

  Get a description of this type for use in diagnostics

  Specified by:
    `getDescription` in interface `SchemaType`
  Returns:
    the string "xs:anyType"

### analyzeContentExpression

    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.

  Specified by:
    `analyzeContentExpression` in interface `SchemaType`
  Parameters:
    `expression` - the expression that delivers the content
    `kind` - the node kind whose content is being delivered: `Type.ELEMENT`, `Type.ATTRIBUTE`, or `Type.DOCUMENT`
    `env` -

### getTypedValue

    public SequenceIterator getTypedValue(NodeInfo node)

  Get the typed value of a node that is annotated with this schema type

  Specified by:
    `getTypedValue` in interface `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.

### atomize

    public Value atomize(NodeInfo node)

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

  Specified by:
    `atomize` in interface `SchemaType`
  Parameters:
    `node` - the node whose typed value is required
  Returns:
    the typed value.
  Since:
    8.5

### subsumes

    public String subsumes(ComplexType sub,
                           ISchemaCompiler compiler)

  Test whether this complex type subsumes another complex type. The algorithm used is as published by Thompson and Tobin, XML Europe 2003.

  Specified by:
    `subsumes` in interface `ComplexType`
  Parameters:
    `sub` - the other type (the type that is derived by restriction, validly or otherwise)
    `compiler` -
  Returns:
    null indicating that this type does indeed subsume the other; or a string indicating why it doesn't.

### getElementParticleType

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

  Specified by:
    `getElementParticleType` in interface `ComplexType`
  Parameters:
    `fingerprint` - Identifies the name of the child element within this content model

### getElementParticleCardinality

    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. The value is one of `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.

  Specified by:
    `getElementParticleCardinality` in interface `ComplexType`
  Parameters:
    `fingerprint` - Identifies the name of the child element within this content model

### getAttributeUseType

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

  Specified by:
    `getAttributeUseType` in interface `ComplexType`
  Parameters:
    `fingerprint` - Identifies the name of the child element within this content model

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Michael H. Kay. All rights reserved.