diff --git a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdReview.java b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdReview.java index 8562860..c0cb1c6 100644 --- a/src/main/java/org/globalbioticinteractions/elton/cmd/CmdReview.java +++ b/src/main/java/org/globalbioticinteractions/elton/cmd/CmdReview.java @@ -120,8 +120,9 @@ public void doRun() { PrintStream dataOut = getDataSink(getStdout()); - for (URI localNamespace : localNamespaces) { + boolean shouldSkipHeader = shouldSkipHeader(); + for (URI localNamespace : localNamespaces) { ResourceServiceListening resourceServiceLocalAndRemote = new ResourceServiceListening( getActivityIdFactory(), @@ -131,7 +132,6 @@ public void doRun() { new LocalPathToHashIRI(new File(getDataDir())) ); - DatasetRegistry registryLocal = DatasetRegistryUtil.forLocalDir( localNamespace, resourceServiceLocalAndRemote, @@ -146,16 +146,20 @@ public void doRun() { review(DatasetRegistryUtil.NAMESPACE_LOCAL, registryLocal, factory, - shouldSkipHeader(), + shouldSkipHeader, dataOut ); + + // skip header after first review + shouldSkipHeader = true; } reviewLocal( remoteNamespaces, factory, dataOut, - activityListener + activityListener, + shouldSkipHeader() ); } catch (StudyImporterException e) { @@ -170,7 +174,9 @@ public String getDescription() { private void reviewLocal(List namespaces, InputStreamFactory inputStreamFactory, - PrintStream dataOut, ActivityListener activityListener) throws StudyImporterException { + PrintStream dataOut, + ActivityListener activityListener, + boolean shouldSkipHeader) throws StudyImporterException { for (String namespace : namespaces) { ResourceServiceListening resourceServiceLocal @@ -193,9 +199,11 @@ private void reviewLocal(List namespaces, review(namespace, registry, inputStreamFactory, - shouldSkipHeader(), + shouldSkipHeader, dataOut ); + + shouldSkipHeader = true; } }