Class MappingExpressionUtils
java.lang.Object
se.liu.ida.hefquin.mappings.algebra.exprs.MappingExpressionUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MappingRelationevaluate(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.static Set<SourceReference> Returns a set of all source references mentioned within the given mapping expression.static booleanisValidInput(Map<SourceReference, DataObject> srMap, MappingExpression expr) Returnstrueif the given source assignment is valid input for the given mapping expression.static voidprint(MappingExpression expr) Prints the given expression using thePlanPrinterfunctionality of HeFQUIN.
-
Constructor Details
-
MappingExpressionUtils
public MappingExpressionUtils()
-
-
Method Details
-
print
Prints the given expression using thePlanPrinterfunctionality of HeFQUIN. -
extractAllSrcRefs
Returns a set of all source references mentioned within the given mapping expression. -
isValidInput
Returnstrueif 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 operatorof 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.
-