|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
SchemaType is an interface implemented by all schema types: simple and complex types, built-in and user-defined types.
There is a hierarchy of interfaces that extend SchemaType, representing the top levels of the schema type system: SimpleType and ComplexType, with SimpleType further subdivided into List, Union, and Atomic types.
The implementations of these interfaces are organized into a different hierarchy: on the one side, built-in types such as AnyType, AnySimpleType, and the built-in atomic types and list types; on the other side, user-defined types defined in a schema.
| Field Summary | |
static int |
DERIVATION_EXTENSION
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by extension. |
static int |
DERIVATION_LIST
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the list. |
static int |
DERIVATION_RESTRICTION
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the derivation by restriction if complex types are involved, or a restriction if simple types are involved. |
static int |
DERIVATION_UNION
If the document's schema is an XML Schema [XML Schema Part 1] , this constant represents the union if simple types are involved. |
static int |
DERIVE_BY_SUBSTITUTION
Derivation 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. |
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 DERIVATION_LIST and DERIVATION_EXTENSION |
int |
getDerivationMethod()
Gets the integer code of the derivation method used to derive this type from its parent. |
java.lang.String |
getDescription()
Get a description of this type for use in error messages. |
java.lang.String |
getDisplayName()
Get the display name of the type: that is, a lexical QName with an arbitrary prefix |
int |
getFingerprint()
Get the fingerprint of the name of this type |
int |
getNameCode()
Get the namecode of the name of this type. |
SequenceIterator |
getTypedValue(NodeInfo node)
Get the typed value of a node that is annotated with this schema type. |
boolean |
isComplexType()
Test whether this SchemaType is a complex type |
boolean |
isSameType(SchemaType other)
Test whether this is the same type as another type. |
boolean |
isSimpleType()
Test whether this SchemaType is a simple type |
void |
isTypeDerivationOK(SchemaType base,
int block)
Check that this type is validly derived from a given type, following the rules for the Schema Component Constraint "Is Type Derivation OK (Simple)" (3.14.6) or "Is Type Derivation OK (Complex)" (3.4.6) as appropriate. |
| Methods inherited from interface net.sf.saxon.type.SchemaComponent |
getValidationStatus |
| Field Detail |
public static final int DERIVATION_RESTRICTION
public static final int DERIVATION_EXTENSION
public static final int DERIVATION_UNION
DERIVATION_RESTRICTION or
DERIVATION_EXTENSION, T2 is derived from the other type
definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be
the same as the reference type definition, and T2 could be the same
as the other type definition.
public static final int DERIVATION_LIST
DERIVATION_RESTRICTION or
DERIVATION_EXTENSION, T2 is derived from the other type
definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as
the reference type definition, and T2 could be the same as the other
type definition.
public static final int DERIVE_BY_SUBSTITUTION
| Method Detail |
public int getNameCode()
public int getFingerprint()
public java.lang.String getDisplayName()
public boolean isComplexType()
public boolean isSimpleType()
public int getBlock()
DERIVATION_LIST and DERIVATION_EXTENSION
public SchemaType getBaseType()
throws UnresolvedReferenceException
java.lang.IllegalStateException - if this type is not valid.
UnresolvedReferenceExceptionpublic int getDerivationMethod()
DERIVATION_RESTRICTIONpublic boolean allowsDerivation(int derivation)
derivation - the kind of derivation, for example DERIVATION_LIST
public void analyzeContentExpression(Expression expression,
int kind,
StaticContext env)
throws XPathException
expression - the expression that delivers the contentkind - the node kind whose content is being delivered: Type.ELEMENT,
Type.ATTRIBUTE, or Type.DOCUMENTenv - The static evaluation context for the query or stylesheet
XPathException - if the expression will never deliver a value of the correct type
public SequenceIterator getTypedValue(NodeInfo node)
throws XPathException
node - the node whose typed value is required
AtomicValue
XPathExceptionpublic boolean isSameType(SchemaType other)
public java.lang.String getDescription()
public void isTypeDerivationOK(SchemaType base,
int block)
throws SchemaException,
ValidationException
base - the base type; the algorithm tests whether derivation from this type is permittedblock - the derivations that are blocked by the relevant element declaration
SchemaException - if the derivation is not allowed
ValidationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||