Package org.rumbledb.types
Class ItemItemType
java.lang.Object
org.rumbledb.types.ItemItemType
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,ItemType
Class representing the generic 'item' item type
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests for itemType equality.getName()
int
boolean
hasName()
Tests for QName.boolean
isCompatibleWithDataFrames
(RumbleRuntimeConfiguration configuration) Checks compatibility with DataFrames.boolean
boolean
isSubtypeOf
(ItemType superType) boolean
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) toString()
void
write
(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, wait
Methods inherited from interface org.rumbledb.types.ItemType
canBePromotedTo, getArrayContentFacet, getClosedFacet, getConstraintsFacet, getEnumerationFacet, getExplicitTimezoneFacet, getFractionDigitsFacet, getIdentifierString, getLengthFacet, getMaxExclusiveFacet, getMaxInclusiveFacet, getMaxLengthFacet, getMinExclusiveFacet, getMinInclusiveFacet, getMinLengthFacet, getObjectContentFacet, getPrimitiveType, getSignature, getSparkSQLType, getTotalDigitsFacet, getUnionContentFacet, isArrayItemType, isAtomicItemType, isEqualTo, isFunctionItemType, isJsonItemType, isNumeric, isObjectItemType, isPrimitive, isStaticallyCastableAs, isUnionType, isUserDefined, resolve, resolve
-
Constructor Details
-
ItemItemType
public ItemItemType() -
ItemItemType
-
-
Method Details
-
isTopmostItemType
public boolean isTopmostItemType()- Specified by:
isTopmostItemType
in interfaceItemType
- Returns:
- true it [this] is the topmost item type.
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
equals
Description copied from interface:ItemType
Tests for itemType equality. -
hasName
public boolean hasName()Description copied from interface:ItemType
Tests for QName. -
getName
-
isSubtypeOf
- Specified by:
isSubtypeOf
in 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.
-
findLeastCommonSuperTypeWith
- Specified by:
findLeastCommonSuperTypeWith
in interfaceItemType
- Parameters:
other
- another item type- Returns:
- the common supertype between [this] and [other], that would be the LCA in the item type tree of [this] and [other] (does not take into account union types as common ancestor, but only the type tree)
-
getTypeTreeDepth
public int getTypeTreeDepth()- Specified by:
getTypeTreeDepth
in interfaceItemType
- Returns:
- an int representing the depth of the item type in the type tree ('item' is the root with depth 0)
-
getBaseType
- Specified by:
getBaseType
in interfaceItemType
- Returns:
- the base type for a type, return null for the topmost item type
-
getAllowedFacets
- Specified by:
getAllowedFacets
in interfaceItemType
- Returns:
- a set containing the allowed facets for restricting the type
-
toString
-
isResolved
public boolean isResolved()- Specified by:
isResolved
in interfaceItemType
-
isCompatibleWithDataFrames
Description copied from interface:ItemType
Checks compatibility with DataFrames.- Specified by:
isCompatibleWithDataFrames
in interfaceItemType
- Returns:
- true if compatible with DataFrames and false otherwise.
-