Skip to content

Commit

Permalink
Merge pull request #63 from DiSSCo/feature/update-tables-ss-dm
Browse files Browse the repository at this point in the history
Update tables for new version of ss and dm
  • Loading branch information
samleeflang authored Jul 17, 2024
2 parents 115feec + 8dcbedf commit 7ea185c
Show file tree
Hide file tree
Showing 33 changed files with 903 additions and 1,273 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import eu.dissco.core.translator.exception.DisscoRepositoryException;
import eu.dissco.core.translator.properties.WebClientProperties;
import eu.dissco.core.translator.repository.MappingRepository;
import eu.dissco.core.translator.repository.DataMappingRepository;
import jakarta.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -14,10 +14,10 @@
@Slf4j
@Component
@RequiredArgsConstructor
public class MappingComponent {
public class DataMappingComponent {

private final WebClientProperties properties;
private final MappingRepository repository;
private final DataMappingRepository repository;

@Getter
private final Map<String, String> fieldMappings = new HashMap<>();
Expand All @@ -27,12 +27,12 @@ public class MappingComponent {
@PostConstruct
void setup() throws DisscoRepositoryException {
var objectNode = repository.retrieveMapping(properties.getSourceSystemId());
var mappingObject = objectNode.get("mapping");
var mappingObject = objectNode.get("ods:FieldMapping");
if (mappingObject != null) {
mappingObject.iterator().forEachRemaining(node -> node.fields()
.forEachRemaining(field -> fieldMappings.put(field.getKey(), field.getValue().asText())));
}
var defaultObject = objectNode.get("defaults");
var defaultObject = objectNode.get("ods:DefaultMapping");
defaultObject.iterator().forEachRemaining(node -> node.fields()
.forEachRemaining(field -> defaults.put(field.getKey(), field.getValue().asText())));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import java.sql.DriverManager;
import java.sql.SQLException;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.context.annotation.Configuration;
import org.postgresql.copy.CopyManager;
import org.postgresql.core.BaseConnection;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 4 additions & 11 deletions src/main/java/eu/dissco/core/translator/database/jooq/Keys.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7ea185c

Please sign in to comment.