Package org.rumbledb.types
Class DerivedAtomicItemType
java.lang.Object
org.rumbledb.types.DerivedAtomicItemType
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,ItemType
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanBePromotedTo(ItemType other) booleanTests for itemType equality.Casting-specific primitive normalization used by cast/castable logic.getName()Returns the pattern facet for this item type.Returns the SparkSQL type of the item type for use in a query.intbooleanhasName()Tests for QName.booleanbooleanCasting-specific primitive notion from XPath/XQuery Functions and Operators 3.1 §19: in addition to XML Schema primitive types, xs:integer, xs:yearMonthDuration, and xs:dayTimeDuration are treated as primitive for casting.booleanisCompatibleWithDataFrames(RumbleRuntimeConfiguration configuration) Checks compatibility with DataFrames.booleanbooleanbooleanisStaticallyCastableAs(ItemType other) Check at static time if [this] could be casted to [other] item type, requires [this] to be an atomic typebooleanvoidvoidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidresolve(DynamicContext context, ExceptionMetadata metadata) voidresolve(StaticContext context, ExceptionMetadata metadata) toString()voidwrite(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.rumbledb.types.ItemType
findLeastCommonSuperTypeLax, findLeastCommonSuperTypeWith, getArrayContentFacet, getClosedFacet, getLexicalSpacePatterns, getMapKeyItemType, getMapValueSequenceType, getMemberSequenceType, getObjectContentFacet, getSignature, getTypes, isArrayItemType, isEqualTo, isFunctionItemType, isJsonItemType, isMapItemType, isNodeItemType, isObjectItemType, isResolved, isSubtypeOf, isTopmostItemType, isUnionType, isXQueryArrayItemType
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-
equals
Description copied from interface:ItemTypeTests for itemType equality. -
isAtomicItemType
public boolean isAtomicItemType()- Specified by:
isAtomicItemTypein interfaceItemType- Returns:
- true it [this] is a subtype of an atomic item type.
-
isNumeric
public boolean isNumeric() -
hasName
public boolean hasName()Description copied from interface:ItemTypeTests for QName. -
getName
-
getTypeTreeDepth
public int getTypeTreeDepth()- Specified by:
getTypeTreeDepthin interfaceItemType- Returns:
- an int representing the depth of the item type in the type tree ('item' is the root with depth 0)
-
isStaticallyCastableAs
Description copied from interface:ItemTypeCheck at static time if [this] could be casted to [other] item type, requires [this] to be an atomic type- Specified by:
isStaticallyCastableAsin interfaceItemType- Parameters:
other- a strict subtype of atomic item type to which we are trying to cast- Returns:
- true if it is possible at static time to cast [this] to [other], false otherwise
-
canBePromotedTo
- Specified by:
canBePromotedToin interfaceItemType- Parameters:
other- another item type- Returns:
- true if [this] can be promoted to [itemType]
-
isUserDefined
public boolean isUserDefined()- Specified by:
isUserDefinedin interfaceItemType- Returns:
- [true] if it is a user-defined type, false otherwise
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitivein interfaceItemType- Returns:
- [true] if it is a primitive type
-
getPrimitiveType
- Specified by:
getPrimitiveTypein interfaceItemType- Returns:
- the primitive type for a derived type, throw an error for primitive types
-
isCastingPrimitive
public boolean isCastingPrimitive()Description copied from interface:ItemTypeCasting-specific primitive notion from XPath/XQuery Functions and Operators 3.1 §19: in addition to XML Schema primitive types, xs:integer, xs:yearMonthDuration, and xs:dayTimeDuration are treated as primitive for casting.- Specified by:
isCastingPrimitivein interfaceItemType- Returns:
- [true] if this type is considered primitive for casting semantics.
-
getCastingPrimitiveType
Description copied from interface:ItemTypeCasting-specific primitive normalization used by cast/castable logic.- Specified by:
getCastingPrimitiveTypein interfaceItemType- Returns:
- this type if it is a casting primitive; otherwise its casting primitive ancestor.
-
getBaseType
- Specified by:
getBaseTypein interfaceItemType- Returns:
- the base type for a type, return null for the topmost item type
-
getAllowedFacets
- Specified by:
getAllowedFacetsin interfaceItemType- Returns:
- a set containing the allowed facets for restricting the type
-
getEnumerationFacet
- Specified by:
getEnumerationFacetin interfaceItemType- Returns:
- the list of possible values for [this] item type or null if the enumeration facet is not set
-
getConstraintsFacet
- Specified by:
getConstraintsFacetin interfaceItemType- Returns:
- the list of constraints in the implementation-defined language for [this] item type (note that this facet is cumulative) or an empty list if the constraints facet is not set
-
getMinLengthFacet
- Specified by:
getMinLengthFacetin interfaceItemType- Returns:
- the minimum length facet value for [this] item type or null if the restriction is not set
-
getLengthFacet
- Specified by:
getLengthFacetin interfaceItemType- Returns:
- the length facet value for [this] item type or null if the restriction is not set
-
getMaxLengthFacet
- Specified by:
getMaxLengthFacetin interfaceItemType- Returns:
- the maximum length facet value for [this] item type or null if the restriction is not set
-
getMinExclusiveFacet
- Specified by:
getMinExclusiveFacetin interfaceItemType- Returns:
- an item representing the minimum possible value (excluded) for [this] item type or null if the restriction is not set
-
getMinInclusiveFacet
- Specified by:
getMinInclusiveFacetin interfaceItemType- Returns:
- an item representing the minimum possible value (included) for [this] item type or null if the restriction is not set
-
getMaxExclusiveFacet
- Specified by:
getMaxExclusiveFacetin interfaceItemType- Returns:
- an item representing the maximum possible value (excluded) for [this] item type or null if the restriction is not set
-
getMaxInclusiveFacet
- Specified by:
getMaxInclusiveFacetin interfaceItemType- Returns:
- an item representing the maximum possible value (included) for [this] item type or null if the restriction is not set
-
getTotalDigitsFacet
- Specified by:
getTotalDigitsFacetin interfaceItemType- Returns:
- the total digits facet value for [this] item type or null if the restriction is not set
-
getFractionDigitsFacet
- Specified by:
getFractionDigitsFacetin interfaceItemType- Returns:
- the fraction digits facet value for [this] item type or null if the restriction is not set
-
getExplicitTimezoneFacet
- Specified by:
getExplicitTimezoneFacetin interfaceItemType- Returns:
- the explicit timezone facet value for [this] item type or null if the restriction is not set
-
getWhitespaceFacet
- Specified by:
getWhitespaceFacetin interfaceItemType- Returns:
- the whiteSpace facet value for [this] item type or null if the restriction is not set
-
getPatternFacet
Description copied from interface:ItemTypeReturns the pattern facet for this item type. This reflects pattern facets applied via derivation (for example onDerivedAtomicItemType), not the full lexical space of a primitive atomic type.- Specified by:
getPatternFacetin interfaceItemType- Returns:
- the list of pattern regex strings for this derivation step, or null if no pattern restriction is set
-
getOrderedFacet
- Specified by:
getOrderedFacetin interfaceItemType- Returns:
- the ordered fundamental facet value, or null if not set
-
getBoundedFacet
- Specified by:
getBoundedFacetin interfaceItemType- Returns:
- the bounded fundamental facet value, or null if not set
-
getCardinalityFacet
- Specified by:
getCardinalityFacetin interfaceItemType- Returns:
- the cardinality fundamental facet value, or null if not set
-
getNumericFacet
- Specified by:
getNumericFacetin interfaceItemType- Returns:
- the numeric fundamental facet value, or null if not set
-
getIdentifierString
- Specified by:
getIdentifierStringin interfaceItemType- Returns:
- a String that uniquely identify an item type
-
toString
-
isCompatibleWithDataFrames
Description copied from interface:ItemTypeChecks compatibility with DataFrames.- Specified by:
isCompatibleWithDataFramesin interfaceItemType- Returns:
- true if compatible with DataFrames and false otherwise.
-
resolve
-
resolve
-
processBaseType
public void processBaseType() -
getSparkSQLType
Description copied from interface:ItemTypeReturns the SparkSQL type of the item type for use in a query.- Specified by:
getSparkSQLTypein interfaceItemType- Returns:
- String representing the SparkSQL type of the item type.
-