Class ElementNodeItemType

java.lang.Object
org.rumbledb.types.AbstractItemType
org.rumbledb.types.ElementNodeItemType
All Implemented Interfaces:
Serializable, ItemType
Direct Known Subclasses:
SchemaElementNodeItemType

public class ElementNodeItemType extends AbstractItemType
Class representing element() and element(QName) item types. Wildcard element() is represented with no node-name restriction. element(QName) is represented with a concrete node-name restriction.
See Also:
  • Constructor Details

    • ElementNodeItemType

      public ElementNodeItemType()
    • ElementNodeItemType

      public ElementNodeItemType(Name nodeName)
    • ElementNodeItemType

      public ElementNodeItemType(Name nodeName, Name schemaTypeName, List<Name> schemaTypeHierarchy, boolean nillable)
    • ElementNodeItemType

      public ElementNodeItemType(Name nodeName, Name schemaTypeName, List<Name> schemaTypeHierarchy, boolean nillable, List<Name> schemaTypeAlternatives)
  • Method Details

    • equalityKey

      protected Object equalityKey()
      Overrides:
      equalityKey in class AbstractItemType
    • 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
    • isNodeItemType

      public boolean isNodeItemType()
      Returns:
      true if [this] is a node item type (node() or any of its 7 concrete subtypes).
    • 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)
    • 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
    • getAllowedFacets

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

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

      public boolean isResolved()
    • isCompatibleWithDataFrames

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