@PreAuthorize(value="hasAnyRole(\'ROLE_SU\')") public class MappingServiceImpl extends Object implements MappingService
| Modifier and Type | Field and Description |
|---|---|
static int |
MAPPING_BATCH_SIZE |
| Constructor and Description |
|---|
MappingServiceImpl(DataService dataService,
AlgorithmService algorithmService,
MappingProjectRepository mappingProjectRepository,
org.molgenis.data.security.permission.PermissionSystemService permissionSystemService,
AttributeFactory attrMetaFactory,
EntityManager entityManager) |
| Modifier and Type | Method and Description |
|---|---|
MappingProject |
addMappingProject(String projectName,
String target)
Creates a new
MappingProject |
long |
applyMappings(String mappingProjectId,
String entityTypeId,
Boolean addSourceAttribute,
String packageId,
String label,
org.molgenis.jobs.Progress progress)
Applies all mappings in a
MappingTarget |
MappingProject |
cloneMappingProject(String mappingProjectId)
Clones a
MappingProject. |
MappingProject |
cloneMappingProject(String mappingProjectId,
String clonedMappingProjectName)
Clones a
MappingProject. |
void |
deleteMappingProject(String mappingProjectId)
Deletes a
MappingProject |
List<MappingProject> |
getAllMappingProjects()
Retrieves all
MappingProjects. |
Stream<EntityType> |
getCompatibleEntityTypes(EntityType target)
Public for testability
|
MappingProject |
getMappingProject(String identifier)
Retrieves a
MappingProject from the repository. |
void |
updateMappingProject(MappingProject mappingProject)
Updates a MappingProject in the repository.
|
public static final int MAPPING_BATCH_SIZE
public MappingServiceImpl(DataService dataService, AlgorithmService algorithmService, MappingProjectRepository mappingProjectRepository, org.molgenis.data.security.permission.PermissionSystemService permissionSystemService, AttributeFactory attrMetaFactory, EntityManager entityManager)
@Transactional public MappingProject addMappingProject(String projectName, String target)
MappingServiceMappingProjectaddMappingProject in interface MappingServicetarget - name of the first target entity@Transactional public void deleteMappingProject(String mappingProjectId)
MappingServiceMappingProjectdeleteMappingProject in interface MappingServicemappingProjectId - id of the MappingProject to delete@Transactional public MappingProject cloneMappingProject(String mappingProjectId)
MappingServiceMappingProject. Deep copies all related mappings. Automatically generates name for cloned
MappingProject.cloneMappingProject in interface MappingServicemappingProjectId - id of the MappingProject to cloneMappingProject@Transactional public MappingProject cloneMappingProject(String mappingProjectId, String clonedMappingProjectName)
MappingServiceMappingProject. Deep copies all related mappings.cloneMappingProject in interface MappingServicemappingProjectId - id of the MappingProject to cloneclonedMappingProjectName - name of the cloned MappingProjectMappingProjectpublic List<MappingProject> getAllMappingProjects()
MappingServiceMappingProjects.getAllMappingProjects in interface MappingServiceMappingProjects.@Transactional public void updateMappingProject(MappingProject mappingProject)
MappingServiceMappingTargets, EntityMappings and
AttributeMappings are updated.updateMappingProject in interface MappingServicemappingProject - the MappingProject to update.public MappingProject getMappingProject(String identifier)
MappingServiceMappingProject from the repository.getMappingProject in interface MappingServiceidentifier - ID of the MappingProject@Transactional public long applyMappings(String mappingProjectId, String entityTypeId, Boolean addSourceAttribute, String packageId, String label, org.molgenis.jobs.Progress progress)
MappingServiceMappingTargetapplyMappings in interface MappingServicemappingProjectId - the id of the MappingProject whose mappings are appliedentityTypeId - the name of the entity to map toaddSourceAttribute - boolean indicating if the 'source' attribute should be added to the target repositorypackageId - the id of the destination Package, ignored when mapping to existing EntityTypelabel - label of the target EntityType, ignored when mapping to existing EntityTypeprogress - progress of the mappingpublic Stream<EntityType> getCompatibleEntityTypes(EntityType target)
getCompatibleEntityTypes in interface MappingServicetarget - EntityType of the mapping targetEntityTypesCopyright © 2018 Pivotal Software, Inc.. All rights reserved.