public interface UnionType extends SimpleType, ItemType
SchemaComponent.ValidationStatus
ItemType.WithSequenceTypeCache
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION, DERIVE_BY_SUBSTITUTION
COMPONENT_FUNCTION_TYPE
Modifier and Type | Method and Description |
---|---|
ValidationFailure |
checkAgainstFacets(AtomicValue value,
ConversionRules rules)
Validate an atomic value, which is known to be an instance of one of the member types of the
union, against any facets (pattern facets or enumeration facets) defined at the level of the
union itself.
|
boolean |
containsListType()
Ask whether the union contains a list type among its member types
|
default java.util.Optional<java.lang.String> |
explainMismatch(Item item,
TypeHierarchy th)
Get extra diagnostic information about why a supplied item does not conform to this
item type, if available.
|
java.lang.Iterable<PlainType> |
getPlainMemberTypes()
Get the "plain" types in the transitive membership.
|
SequenceType |
getResultTypeOfCast()
Get the result type of a cast operation to this union type, as a sequence type.
|
getBuiltInBaseType, getTypedValue, getWhitespaceAction, isAtomicType, isBuiltInType, isExternalType, isListType, isNamespaceSensitive, isUnionType, postprocess, preprocess, validateContent
allowsDerivation, analyzeContentExpression, atomize, checkTypeDerivationIsOK, getBaseType, getBlock, getDerivationMethod, getDescription, getDisplayName, getEQName, getFinalProhibitions, getFingerprint, getName, getNearestNamedType, getStructuredQName, getSystemId, getTargetNamespace, isAnonymousType, isComplexType, isIdRefType, isIdType, isSameType, isSimpleType
getComponentAsFunction, getRedefinitionLevel, getValidationStatus
generateJavaScriptItemTypeAcceptor, generateJavaScriptItemTypeTest, getAlphaCode, getAtomizedItemType, getGenre, getPrimitiveItemType, getPrimitiveType, getUType, isAtomicType, isAtomizable, isPlainType, isTrueItemType, matches, toExportString, toString
boolean containsListType() throws MissingComponentException
MissingComponentException
java.lang.Iterable<PlainType> getPlainMemberTypes() throws MissingComponentException
MissingComponentException
SequenceType getResultTypeOfCast()
ValidationFailure checkAgainstFacets(AtomicValue value, ConversionRules rules)
value
- the Atomic Value to be checked. This must be an instance of a member type of the
unionrules
- the ConversionRules for the Configurationdefault java.util.Optional<java.lang.String> explainMismatch(Item item, TypeHierarchy th)
explainMismatch
in interface ItemType
item
- the item that doesn't match this typeth
- the type hierarchy cacheCopyright (c) 2004-2020 Saxonica Limited. All rights reserved.