Package org.rumbledb.types
Class ArrayItemType
java.lang.Object
org.rumbledb.types.AbstractItemType
org.rumbledb.types.ArrayItemType
- All Implemented Interfaces:
Serializable,ItemType
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ItemTypevoidFinds 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(RumbleConfiguration configuration) Checks compatibility with DataFrames.booleanbooleanbooleanisSubtypeOf(ItemType superType) booleanvoidvoidresolve(DynamicContext context, ExceptionMetadata metadata) voidresolve(StaticContext context, ExceptionMetadata metadata) toString()Methods inherited from class org.rumbledb.types.AbstractItemType
equalityKey, equalityKeyOf, equals, hashCode, namedTypeKey, structuralTypeKeyMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.rumbledb.types.ItemType
canBeNull, canBePromotedTo, findLeastCommonSuperTypeWith, getBoundedFacet, getCardinalityFacet, getCastingPrimitiveType, getClosedFacet, getConstraintsFacet, getExplicitTimezoneFacet, getFractionDigitsFacet, getLengthFacet, getLexicalSpacePatterns, getMapKeyItemType, getMapValueSequenceType, getMaxExclusiveFacet, getMaxInclusiveFacet, getMemberSequenceType, getMinExclusiveFacet, getMinInclusiveFacet, getNumericFacet, getObjectContentFacet, getObjectContentFacet, getObjectContentFacetAsUnorderedMap, getObjectKeysFacet, getOrderedFacet, getPatternFacet, getSignature, getSingleNullableType, getTotalDigitsFacet, getTypes, getWhitespaceFacet, isAtomicItemType, isCastingPrimitive, isEqualTo, isFunctionItemType, isJsonItemType, isMapItemType, isNodeItemType, isNumeric, isObjectItemType, isStaticallyCastableAs, isTopmostItemType, isUnionType, isXQueryArrayItemType
-
Method Details
-
arrayOf
-
isArrayItemType
public boolean isArrayItemType()- Returns:
- true it [this] is an array item type.
-
isSubtypeOf
- 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.- Returns:
- true if [this] item type has a QName
-
getName
- Returns:
- the itemtype QName if available
-
getTypeTreeDepth
public int getTypeTreeDepth()- 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()- Returns:
- [true] if it is a user-defined type, false otherwise
-
isPrimitive
public boolean isPrimitive()- Returns:
- [true] if it is a primitive type
-
getPrimitiveType
- Returns:
- the primitive type for a derived type, throw an error for primitive types
-
getBaseType
- Returns:
- the base type for a type, return null for the topmost item type
-
getAllowedFacets
- Returns:
- a set containing the allowed facets for restricting the type
-
getEnumerationFacet
- Returns:
- the list of possible values for [this] item type or null if the enumeration facet is not set
-
getMinLengthFacet
- Returns:
- the minimum length facet value for [this] item type or null if the restriction is not set
-
getMaxLengthFacet
- Returns:
- the maximum length facet value for [this] item type or null if the restriction is not set
-
getArrayContentFacet
- 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.- Parameters:
other- another item type- Returns:
- a lax common supertype between [this] and [other]
-
getIdentifierString
- Returns:
- a String that uniquely identify an item type
-
toString
-
processBaseType
public void processBaseType() -
resolve
-
resolve
-
isResolved
public boolean isResolved() -
checkSubtypeConsistency
public void checkSubtypeConsistency() -
isCompatibleWithDataFrames
Description copied from interface:ItemTypeChecks compatibility with DataFrames.- 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.- Returns:
- String representing the SparkSQL type of the item type.
-