@Test void testAutoGenerateAlgorithms() { EntityType test = entityTypeFactory.create("TEST"); Attribute idAttr = attrMetaFactory.create().setName("id").setDataType(INT); test.addAttribute(idAttr); Attribute computedAttr = attrMetaFactory .create() .setName("computed") .setDataType(INT) .setExpression("Very expressive"); test.addAttribute(computedAttr); controller.autoGenerateAlgorithms(null, test, test, null); verify(algorithmService).autoGenerateAlgorithm(test, test, null); verifyNoMoreInteractions(algorithmService); }
void autoGenerateAlgorithms( EntityMapping mapping, EntityType sourceEntityType, EntityType targetEntityType, MappingProject project) { algorithmService.autoGenerateAlgorithm(sourceEntityType, targetEntityType, mapping); mappingService.updateMappingProject(project); }
MappingServiceController extends PluginController { void autoGenerateAlgorithms( EntityMapping mapping, EntityType sourceEntityType, EntityType targetEntityType, MappingProject project) { algorithmService.autoGenerateAlgorithm(sourceEntityType, targetEntityType, mapping); mappingService.updateMappingProject(project); } }
MappingServiceController extends PluginController { void autoGenerateAlgorithms( EntityMapping mapping, EntityType sourceEntityType, EntityType targetEntityType, MappingProject project) { algorithmService.autoGenerateAlgorithm(sourceEntityType, targetEntityType, mapping); mappingService.updateMappingProject(project); } MappingServiceController(
      AlgorithmService algorithmService,
      MappingService mappingService,
      DataService dataService,
      OntologyTagService ontologyTagService,
      SemanticSearchService semanticSearchService,
      MenuReaderService menuReaderService,
      MappingJobExecutionFactory mappingJobExecutionFactory,
      JobExecutor jobExecutor,
      JobsController jobsController); }
MappingServiceController extends PluginController { void autoGenerateAlgorithms( EntityMapping mapping, EntityType sourceEntityType, EntityType targetEntityType, MappingProject project) { algorithmService.autoGenerateAlgorithm(sourceEntityType, targetEntityType, mapping); mappingService.updateMappingProject(project); } MappingServiceController(
      AlgorithmService algorithmService,
      MappingService mappingService,
      DataService dataService,
      OntologyTagService ontologyTagService,
      SemanticSearchService semanticSearchService,
      MenuReaderService menuReaderService,
      MappingJobExecutionFactory mappingJobExecutionFactory,
      JobExecutor jobExecutor,
      JobsController jobsController); @GetMapping String viewMappingProjects(Model model); @PostMapping("/addMappingProject") String addMappingProject(
      @RequestParam("mapping-project-name") String name,
      @RequestParam("target-entity") String targetEntity,
      @RequestParam("depth") int depth); @PostMapping("/removeMappingProject") String deleteMappingProject(@RequestParam() String mappingProjectId); @PostMapping("/removeAttributeMapping") String removeAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String attribute); @PostMapping("/addEntityMapping") String addEntityMapping(
      @RequestParam String mappingProjectId, String target, String source, String algorithmSource); @PostMapping("/removeEntityMapping") String removeEntityMapping(
      @RequestParam String mappingProjectId, String target, String source); @PostMapping("/validateAttrMapping") @ResponseBody AttributeMappingValidationReport validateAttributeMapping(
      @Valid @RequestBody MappingServiceRequest mappingServiceRequest); @PostMapping("/saveattributemapping") String saveAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm,
      @RequestParam() AlgorithmState algorithmState); @PostMapping("/firstattributemapping") @ResponseBody FirstAttributeMappingInfo getFirstAttributeMappingInfo(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam(value = "skipAlgorithmStates[]") List<AlgorithmState> skipAlgorithmStates,
      Model model); @GetMapping("/mappingproject/{id}") String viewMappingProject(@PathVariable("id") String identifier, Model model); @PostMapping("/mappingproject/clone") String cloneMappingProject(@RequestParam("mappingProjectId") String mappingProjectId); @PostMapping("/mappingproject/setDepth") String cloneMappingProject(
      @RequestParam("mappingProjectId") String mappingProjectId, @RequestParam("depth") int depth); @PostMapping(value = "/attributeMapping/semanticsearch", consumes = APPLICATION_JSON_VALUE) @ResponseBody List<ExplainedAttributeDto> getSemanticSearchAttributeMapping(
      @RequestBody Map<String, String> requestBody); @PostMapping(value = "/attributemapping/algorithm", consumes = APPLICATION_JSON_VALUE) @ResponseBody String getSuggestedAlgorithm(
      @RequestBody GenerateAlgorithmRequest generateAlgorithmRequest); @GetMapping("/isNewEntity") @ResponseBody boolean isNewEntity(@RequestParam String targetEntityTypeId); @PostMapping("/createIntegratedEntity") String createIntegratedEntity(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) String label,
      @RequestParam(required = false, name = "package") String packageId,
      @RequestParam(required = false) Boolean addSourceAttribute); @PostMapping(value = "/map", produces = TEXT_PLAIN_VALUE) ResponseEntity<String> scheduleMappingJob(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) String label,
      @RequestParam(required = false, name = "package") String rawPackageId,
      @RequestParam(required = false) Boolean addSourceAttribute); @PostMapping(value = "/submit", produces = TEXT_PLAIN_VALUE) ResponseEntity<String> submitMappingJob(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) Boolean addSourceAttribute,
      @RequestParam(required = false, name = "package") String packageId,
      @RequestParam(required = false) String label); @GetMapping("/attributeMapping") String viewAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      Model model); @PostMapping("/attributemappingfeedback") String attributeMappingFeedback(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm,
      Model model); @PostMapping("/advancedmappingeditor") String advancedMappingEditor(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String sourceAttribute,
      @RequestParam String algorithm,
      Model model); @PostMapping("/savecategorymapping") @ResponseBody void saveCategoryMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm); @PostMapping( value = "/mappingattribute/testscript", consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE) @ResponseBody Map<String, Object> testScript(@RequestBody MappingServiceRequest mappingServiceRequest); }
