Class MappingExpressionUtils

java.lang.Object
se.liu.ida.hefquin.mappings.algebra.exprs.MappingExpressionUtils

public class MappingExpressionUtils extends Object
  • Constructor Details

    • MappingExpressionUtils

      public MappingExpressionUtils()
  • Method Details

    • print

      public static void print(MappingExpression expr)
      Prints the given expression using the PlanPrinter functionality of HeFQUIN.
    • extractAllSrcRefs

      public static Set<SourceReference> extractAllSrcRefs(MappingExpression expr)
      Returns a set of all source references mentioned within the given mapping expression.
    • isValidInput

      public static boolean isValidInput(Map<SourceReference,DataObject> srMap, MappingExpression expr)
      Returns true if the given source assignment is valid input for the given mapping expression.

      A source assignment is valid input for a mapping expression if, for every Extract operator of the mapping expression, it maps the source reference of that operator to a data object that fits the source type of the operator.

    • evaluate

      public static MappingRelation evaluate(MappingExpression expr, Map<SourceReference,DataObject> srMap)
      Returns a mapping relation that represents the result of evaluating the given mapping expression based on the given source assignment. Notice that the returned mapping relation may not have been produced when returned by this function; instead, it may be produced on the fly when consuming its cursor.