Package net.sf.saxon.ma.map
Interface TupleType
- All Superinterfaces:
FunctionItemType
,ItemType
- All Known Implementing Classes:
RecordTest
,SelfReferenceRecordTest
An instance of this class represents a specific tuple item type, for example
tuple(x as xs:double, y as element(employee)).
Tuple types are a Saxon extension introduced in Saxon 9.8. The syntax for constructing
a tuple type requires Saxon-PE or higher, but the supporting code is included in
Saxon-HE for convenience.
Extended in 10.0 to distinguish extensible vs non-extensible tuple types. Extensible tuple
types permit fields other than those listed to appear; non-extensible tuple types do not.
-
Method Summary
Modifier and TypeMethodDescriptionGet the names of all the fieldsgetFieldType
(String field) Get the type of a given fieldboolean
Ask whether the tuple type is extensible, that is, whether fields other than those named are permittedboolean
isOptionalField
(String field) Ask whether a given field is optionalMethods inherited from interface net.sf.saxon.type.FunctionItemType
getAnnotationAssertions, getArgumentTypes, getGenre, getResultType, isArrayType, isMapType, makeFunctionSequenceCoercer, relationship
Methods inherited from interface net.sf.saxon.type.ItemType
explainMismatch, getAtomizedItemType, getBasicAlphaCode, getDefaultPriority, getFullAlphaCode, getNormalizedDefaultPriority, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, matches, toExportString
-
Method Details
-
getFieldNames
Get the names of all the fields- Returns:
- the names of the fields (in arbitrary order)
-
getFieldType
Get the type of a given field- Parameters:
field
- the name of the field- Returns:
- the type of the field if it is defined, or null otherwise
-
isOptionalField
Ask whether a given field is optional- Parameters:
field
- the name of the field- Returns:
- true if the field is defined as an optional field
-
isExtensible
boolean isExtensible()Ask whether the tuple type is extensible, that is, whether fields other than those named are permitted- Returns:
- true if fields other than the named fields are permitted to appear
-