Beispiel #1
0
 public static String targetRelationName(
     SetAlias variable, MappingTask mappingTask, int chainingStep) {
   SetNode bindingNode =
       variable.getBindingNode(mappingTask.getTargetProxy().getIntermediateSchema());
   String result = variable.getBindingPathExpression().getLastStep();
   if (bindingNode instanceof SetCloneNode) {
     result = ((SetCloneNode) bindingNode).getOriginalNodePath().getLastStep();
   }
   return getTargetSchemaName(chainingStep) + "." + result;
 }
 ///////////////////////////    SKOLEMS   ///////////////////////////////
 private String printSkolems(FORule rule, MappingTask mappingTask) {
   StringBuilder result = new StringBuilder();
   List<FormulaVariable> existentialVariables = rule.getExistentialFormulaVariables(mappingTask);
   for (FormulaVariable variable : existentialVariables) {
     String generatorString = findGeneratorForVariable(variable, rule, mappingTask);
     result.append(variable.toShortString()).append(": ").append(generatorString).append("\n");
   }
   if (mappingTask.getTargetProxy().isNested()) {
     for (SetAlias alias : rule.getTargetView().getGenerators()) {
       VariablePathExpression bindingPath = alias.getBindingPathExpression();
       String generatorString = findGeneratorForPath(bindingPath, rule, mappingTask);
       result.append(alias.toShortString()).append(": ").append(generatorString).append("\n");
     }
   }
   return result.toString();
 }
Beispiel #3
0
 private static String sourceRelationName(SetAlias variable, int chainingStep) {
   return getSourceSchemaName(chainingStep)
       + "."
       + variable.getBindingPathExpression().getLastStep();
 }
Beispiel #4
0
 public static String finalSqlNameAfterExchange(SetAlias variable) {
   return WORK_SCHEMA_NAME
       + "."
       + "EXCHANGE_RESULT_FOR_"
       + variable.getBindingPathExpression().getLastStep();
 }