@Override public boolean completeEquals(final Object obj) { return Mapping.class.isInstance(obj) && super.completeEquals(obj) && DMPPersistenceUtil.getMappingAttributePathInstanceUtils().completeEquals(((Mapping) obj).getInputAttributePaths(), getInputAttributePaths()) && DMPPersistenceUtil.getMappingAttributePathInstanceUtils().completeEquals(((Mapping) obj).getOutputAttributePath(), getOutputAttributePath()) && DMPPersistenceUtil.getComponentUtils().completeEquals(((Mapping) obj).getTransformation(), getTransformation()); } }
final MappingAttributePathInstance mappingOutput = mapping.getOutputAttributePath();
/** * replace attribute paths of MAPIs with persistent ones (we also fetch APs from inbuilt schemata from DB) * * @param oldUuidNewPersistentAttributePathMap * @param project * @throws DMPPersistenceException */ private void replaceAttributePathsInMappings(final Map<String, AttributePath> oldUuidNewPersistentAttributePathMap, final Project project) throws DMPPersistenceException, JsonProcessingException { if (project == null) { return; } final Set<Mapping> existingMappings = project.getMappings(); if (existingMappings == null) { return; } for (final Mapping existingMapping : existingMappings) { final Set<MappingAttributePathInstance> existingMappingInputAttributePaths = existingMapping.getInputAttributePaths(); if (existingMappingInputAttributePaths != null) { for (final MappingAttributePathInstance existingMAPI : existingMappingInputAttributePaths) { replaceAttributePathInMAPI(oldUuidNewPersistentAttributePathMap, existingMAPI); } } final MappingAttributePathInstance existingMappingOutputAttributePath = existingMapping.getOutputAttributePath(); replaceAttributePathInMAPI(oldUuidNewPersistentAttributePathMap, existingMappingOutputAttributePath); } }
/** * {@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); }
final String mappingOutputName = mapping.getOutputAttributePath().getName(); final Optional<List<Tuple4<Optional<String>, javaslang.collection.List<String>, String, Element>>> mappingOutputs = addMappingOutputMapping(variablesFromMappingOutput, mapping.getOutputAttributePath());
/** * {@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; }
if (expectedMapping.getOutputAttributePath() == null) { actualMapping.getOutputAttributePath()); } else if (!checkAttributePath(expectedMapping.getOutputAttributePath(), checkedExpectedAttributePaths) && !checkAttributePath(actualMapping.getOutputAttributePath(), checkedActualAttributePaths)) { mappingAttributePathInstanceServiceTestUtils.compareObjects(expectedMapping.getOutputAttributePath(), actualMapping.getOutputAttributePath());