Skip to content

Commit

Permalink
only log review header once
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorrit Poelen committed Dec 31, 2024
1 parent 8d9f72f commit 7d5e25e
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -131,7 +132,6 @@ public void doRun() {
new LocalPathToHashIRI(new File(getDataDir()))
);


DatasetRegistry registryLocal = DatasetRegistryUtil.forLocalDir(
localNamespace,
resourceServiceLocalAndRemote,
Expand All @@ -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) {
Expand All @@ -170,7 +174,9 @@ public String getDescription() {

private void reviewLocal(List<String> namespaces,
InputStreamFactory inputStreamFactory,
PrintStream dataOut, ActivityListener activityListener) throws StudyImporterException {
PrintStream dataOut,
ActivityListener activityListener,
boolean shouldSkipHeader) throws StudyImporterException {
for (String namespace : namespaces) {

ResourceServiceListening resourceServiceLocal
Expand All @@ -193,9 +199,11 @@ private void reviewLocal(List<String> namespaces,
review(namespace,
registry,
inputStreamFactory,
shouldSkipHeader(),
shouldSkipHeader,
dataOut
);

shouldSkipHeader = true;
}
}

Expand Down

0 comments on commit 7d5e25e

Please sign in to comment.