Interface MappingExpression

All Known Implementing Classes:
MappingExpressionImpl

public interface MappingExpression
This interface represents an expression of the mapping algebra introduced in the following research paper. Every such expression has a root operator and, depending on the type of root operator, a number of sub-expressions.

Sitt Min Oo and Olaf Hartig: "An Algebraic Foundation for Knowledge Graph Construction." In Proceedings of the 22nd Extended Semantic Web Conference (ESWC), 2025.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns an identifier of this mapping expression, which should be distinct from the identifiers of all other sub-expressions within the same expression.
    Returns the root operator of this expression.
    Returns the schema of the mapping relation that will be the result of evaluating this mapping expression.
    Returns the i-th sub-expression of this expression, where i starts at index 0 (zero).
    default boolean
    Returns true if this expression is the same expression as the given one.
    boolean
    Returns true if this mapping expression is valid.
    int
    Returns the number of sub-expressions that this expression has (considering sub-expressions that are direct children of the root operator of this expressions).
  • Method Details

    • getID

      int getID()
      Returns an identifier of this mapping expression, which should be distinct from the identifiers of all other sub-expressions within the same expression.
    • isValid

      boolean isValid()
      Returns true if this mapping expression is valid.
    • getSchema

      Set<String> getSchema()
      Returns the schema of the mapping relation that will be the result of evaluating this mapping expression.
    • getRootOperator

      MappingOperator getRootOperator()
      Returns the root operator of this expression.
    • numberOfSubExpressions

      int numberOfSubExpressions()
      Returns the number of sub-expressions that this expression has (considering sub-expressions that are direct children of the root operator of this expressions).
    • getSubExpression

      MappingExpression getSubExpression(int i) throws IndexOutOfBoundsException
      Returns the i-th sub-expression of this expression, where i starts at index 0 (zero). If the expression has fewer sub-expressions (or no sub-expressions at all), then an IndexOutOfBoundsException will be thrown.
      Throws:
      IndexOutOfBoundsException
    • isSameExpression

      default boolean isSameExpression(MappingExpression other)
      Returns true if this expression is the same expression as the given one. Expressions are considered the same if they have the same root operator, the same number of sub-expressions, and the sub-expressions at every index are the same as well.

      Notice that the

      invalid reference
      #equals(Object)
      function cannot be used for the type of comparison provided by this function because
      invalid reference
      #equals(Object)
      takes the IDs of the plans into account (which essentially means that
      invalid reference
      #equals(Object)
      falls back to doing a == comparison, because the IDs are unique).