Class MapItemType

All Implemented Interfaces:
Serializable, ItemType

public class MapItemType extends AbstractItemType
XQuery/XPath map item type: map(*) and map(K, V) per XDM 3.1 / XPath 3.1. map(*) is a subtype of function(*) (see base type chain).
See Also:
  • Method Details

    • isMapItemType

      public boolean isMapItemType()
      Returns:
      true if [this] is an XQuery map item type (map(*) or map(K, V)).
    • equalityKey

      protected Object equalityKey()
      Overrides:
      equalityKey in class AbstractItemType
    • isSubtypeOf

      public boolean isSubtypeOf(ItemType superType)
      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

      public ItemType findLeastCommonSuperTypeWith(ItemType other)
      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)
    • hasName

      public boolean hasName()
      Description copied from interface: ItemType
      Tests for QName.
      Returns:
      true if [this] item type has a QName
    • getName

      public Name 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)
    • getBaseType

      public ItemType getBaseType()
      Returns:
      the base type for a type, return null for the topmost item type
    • getMapKeyItemType

      public ItemType getMapKeyItemType()
      Returns:
      atomic key type for map item types (map(K, V)).
    • getMapValueSequenceType

      public SequenceType getMapValueSequenceType()
      Returns:
      value sequence type for map item types (map(K, V)).
    • resolve

      public void resolve(DynamicContext context, ExceptionMetadata metadata)
    • resolve

      public void resolve(StaticContext context, ExceptionMetadata metadata)
    • isResolved

      public boolean isResolved()
    • getAllowedFacets

      public Set<ConstrainingFacetTypes> getAllowedFacets()
      Returns:
      a set containing the allowed facets for restricting the type
    • getIdentifierString

      public String getIdentifierString()
      Returns:
      a String that uniquely identify an item type
    • toString

      public String toString()
      Specified by:
      toString in interface ItemType
      Overrides:
      toString in class Object
    • isCompatibleWithDataFrames

      public boolean isCompatibleWithDataFrames(RumbleConfiguration configuration)
      Description copied from interface: ItemType
      Checks compatibility with DataFrames.
      Returns:
      true if compatible with DataFrames and false otherwise.
    • getSparkSQLType

      public String getSparkSQLType()
      Description copied from interface: ItemType
      Returns the SparkSQL type of the item type for use in a query.
      Returns:
      String representing the SparkSQL type of the item type.