diff --git a/jcore-gnormplus-ae/pom.xml b/jcore-gnormplus-ae/pom.xml
index bef64353..49a872fc 100644
--- a/jcore-gnormplus-ae/pom.xml
+++ b/jcore-gnormplus-ae/pom.xml
@@ -13,7 +13,7 @@
2.6.1
- 2.6.6
+ 2.6.7-SNAPSHOT
diff --git a/jcore-gnormplus-ae/src/main/java/de/julielab/jcore/multiplier/gnp/GNormPlusMultiplierLogic.java b/jcore-gnormplus-ae/src/main/java/de/julielab/jcore/multiplier/gnp/GNormPlusMultiplierLogic.java
index 405220cb..0cff65f4 100644
--- a/jcore-gnormplus-ae/src/main/java/de/julielab/jcore/multiplier/gnp/GNormPlusMultiplierLogic.java
+++ b/jcore-gnormplus-ae/src/main/java/de/julielab/jcore/multiplier/gnp/GNormPlusMultiplierLogic.java
@@ -71,7 +71,7 @@ public AbstractCas next() throws AnalysisEngineProcessException {
// Process the incoming documents batch-wise (this is why we use a multiplier here so we have access
// to whole batches). This checks if we still have processed documents or if we need to process the next
// batch.
- if (bioCCasPopulator == null || bioCCasPopulator.documentsLeftInCollection() == 0) {
+ if (currentCollectionIndex == cachedCasData.size()) {
currentCollectionIndex = 0;
currentBiocResultCollectionIndex = 0;
final BioCCollection gnormPlusInputCollection = GNormPlusProcessing.createEmptyJulieLabBioCCollection();
@@ -83,7 +83,7 @@ public AbstractCas next() throws AnalysisEngineProcessException {
cachedCasData.clear();
while (baseMultiplierHasNext.get()) {
final JCas jCas = baseMultiplierNext.get();
- boolean isDocumentHashUnchanged = false;
+ boolean isDocumentHashUnchanged = false;
try {
isDocumentHashUnchanged = JCasUtil.selectSingle(jCas, DBProcessingMetaData.class).getIsDocumentHashUnchanged();
} catch (IllegalArgumentException e) {
@@ -120,7 +120,7 @@ public AbstractCas next() throws AnalysisEngineProcessException {
} catch (XMLStreamException | IOException e) {
log.error("Could not read GNormPlus output from {}", outputFilePath);
throw new AnalysisEngineProcessException(e);
- } catch (ClassNotFoundException| NoSuchMethodException e) {
+ } catch (ClassNotFoundException | NoSuchMethodException e) {
log.error("Could not obtain UIMA gene annotation type constructor for class {}", outputGeneTypeName);
throw new AnalysisEngineProcessException(e);
}
@@ -151,6 +151,9 @@ public AbstractCas next() throws AnalysisEngineProcessException {
cachedCasData.set(currentCollectionIndex, null);
++currentCollectionIndex;
+ if (log.isTraceEnabled())
+ log.trace("Created multiplier-CAS for document with ID {}", JCoReTools.getDocId(jCas));
+
return jCas;
} catch (AnalysisEngineProcessException e) {
log.error("Error while retrieving or processing data for/with GNormPlus", e);
@@ -160,7 +163,7 @@ public AbstractCas next() throws AnalysisEngineProcessException {
public boolean hasNext() {
try {
- return bioCCasPopulator != null && bioCCasPopulator.documentsLeftInCollection() > 0 || baseMultiplierHasNext.get();
+ return currentCollectionIndex < cachedCasData.size() || baseMultiplierHasNext.get();
} catch (Throwable t) {
log.error("Could not determine hasNext()", t);
throw t;