Пример #1
0
 private boolean checkValueCorrespondences(ValueCorrespondence valueCorrespondence) {
   if (valueCorrespondence.getSourceValue() == null) {
     if (valueCorrespondence.getSourcePaths().size() == 1) {
       return valueCorrespondence
           .getTransformationFunction()
           .toString()
           .equals(valueCorrespondence.getSourcePaths().get(0).toString());
     }
   }
   return false;
 }
Пример #2
0
 private void addCorrespondencesToCandidate(MappingTask mappingTask) {
   List<ValueCorrespondence> candidateCorrespondences = new ArrayList<ValueCorrespondence>();
   for (ValueCorrespondence valueCorrespondence : mappingTask.getValueCorrespondences()) {
     if (checkValueCorrespondences(valueCorrespondence)) {
       for (ValueCorrespondence candidateCorrespondence :
           mappingTask.getCandidateCorrespondences()) {
         if (valueCorrespondence.hasEqualPaths(candidateCorrespondence)) {
           candidateCorrespondences.add(candidateCorrespondence);
           break;
         }
       }
       mappingTask.addCandidateCorrespondence(valueCorrespondence);
     }
   }
   mappingTask.getValueCorrespondences().clear();
   mappingTask.getCandidateCorrespondences().removeAll(candidateCorrespondences);
   Scenario scenario = (Scenario) modello.getBean(Costanti.CURRENT_SCENARIO);
   MappingTaskTopComponent mappingTaskTopComponent = scenario.getMappingTaskTopComponent();
   mappingTaskTopComponent.getJLayeredPane().getGlassPane().clearConnectionLayer();
 }