Package net.sf.saxon.type
Interface PlainType
-
- All Superinterfaces:
ItemType
- All Known Subinterfaces:
AtomicType
- All Known Implementing Classes:
BuiltInAtomicType,ErrorType,NumericType
public interface PlainType extends ItemType
A "plain type" is either an atomic type, or a union type that (a) imposes no restrictions other than those imposed by its member types, and (b) has exclusively plain types as its member types
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.sf.saxon.type.ItemType
ItemType.WithSequenceTypeCache
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iterable<? extends PlainType>getPlainMemberTypes()Get the list of plain types that are subsumed by this typeAtomicTypegetPrimitiveItemType()Redeclare getPrimitiveItemType() to return a more specific result type Get the primitive item type corresponding to this item type.StructuredQNamegetTypeName()Get the name of this type as a structured QNamebooleanisExternalType()Ask whether this is an external type, that is, the type of a Java or .NET external objectbooleanmatches(Item item, TypeHierarchy th)Test whether a given item conforms to this type-
Methods inherited from interface net.sf.saxon.type.ItemType
explainMismatch, generateJavaScriptItemTypeAcceptor, generateJavaScriptItemTypeTest, getAlphaCode, getAtomizedItemType, getGenre, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, isTrueItemType, toExportString, toString
-
-
-
-
Method Detail
-
getTypeName
StructuredQName getTypeName()
Get the name of this type as a structured QName- Returns:
- the name of this type. If the type is anonymous, an internally-generated type name is returned
-
isExternalType
boolean isExternalType()
Ask whether this is an external type, that is, the type of a Java or .NET external object- Returns:
- true if this is an external type
-
getPlainMemberTypes
Iterable<? extends PlainType> getPlainMemberTypes() throws MissingComponentException
Get the list of plain types that are subsumed by this type- Returns:
- for an atomic type, the type itself; for a plain union type, the list of plain types in its transitive membership
- Throws:
MissingComponentException
-
matches
boolean matches(Item item, TypeHierarchy th)
Test whether a given item conforms to this type
-
getPrimitiveItemType
AtomicType getPrimitiveItemType()
Redeclare getPrimitiveItemType() to return a more specific result type Get the primitive item type corresponding to this item type. For anyAtomicValue and union types it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. For other atomic types it is the primitive type as defined in XML Schema, except that integer, xs:dayTimeDuration, and xs:yearMonthDuration are considered to be primitive types.- Specified by:
getPrimitiveItemTypein interfaceItemType- Returns:
- the corresponding primitive type (this is an instance of BuiltInAtomicType in all cases except where this type is xs:error. The class ErrorType does not inherit from BuiltInAtomicType because of multiple inheritance problems).
-
-