diff --git a/pom.xml b/pom.xml
index b271465..9d20064 100644
--- a/pom.xml
+++ b/pom.xml
@@ -280,100 +280,61 @@
target/classes
${project.artifactId}-${project.version}
target/test-classes
-
-
-
- org.apache.maven.plugins
- maven-project-info-reports-plugin
- 3.0.0
-
-
- org.apache.maven.plugins
- maven-site-plugin
- 3.7.1
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven.compiler.plugin.version}
-
-
- 1.8
- ${project.build.sourceEncoding}
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.0.2
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 3.0.1
-
-
- attach-sources
- verify
-
- jar-no-fork
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.0.0-M4
-
- true
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 3.2.0
-
- true
- none
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 3.0.0
-
-
-
-
+
org.apache.maven.plugins
maven-site-plugin
+ 3.21.0
+
org.apache.maven.plugins
maven-project-info-reports-plugin
+ 3.8.0
+
org.apache.maven.plugins
maven-release-plugin
2.5.3
+
+
+ org.apache.maven.plugins
+ maven-help-plugin
+
+
+ generate-sources
+
+ effective-pom
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+ true
+
+
+
org.apache.maven.wagon
wagon-ssh
- 2.10
+ 3.5.3
+
dnet45-snapshots
diff --git a/src/main/java/eu/dnetlib/app/directindex/mapping/SolrRecordMapper.java b/src/main/java/eu/dnetlib/app/directindex/mapping/SolrRecordMapper.java
index 0ae0fe2..f53779c 100644
--- a/src/main/java/eu/dnetlib/app/directindex/mapping/SolrRecordMapper.java
+++ b/src/main/java/eu/dnetlib/app/directindex/mapping/SolrRecordMapper.java
@@ -275,7 +275,6 @@ public class SolrRecordMapper {
instance.setUrl(Arrays.asList(re.getUrl()));
}
- // TODO: valutare il colore OpenAccess: green, bronze, hybrid
if (StringUtils.isNotBlank(re.getAccessRightCode())) {
final String code = re.getAccessRightCode();
final String label = vocClient.findTermLabel("dnet:access_modes", re.getAccessRightCode());
@@ -384,10 +383,7 @@ public class SolrRecordMapper {
final List res = new ArrayList();
filterContextInfoByLevel(nodes, level, parent).forEach((k, v) -> {
- final Concept cpt = Concept.newInstance(k, v.getLabel());
- // TODO The class is limited at only 1 level for the concepts
- // cpt.setConcept(prepareDnetConcepts(nodes, k, level + 1));
- res.add(cpt);
+ res.add(Concept.newInstance(k, v.getLabel()));
});
return res;
diff --git a/src/main/java/eu/dnetlib/app/directindex/solr/SolrIndexClient.java b/src/main/java/eu/dnetlib/app/directindex/solr/SolrIndexClient.java
index 578826b..0b9d451 100644
--- a/src/main/java/eu/dnetlib/app/directindex/solr/SolrIndexClient.java
+++ b/src/main/java/eu/dnetlib/app/directindex/solr/SolrIndexClient.java
@@ -3,7 +3,6 @@ package eu.dnetlib.app.directindex.solr;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.stream.Stream;
@@ -33,14 +32,6 @@ public class SolrIndexClient {
this.cloudSolrClient = cloudSolrClient;
}
- public void commit() throws DirectIndexApiException {
- try {
- cloudSolrClient.commit();
- } catch (SolrServerException | IOException e) {
- throw new DirectIndexApiException(e);
- }
- }
-
public void deleteByQuery(final String query) throws DirectIndexApiException {
try {
cloudSolrClient.deleteByQuery(query);
@@ -52,11 +43,8 @@ public class SolrIndexClient {
public void addRecords(final Stream records) throws DirectIndexApiException {
try {
- final Iterator iter = records
- .map(this::prepareSolrDocument)
- .iterator();
-
- cloudSolrClient.add(iter);
+ cloudSolrClient.add(records.map(this::prepareSolrDocument).iterator());
+ cloudSolrClient.commit();
} catch (final Throwable e) {
throw new DirectIndexApiException("Error creating solr document", e);
}
@@ -66,7 +54,7 @@ public class SolrIndexClient {
addRecords(Arrays.stream(records));
}
- protected SolrInputDocument prepareSolrDocument(final SolrRecord record) {
+ private SolrInputDocument prepareSolrDocument(final SolrRecord record) {
// TODO (usare classe condivisa preparata da Claudio)
return null;
diff --git a/src/main/java/eu/dnetlib/app/directindex/tasks/ScheduledActions.java b/src/main/java/eu/dnetlib/app/directindex/tasks/ScheduledActions.java
index 2cec7a3..0ef4d46 100644
--- a/src/main/java/eu/dnetlib/app/directindex/tasks/ScheduledActions.java
+++ b/src/main/java/eu/dnetlib/app/directindex/tasks/ScheduledActions.java
@@ -68,8 +68,6 @@ public class ScheduledActions {
.map(solrRecordMapper::toSolrRecord)
.filter(Objects::nonNull));
- solr.commit();
-
updateExecutionDate(list);
}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 94b544d..4c06bab 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -17,7 +17,7 @@ dnet.directindex.vocabulary.url = https://services.openaire.eu/provision/mvc/voc
spring.profiles.active=dev
-maven.pom.path = /META-INF/maven/eu.dnetlib.dhp/dnet-directindex-api/effective-pom.xml
+maven.pom.path = /META-INF/maven/eu.dnetlib.dhp/dnet-directindex-application/effective-pom.xml
spring.main.banner-mode = off