Package org.rumbledb.types
Class ObjectItemType
java.lang.Object
org.rumbledb.types.ObjectItemType
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,ItemType
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
Tests for itemType equality.boolean
getName()
Returns the SparkSQL type of the item type for use in a query.int
boolean
hasName()
Tests for QName.boolean
isCompatibleWithDataFrames
(RumbleRuntimeConfiguration configuration) Checks compatibility with DataFrames.boolean
boolean
boolean
boolean
void
void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
resolve
(DynamicContext context, ExceptionMetadata metadata) void
resolve
(StaticContext context, ExceptionMetadata metadata) 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, findLeastCommonSuperTypeWith, getArrayContentFacet, getExplicitTimezoneFacet, getFractionDigitsFacet, getLengthFacet, getMaxExclusiveFacet, getMaxInclusiveFacet, getMaxLengthFacet, getMinExclusiveFacet, getMinInclusiveFacet, getMinLengthFacet, getSignature, getTotalDigitsFacet, getUnionContentFacet, isArrayItemType, isAtomicItemType, isEqualTo, isFunctionItemType, isJsonItemType, isNumeric, isStaticallyCastableAs, isSubtypeOf, isTopmostItemType, isUnionType
-
Method Details
-
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. -
isObjectItemType
public boolean isObjectItemType()- Specified by:
isObjectItemType
in interfaceItemType
- Returns:
- true it [this] is an object item type.
-
hasName
public boolean hasName()Description copied from interface:ItemType
Tests for QName. -
getName
-
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)
-
isUserDefined
public boolean isUserDefined()- Specified by:
isUserDefined
in interfaceItemType
- Returns:
- [true] if it is a user-defined type, false otherwise
-
isPrimitive
public boolean isPrimitive()- Specified by:
isPrimitive
in interfaceItemType
- Returns:
- [true] if it is a primitive type
-
getPrimitiveType
- Specified by:
getPrimitiveType
in interfaceItemType
- Returns:
- the primitive type for a derived type, throw an error for primitive types
-
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
-
getEnumerationFacet
- Specified by:
getEnumerationFacet
in interfaceItemType
- Returns:
- the list of possible values for [this] item type or null if the enumeration facet is not set
-
getConstraintsFacet
- Specified by:
getConstraintsFacet
in 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
-
getObjectContentFacet
- Specified by:
getObjectContentFacet
in interfaceItemType
- Returns:
- content facet value for object item types (cumulative facet)
-
getClosedFacet
public boolean getClosedFacet()- Specified by:
getClosedFacet
in interfaceItemType
- Returns:
- closed facet value for object item types
-
getIdentifierString
- Specified by:
getIdentifierString
in interfaceItemType
- Returns:
- a String that uniquely identify an item type
-
toString
-
isResolved
public boolean isResolved()- Specified by:
isResolved
in interfaceItemType
-
resolve
-
resolve
-
isCompatibleWithDataFrames
Description copied from interface:ItemType
Checks compatibility with DataFrames.- Specified by:
isCompatibleWithDataFrames
in interfaceItemType
- Returns:
- true if compatible with DataFrames and false otherwise.
-
processBaseType
public void processBaseType() -
checkSubtypeConsistency
public void checkSubtypeConsistency() -
getSparkSQLType
Description copied from interface:ItemType
Returns the SparkSQL type of the item type for use in a query.- Specified by:
getSparkSQLType
in interfaceItemType
- Returns:
- String representing the SparkSQL type of the item type.
-