@Controller @RequestMapping(value="/plugin/mappingservice") public class MappingServiceController extends PluginController
| Modifier and Type | Field and Description |
|---|---|
static String |
ID |
static String |
URI |
PLUGIN_URI_PREFIX| Constructor and Description |
|---|
MappingServiceController(AlgorithmService algorithmService,
MappingService mappingService,
DataService dataService,
OntologyTagService ontologyTagService,
SemanticSearchService semanticSearchService,
org.molgenis.core.ui.menu.MenuReaderService menuReaderService,
MappingJobExecutionFactory mappingJobExecutionFactory,
org.molgenis.security.user.UserAccountService userAccountService,
org.molgenis.jobs.JobExecutor jobExecutor,
org.molgenis.core.ui.jobs.JobsController jobsController) |
| Modifier and Type | Method and Description |
|---|---|
String |
addEntityMapping(String mappingProjectId,
String target,
String source)
Adds a new
EntityMapping to an existing MappingTarget |
String |
addMappingProject(String name,
String targetEntity)
Adds a new mapping project.
|
String |
advancedMappingEditor(String mappingProjectId,
String target,
String source,
String targetAttribute,
String sourceAttribute,
String algorithm,
org.springframework.ui.Model model)
Returns a view that allows the user to edit mappings involving xrefs / categoricals / strings
|
String |
attributeMappingFeedback(String mappingProjectId,
String target,
String source,
String targetAttribute,
String algorithm,
org.springframework.ui.Model model) |
String |
cloneMappingProject(String mappingProjectId) |
String |
createIntegratedEntity(String mappingProjectId,
String targetEntityTypeId,
String label,
String packageId,
Boolean addSourceAttribute)
Creates the integrated entity for a mapping project's target
|
String |
deleteMappingProject(String mappingProjectId)
Removes a mapping project
|
FirstAttributeMappingInfo |
getFirstAttributeMappingInfo(String mappingProjectId,
String target,
List<AttributeMapping.AlgorithmState> skipAlgorithmStates,
org.springframework.ui.Model model)
Find the firstattributeMapping skip the the algorithmStates that are given in the
AttributeMapping to an
EntityMapping. |
List<ExplainedAttributeDto> |
getSemanticSearchAttributeMapping(Map<String,String> requestBody)
This controller will first of all check if the user-defined search terms exist.
|
String |
getSuggestedAlgorithm(GenerateAlgorithmRequest generateAlgorithmRequest) |
boolean |
isNewEntity(String targetEntityTypeId)
Checks if an entityTypeID already exists.
|
String |
removeAttributeMapping(String mappingProjectId,
String target,
String source,
String attribute)
Removes a attribute mapping
|
String |
removeEntityMapping(String mappingProjectId,
String target,
String source)
Removes entity mapping
|
String |
saveAttributeMapping(String mappingProjectId,
String target,
String source,
String targetAttribute,
String algorithm,
AttributeMapping.AlgorithmState algorithmState)
Adds a new
AttributeMapping to an EntityMapping. |
void |
saveCategoryMapping(String mappingProjectId,
String target,
String source,
String targetAttribute,
String algorithm) |
org.springframework.http.ResponseEntity<String> |
scheduleMappingJob(String mappingProjectId,
String targetEntityTypeId,
String label,
String packageId,
Boolean addSourceAttribute)
Schedules a
MappingJobExecution. |
Map<String,Object> |
testScript(MappingServiceRequest mappingServiceRequest)
Tests an algoritm by computing it for all entities in the source repository.
|
org.molgenis.semanticmapper.controller.MappingServiceController.AttributeMappingValidationReport |
validateAttributeMapping(@Valid MappingServiceRequest mappingServiceRequest) |
String |
viewAttributeMapping(String mappingProjectId,
String target,
String source,
String targetAttribute,
org.springframework.ui.Model model)
Displays an
AttributeMapping |
String |
viewMappingProject(String identifier,
org.springframework.ui.Model model)
Displays a mapping project.
|
String |
viewMappingProjects(org.springframework.ui.Model model)
Initializes the model with all mapping projects and all entities to the model.
|
getId, getPluginSettings, getUripublic static final String ID
public static final String URI
public MappingServiceController(AlgorithmService algorithmService, MappingService mappingService, DataService dataService, OntologyTagService ontologyTagService, SemanticSearchService semanticSearchService, org.molgenis.core.ui.menu.MenuReaderService menuReaderService, MappingJobExecutionFactory mappingJobExecutionFactory, org.molgenis.security.user.UserAccountService userAccountService, org.molgenis.jobs.JobExecutor jobExecutor, org.molgenis.core.ui.jobs.JobsController jobsController)
@GetMapping public String viewMappingProjects(org.springframework.ui.Model model)
model - the model to initialized@PostMapping(value="/addMappingProject") public String addMappingProject(@RequestParam(value="mapping-project-name") String name, @RequestParam(value="target-entity") String targetEntity)
name - name of the mapping projecttargetEntity - name of the project's first MappingTarget's target entity@PostMapping(value="/removeMappingProject") public String deleteMappingProject(@RequestParam String mappingProjectId)
mappingProjectId - the ID of the mapping project@PostMapping(value="/removeAttributeMapping") public String removeAttributeMapping(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam String source, @RequestParam String attribute)
mappingProjectId - the ID of the mapping projecttarget - the target entitysource - the source entityattribute - the attribute that is mapped@PostMapping(value="/addEntityMapping") public String addEntityMapping(@RequestParam String mappingProjectId, String target, String source)
EntityMapping to an existing MappingTargettarget - the name of the MappingTarget's entity to add a source entity tosource - the name of the source entity of the newly added EntityMappingmappingProjectId - the ID of the MappingTarget's MappingProject@PostMapping(value="/removeEntityMapping") public String removeEntityMapping(@RequestParam String mappingProjectId, String target, String source)
mappingProjectId - ID of the mapping project to remove entity mapping fromtarget - entity name of the mapping targetsource - entity name of the mapping source@PostMapping(value="/validateAttrMapping")
@ResponseBody
public org.molgenis.semanticmapper.controller.MappingServiceController.AttributeMappingValidationReport validateAttributeMapping(@Valid @RequestBody
@Valid MappingServiceRequest mappingServiceRequest)
@PostMapping(value="/saveattributemapping") public String saveAttributeMapping(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam String source, @RequestParam String targetAttribute, @RequestParam String algorithm, @RequestParam AttributeMapping.AlgorithmState algorithmState)
AttributeMapping to an EntityMapping.mappingProjectId - ID of the mapping projecttarget - name of the target entitysource - name of the source entitytargetAttribute - name of the target attributealgorithm - the mapping algorithm@PostMapping(value="/firstattributemapping") @ResponseBody public FirstAttributeMappingInfo getFirstAttributeMappingInfo(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam(value="skipAlgorithmStates[]") List<AttributeMapping.AlgorithmState> skipAlgorithmStates, org.springframework.ui.Model model)
AttributeMapping to an
EntityMapping.mappingProjectId - ID of the mapping projecttarget - name of the target entityskipAlgorithmStates - the mapping algorithm states that should skip@GetMapping(value="/mappingproject/{id}")
public String viewMappingProject(@PathVariable(value="id")
String identifier,
org.springframework.ui.Model model)
identifier - identifier of the MappingProjectmodel - the model@PostMapping(value="/mappingproject/clone") public String cloneMappingProject(@RequestParam(value="mappingProjectId") String mappingProjectId)
@PostMapping(value="/attributeMapping/semanticsearch",
consumes="application/json")
@ResponseBody
public List<ExplainedAttributeDto> getSemanticSearchAttributeMapping(@RequestBody
Map<String,String> requestBody)
If string terms are sent to the SemanticSearchService, they will be first of all converted to the ontologyTerms using findTag method
@PostMapping(value="/attributemapping/algorithm",
consumes="application/json")
@ResponseBody
public String getSuggestedAlgorithm(@RequestBody
GenerateAlgorithmRequest generateAlgorithmRequest)
@GetMapping(value="/isNewEntity")
@ResponseBody
public boolean isNewEntity(@RequestParam
String targetEntityTypeId)
@RequestMapping(value="/createIntegratedEntity") public 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)
mappingProjectId - ID of the mapping projecttargetEntityTypeId - ID of the target entity to create or updatelabel - label of the target entity to createpackageId - ID of the package to put the newly created entity in@PostMapping(value="/map",
produces="text/plain")
public org.springframework.http.ResponseEntity<String> scheduleMappingJob(@RequestParam
String mappingProjectId,
@RequestParam
String targetEntityTypeId,
@RequestParam(required=false)
String label,
@RequestParam(required=false,name="package")
String packageId,
@RequestParam(required=false)
Boolean addSourceAttribute)
throws URISyntaxException
MappingJobExecution.mappingProjectId - ID of the mapping projecttargetEntityTypeId - ID of the target entity to create or updatelabel - label of the target entity to createpackageId - ID of the package to put the newly created entity inURISyntaxException@GetMapping(value="/attributeMapping") public String viewAttributeMapping(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam String source, @RequestParam String targetAttribute, org.springframework.ui.Model model)
AttributeMappingmappingProjectId - ID of the MappingProjecttarget - name of the target entitysource - name of the source entitytargetAttribute - name of the target attribute@PostMapping(value="/attributemappingfeedback") public String attributeMappingFeedback(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam String source, @RequestParam String targetAttribute, @RequestParam String algorithm, org.springframework.ui.Model model)
@PostMapping(value="/advancedmappingeditor") public String advancedMappingEditor(@RequestParam String mappingProjectId, @RequestParam String target, @RequestParam String source, @RequestParam String targetAttribute, @RequestParam String sourceAttribute, @RequestParam String algorithm, org.springframework.ui.Model model)
@PostMapping(value="/savecategorymapping")
@ResponseBody
public void saveCategoryMapping(@RequestParam
String mappingProjectId,
@RequestParam
String target,
@RequestParam
String source,
@RequestParam
String targetAttribute,
@RequestParam
String algorithm)
@PostMapping(value="/mappingattribute/testscript",
consumes="application/json",
produces="application/json")
@ResponseBody
public Map<String,Object> testScript(@RequestBody
MappingServiceRequest mappingServiceRequest)
mappingServiceRequest - the MappingServiceRequest sent by the clientCopyright © 2018 Pivotal Software, Inc.. All rights reserved.