Merge remote-tracking branch 'origin/Development' into Development

This commit is contained in:
Konstantinos Triantafyllou 2021-12-15 16:26:21 +02:00
commit feecac994d
3 changed files with 7 additions and 6 deletions

View File

@ -41,6 +41,7 @@
<commons-codec.version>1.9</commons-codec.version> <commons-codec.version>1.9</commons-codec.version>
<org.junit.version>4.11</org.junit.version> <org.junit.version>4.11</org.junit.version>
<log4j.version>1.2.17</log4j.version> <log4j.version>1.2.17</log4j.version>
<log4j2.version>2.15.0</log4j2.version>
<slf4j.version>1.7.12</slf4j.version> <slf4j.version>1.7.12</slf4j.version>
<!--<jetty.version>11.0.5 <!--<jetty.version>11.0.5
</jetty.version>--> <!-- Adapt this to a version found on http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/ --> </jetty.version>--> <!-- Adapt this to a version found on http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/ -->
@ -218,10 +219,10 @@
<version>2.1</version> <version>2.1</version>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId> <artifactId>hibernate-jpamodelgen</artifactId>
</dependency> </dependency>-->
<dependency> <dependency>
<groupId>org.elasticsearch.client</groupId> <groupId>org.elasticsearch.client</groupId>
@ -229,11 +230,11 @@
<version>7.6.0</version> <version>7.6.0</version>
</dependency> </dependency>
<dependency> <!--<dependency>
<groupId>org.apache.logging.log4j</groupId> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId> <artifactId>log4j-to-slf4j</artifactId>
<version>2.8.2</version> <version>2.8.2</version>
</dependency> </dependency>-->
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api --> <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
<dependency> <dependency>

View File

@ -97,7 +97,7 @@ public class DatasetRDAMapper {
} }
List<JsonNode> distributionNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.distribution"); List<JsonNode> distributionNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.distribution");
if (!distributionNodes.isEmpty()) { if (!distributionNodes.isEmpty()) {
rda.setDistribution(Collections.singletonList(DistributionRDAMapper.toRDA(distributionNodes))); rda.setDistribution(DistributionRDAMapper.toRDAList(distributionNodes));
} }
List<JsonNode> keywordNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.keyword"); List<JsonNode> keywordNodes = JsonSearcher.findNodes(datasetDescriptionObj, "rdaProperty", "dataset.keyword");
if (!keywordNodes.isEmpty()) { if (!keywordNodes.isEmpty()) {

View File

@ -19,7 +19,7 @@ public class HostRDAMapper {
public static Host toRDA(List<JsonNode> nodes, String numbering) { public static Host toRDA(List<JsonNode> nodes, String numbering) {
Host rda = new Host(); Host rda = new Host();
for (JsonNode node: nodes) { for (JsonNode node: nodes) {
String rdaProperty = node.get("rdaProperties").asText(); String rdaProperty = node.get("rdaProperty").asText();
if (rdaProperty.contains("host")) { if (rdaProperty.contains("host")) {
int firstDiff = MyStringUtils.getFirstDifference(numbering, node.get("numbering").asText()); int firstDiff = MyStringUtils.getFirstDifference(numbering, node.get("numbering").asText());
if (firstDiff == -1 || firstDiff > 2) { if (firstDiff == -1 || firstDiff > 2) {