Package org.rumbledb.types
Class ArrayItemType
java.lang.Object
org.rumbledb.types.ArrayItemType
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable,Serializable,ItemType
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemTypevoidbooleanTests for itemType equality.Finds a lax (non-strict) common supertype that can incorporate anonymous facets when possible.getName()Returns the SparkSQL type of the item type for use in a query.intbooleanhasName()Tests for QName.booleanbooleanisCompatibleWithDataFrames(RumbleRuntimeConfiguration configuration) Checks compatibility with DataFrames.booleanbooleanbooleanisSubtypeOf(ItemType superType) booleanvoidvoidread(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
canBePromotedTo, findLeastCommonSuperTypeWith, getBoundedFacet, getCardinalityFacet, getCastingPrimitiveType, getClosedFacet, getConstraintsFacet, getExplicitTimezoneFacet, getFractionDigitsFacet, getLengthFacet, getLexicalSpacePatterns, getMapKeyItemType, getMapValueSequenceType, getMaxExclusiveFacet, getMaxInclusiveFacet, getMemberSequenceType, getMinExclusiveFacet, getMinInclusiveFacet, getNumericFacet, getObjectContentFacet, getOrderedFacet, getPatternFacet, getSignature, getTotalDigitsFacet, getTypes, getWhitespaceFacet, isAtomicItemType, isCastingPrimitive, isEqualTo, isFunctionItemType, isJsonItemType, isMapItemType, isNodeItemType, isNumeric, isObjectItemType, isStaticallyCastableAs, isTopmostItemType, isUnionType, isXQueryArrayItemType
-
Method Details
-
arrayOf
-
equals
Description copied from interface:ItemTypeTests for itemType equality. -
isArrayItemType
public boolean isArrayItemType()- Specified by:
isArrayItemTypein interfaceItemType- Returns:
- true it [this] is an array item type.
-
isSubtypeOf
- Specified by:
isSubtypeOfin interfaceItemType- Parameters:
superType- another item type- Returns:
- true if [this] is a subtype of [superType], any type is considered a subtype of itself. If [this] has a name, then this is determined strictly based on the hierarchy. If [this] does not have a name, then this is determined based on facets.
-
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)
-
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
-
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
-
getMinLengthFacet
- Specified by:
getMinLengthFacetin interfaceItemType- Returns:
- the minimum 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
-
getArrayContentFacet
- Specified by:
getArrayContentFacetin interfaceItemType- Returns:
- content facet value for array item types
-
findLeastCommonSuperTypeLax
Description copied from interface:ItemTypeFinds a lax (non-strict) common supertype that can incorporate anonymous facets when possible. The default implementation falls back to the strict least-common-supertype logic.- Specified by:
findLeastCommonSuperTypeLaxin interfaceItemType- Parameters:
other- another item type- Returns:
- a lax common supertype between [this] and [other]
-
getIdentifierString
- Specified by:
getIdentifierStringin interfaceItemType- Returns:
- a String that uniquely identify an item type
-
toString
-
processBaseType
public void processBaseType() -
resolve
-
resolve
-
isResolved
public boolean isResolved()- Specified by:
isResolvedin interfaceItemType
-
checkSubtypeConsistency
public void checkSubtypeConsistency() -
isCompatibleWithDataFrames
Description copied from interface:ItemTypeChecks compatibility with DataFrames.- Specified by:
isCompatibleWithDataFramesin interfaceItemType- Returns:
- true if compatible with DataFrames and false otherwise.
-
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.
-
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
-