/** * {@inheritDoc}<br/> * Clears the relationship to the input attribute paths, output attribute path, input filter and output filter. */ @Override protected void prepareObjectForRemoval(final Mapping object) { // should clear the relationship to the input attribute paths, output attribute path + transformation function object.setInputAttributePaths(null); object.setOutputAttributePath(null); final Component transformation = object.getTransformation(); if (transformation != null) { transformation.setFunction(null); } }
/** * {@inheritDoc} */ @Override public void updateObjectInternal(final Mapping object, final Mapping updateObject) throws DMPPersistenceException { super.updateObjectInternal(object, updateObject); final Set<MappingAttributePathInstance> inputAttributePaths = object.getInputAttributePaths(); final MappingAttributePathInstance outputAttributePath = object.getOutputAttributePath(); final Component transformation = object.getTransformation(); updateObject.setInputAttributePaths(inputAttributePaths); updateObject.setOutputAttributePath(outputAttributePath); updateObject.setTransformation(transformation); }
/** * {@inheritDoc}<br/> * Updates the name, transformation (component), input attribute paths and output attribute path of the mapping. */ @Override protected Mapping prepareObjectForUpdate(final Mapping objectWithUpdates, final Mapping object) { super.prepareObjectForUpdate(objectWithUpdates, object); object.setTransformation(objectWithUpdates.getTransformation()); object.setInputAttributePaths(objectWithUpdates.getInputAttributePaths()); object.setOutputAttributePath(objectWithUpdates.getOutputAttributePath()); return object; }
@Override public Mapping createDefaultObject() throws Exception { final MappingAttributePathInstance inputAttributePath = mappingAttributePathInstanceServiceTestUtils.getDefaultInputMAPI(); final MappingAttributePathInstance outputAttributePath = mappingAttributePathInstanceServiceTestUtils.getDefaultOutputMAPI(); final Component transformationComponent = componentServiceTestUtils .getTransformationComponentSimpleTrimComponent(inputAttributePath.getAttributePath().toAttributePath(), outputAttributePath.getAttributePath().toAttributePath()); final String mappingName = "my mapping"; // TODO: think about this? final String uuid = UUIDService.getUUID(Mapping.class.getSimpleName()); final Mapping mapping = new Mapping(uuid); mapping.setName(mappingName); mapping.addInputAttributePath(inputAttributePath); mapping.setOutputAttributePath(outputAttributePath); mapping.setTransformation(transformationComponent); return mapping; }
mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3);
mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3);
mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3);
mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3);
mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3);
mapping.setName(mappingName); mapping.addInputAttributePath(inputMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent);
mapping.setName(mappingName); mapping.addInputAttributePath(inputMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent);
@Override public Mapping createAndPersistDefaultCompleteObject() throws Exception { final MappingAttributePathInstance firstNameMappingAttributePathInstance = mappingAttributePathInstanceServiceTestUtils .getDctermsCreatorFoafFirstnameMAPI(); final MappingAttributePathInstance familyNameMappingAttributePathInstance = mappingAttributePathInstanceServiceTestUtils .getDctermsCreatorFoafFamilynameMAPI(); final MappingAttributePathInstance outputMappingAttributePathInstance = mappingAttributePathInstanceServiceTestUtils .getDctermsCreatorFoafNameMAPI(); final Component transformationComponent3 = componentServiceTestUtils .getComplexTransformationComponent(firstNameMappingAttributePathInstance.getAttributePath().toAttributePath(), familyNameMappingAttributePathInstance.getAttributePath().toAttributePath(), outputMappingAttributePathInstance.getAttributePath().toAttributePath()); final String mappingName = "my mapping"; // TODO: think about this? final String uuid = UUIDService.getUUID(Mapping.class.getSimpleName()); final Mapping mapping = new Mapping(uuid); mapping.setName(mappingName); mapping.addInputAttributePath(firstNameMappingAttributePathInstance); mapping.addInputAttributePath(familyNameMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent3); return createAndCompareObject(mapping, mapping); }
mapping.setName(mappingName); mapping.addInputAttributePath(inputMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent);
mapping.setName(mappingName); mapping.addInputAttributePath(inputMappingAttributePathInstance); mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent);
mapping.setOutputAttributePath(outputMappingAttributePathInstance); mapping.setTransformation(transformationComponent);