MappingServiceController extends PluginController { void autoGenerateAlgorithms( EntityMapping mapping, EntityType sourceEntityType, EntityType targetEntityType, MappingProject project) { algorithmService.autoGenerateAlgorithm(sourceEntityType, targetEntityType, mapping); mappingService.updateMappingProject(project); } MappingServiceController(
      AlgorithmService algorithmService,
      MappingService mappingService,
      DataService dataService,
      OntologyTagService ontologyTagService,
      SemanticSearchService semanticSearchService,
      MenuReaderService menuReaderService,
      MappingJobExecutionFactory mappingJobExecutionFactory,
      JobExecutor jobExecutor,
      JobsController jobsController); @GetMapping String viewMappingProjects(Model model); @PostMapping("/addMappingProject") String addMappingProject(
      @RequestParam("mapping-project-name") String name,
      @RequestParam("target-entity") String targetEntity,
      @RequestParam("depth") int depth); @PostMapping("/removeMappingProject") String deleteMappingProject(@RequestParam() String mappingProjectId); @PostMapping("/removeAttributeMapping") String removeAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String attribute); @PostMapping("/addEntityMapping") String addEntityMapping(
      @RequestParam String mappingProjectId, String target, String source, String algorithmSource); @PostMapping("/removeEntityMapping") String removeEntityMapping(
      @RequestParam String mappingProjectId, String target, String source); @PostMapping("/validateAttrMapping") @ResponseBody AttributeMappingValidationReport validateAttributeMapping(
      @Valid @RequestBody MappingServiceRequest mappingServiceRequest); @PostMapping("/saveattributemapping") String saveAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm,
      @RequestParam() AlgorithmState algorithmState); @PostMapping("/firstattributemapping") @ResponseBody FirstAttributeMappingInfo getFirstAttributeMappingInfo(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam(value = "skipAlgorithmStates[]") List<AlgorithmState> skipAlgorithmStates,
      Model model); @GetMapping("/mappingproject/{id}") String viewMappingProject(@PathVariable("id") String identifier, Model model); @PostMapping("/mappingproject/clone") String cloneMappingProject(@RequestParam("mappingProjectId") String mappingProjectId); @PostMapping("/mappingproject/setDepth") String cloneMappingProject(
      @RequestParam("mappingProjectId") String mappingProjectId, @RequestParam("depth") int depth); @PostMapping(value = "/attributeMapping/semanticsearch", consumes = APPLICATION_JSON_VALUE) @ResponseBody List<ExplainedAttributeDto> getSemanticSearchAttributeMapping(
      @RequestBody Map<String, String> requestBody); @PostMapping(value = "/attributemapping/algorithm", consumes = APPLICATION_JSON_VALUE) @ResponseBody String getSuggestedAlgorithm(
      @RequestBody GenerateAlgorithmRequest generateAlgorithmRequest); @GetMapping("/isNewEntity") @ResponseBody boolean isNewEntity(@RequestParam String targetEntityTypeId); @PostMapping("/createIntegratedEntity") String createIntegratedEntity(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) String label,
      @RequestParam(required = false, name = "package") String packageId,
      @RequestParam(required = false) Boolean addSourceAttribute); @PostMapping(value = "/map", produces = TEXT_PLAIN_VALUE) ResponseEntity<String> scheduleMappingJob(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) String label,
      @RequestParam(required = false, name = "package") String rawPackageId,
      @RequestParam(required = false) Boolean addSourceAttribute); @PostMapping(value = "/submit", produces = TEXT_PLAIN_VALUE) ResponseEntity<String> submitMappingJob(
      @RequestParam String mappingProjectId,
      @RequestParam String targetEntityTypeId,
      @RequestParam(required = false) Boolean addSourceAttribute,
      @RequestParam(required = false, name = "package") String packageId,
      @RequestParam(required = false) String label); @GetMapping("/attributeMapping") String viewAttributeMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      Model model); @PostMapping("/attributemappingfeedback") String attributeMappingFeedback(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm,
      Model model); @PostMapping("/advancedmappingeditor") String advancedMappingEditor(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String sourceAttribute,
      @RequestParam String algorithm,
      Model model); @PostMapping("/savecategorymapping") @ResponseBody void saveCategoryMapping(
      @RequestParam() String mappingProjectId,
      @RequestParam() String target,
      @RequestParam() String source,
      @RequestParam() String targetAttribute,
      @RequestParam() String algorithm); @PostMapping( value = "/mappingattribute/testscript", consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE) @ResponseBody Map<String, Object> testScript(@RequestBody MappingServiceRequest mappingServiceRequest); static final String ID; static final String URI; }