Commit 9ae8d169 authored by Matija Obreza's avatar Matija Obreza

Java 8

parent 4295ea57
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
......
...@@ -25,9 +25,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota ...@@ -25,9 +25,9 @@ org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annota
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
...@@ -116,7 +116,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning ...@@ -116,7 +116,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.7 org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
......
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jdk.target>1.7</jdk.target> <jdk.target>1.8</jdk.target>
<jdk.source>1.7</jdk.source> <jdk.source>1.8</jdk.source>
<show.deprecations>false</show.deprecations> <show.deprecations>false</show.deprecations>
<junit.version>4.11</junit.version> <junit.version>4.11</junit.version>
......
...@@ -20,6 +20,7 @@ import java.util.Collection; ...@@ -20,6 +20,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Stream;
import org.genesys2.server.model.genesys.Accession; import org.genesys2.server.model.genesys.Accession;
import org.genesys2.server.model.genesys.Taxonomy2; import org.genesys2.server.model.genesys.Taxonomy2;
...@@ -120,4 +121,7 @@ public interface AccessionRepository extends JpaRepository<Accession, Long> { ...@@ -120,4 +121,7 @@ public interface AccessionRepository extends JpaRepository<Accession, Long> {
public Accession findOneByUuid(UUID uuid); public Accession findOneByUuid(UUID uuid);
public List<Accession> findByAccessionName(String acceNumb); public List<Accession> findByAccessionName(String acceNumb);
@Query("select a from Accession a")
Stream<Accession> streamAll();
} }
...@@ -168,7 +168,6 @@ public class ElasticUpdater { ...@@ -168,7 +168,6 @@ public class ElasticUpdater {
} }
int page = 0, size = 100; int page = 0, size = 100;
List<IndexQuery> queries = new ArrayList<IndexQuery>();
do { do {
if ((page * size) % 10000 == 0) { if ((page * size) % 10000 == 0) {
LOG.info("Full reindex enqueue progress " + (page * size)); LOG.info("Full reindex enqueue progress " + (page * size));
...@@ -178,7 +177,6 @@ public class ElasticUpdater { ...@@ -178,7 +177,6 @@ public class ElasticUpdater {
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
} }
queries.clear();
List<Long> accessions = genesysService.listAccessionsIds(new PageRequest(page, size)); List<Long> accessions = genesysService.listAccessionsIds(new PageRequest(page, size));
if (accessions.isEmpty()) { if (accessions.isEmpty()) {
LOG.info("No more content"); LOG.info("No more content");
......
...@@ -108,6 +108,7 @@ public class AccessionController extends BaseController { ...@@ -108,6 +108,7 @@ public class AccessionController extends BaseController {
// PDCI // PDCI
if (pdciCalculator != null) { if (pdciCalculator != null) {
try { try {
// FIXME Duplicated loading of all accession information
PDCI pdci = pdciCalculator.makePDCI(accession.getId()); PDCI pdci = pdciCalculator.makePDCI(accession.getId());
PDCI existingPdci = genesysService.loadPDCI(accession.getId()); PDCI existingPdci = genesysService.loadPDCI(accession.getId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment