Skip to content

Commit

Permalink
remove triple constraints after expanding GloBI capacity related to #963
Browse files Browse the repository at this point in the history
 .
  • Loading branch information
Jorrit Poelen committed Apr 22, 2024
1 parent 6c14522 commit f2b5dd8
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void on(Node node) {

private void exportDarwinCoreAggregatedByStudy(GraphDatabaseService graphService, File baseDir) throws StudyImporterException {
exportDarwinCoreArchive(graphService,
new File(baseDir,"aggregatedByStudy"), new HashMap<String, DarwinCoreExporter>() {
new File(baseDir, "aggregatedByStudy"), new HashMap<String, DarwinCoreExporter>() {
{
put("association.tsv", new ExporterAssociationAggregates());
put("occurrence.tsv", new ExporterOccurrenceAggregates());
Expand Down Expand Up @@ -148,17 +148,12 @@ private void exportDataOntology(GraphDatabaseService graphService, File baseDir)
OutputStreamWriter writer = openStream(exportFile);
String msg = "writing nquads archive to [" + exportFile + "]";
LOG.info(msg + "...");
AtomicInteger studyCounter = new AtomicInteger(0);
NodeUtil.findStudies(graphService, node -> {
try {
int studyCount = studyCounter.getAndIncrement();
// limit to number of nquads translated studies for now
if (studyCount < 100) {
studyExporter.exportStudy(
new StudyNode(node),
ExportUtil.AppenderWriter.of(writer, new ExportUtil.NQuadValueJoiner()),
true);
}
studyExporter.exportStudy(
new StudyNode(node),
ExportUtil.AppenderWriter.of(writer, new ExportUtil.NQuadValueJoiner()),
true);
} catch (IOException e) {
throw new IllegalStateException("failed to export interactions to [" + exportFile.getAbsolutePath() + "]", e);
}
Expand Down

0 comments on commit f2b5dd8

Please sign in to comment.