Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
m-benamor committed Dec 3, 2021
2 parents d47c647 + cb5a530 commit 37dc895
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
18 changes: 18 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.3] - 2021-12-02
### Fixed
- The configuration of string field concatenation was being read incorrectly
## [1.0.2] - 2021-07-06
### Add
- Allow the configuration of multiple transformations per field
## [1.0.1] - 2021-07-06
### Changed
- Rename java package
## [1.0.0] - 2021-06-30
### Added
- Initial release
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.pseudonymisierung</groupId>
<artifactId>mainzelliste.client-fttp</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<packaging>jar</packaging>

<name>mainzelliste.client-fttp</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.pseudonymisierung.mainzelliste.client.fttp.normalization;

import de.pseudonymisierung.mainzelliste.client.fttp.util.PropertiesUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -29,17 +30,14 @@ public FieldsNormalization(Properties config) {
this.fieldTransformers = PropertiesUtils.getSubProperties(config, "field").entrySet().stream()
.collect(Collectors.toMap(Entry::getKey,
p -> PropertiesUtils.getSubProperties(p.getValue(), "transformer").values().stream()
.filter(
c -> fieldTransformersSupplier.containsKey(c.getProperty("type", "").trim()))
.filter( c -> fieldTransformersSupplier.containsKey(c.getProperty("type", "").trim()))
.map(c -> fieldTransformersSupplier.get(c.getProperty("type")).apply(c))
.collect(Collectors.toList())));

this.fieldConcatenations = PropertiesUtils.getSubProperties(config, "field").entrySet()
.stream()
.filter(e -> fieldConcatenationsSupplier
.containsKey(e.getValue().getProperty("transformer.type", "").trim()))
.map(e -> fieldConcatenationsSupplier.get(e.getValue().getProperty("transformer.type"))
.apply(e.getKey(), e.getValue()))
this.fieldConcatenations = PropertiesUtils.getSubProperties(config, "field").entrySet().stream()
.flatMap( f -> PropertiesUtils.getSubProperties(f.getValue(), "transformer").values().stream()
.filter( p -> fieldConcatenationsSupplier.containsKey(p.getProperty("type", "").trim()))
.map( p -> fieldConcatenationsSupplier.get(p.getProperty("type")).apply( f.getKey(), p)))
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void testGenerateBalancedBloomFilter() {

//init filed normalization
FieldsNormalization fieldsNormalization = new FieldsNormalization(normalizationConfig);
//init bloom filter generator
RandomRecordBloomFilterGenerator bloomFilterGenerator = new RandomRecordBloomFilterGenerator(bloomFilterConfig);

//prepare idat fields
Expand Down

0 comments on commit 37dc895

Please sign in to comment.