Skip to content

Commit

Permalink
Version 1.1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
khituras committed Jan 10, 2022
1 parent ac1a955 commit 3841125
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion julielab-concept-creation-bioportal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>
<artifactId>julielab-concept-creation-bioportal</artifactId>
<name>JULIE Lab Concept Creation for BioPortal</name>
Expand Down
4 changes: 2 additions & 2 deletions julielab-concept-creation-mesh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>
<artifactId>julielab-concept-creation-mesh</artifactId>
<name>JULIE Lab Concept Creation Provider MeSH</name>
Expand All @@ -13,7 +13,7 @@
<dependency>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager-core</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
2 changes: 1 addition & 1 deletion julielab-concept-creation-ncbi-gene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>
<artifactId>julielab-concept-creation-ncbi-gene</artifactId>
<name>JULIE Lab Concept Creation for NCBI Gene</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,15 @@ protected Stream<ImportConcept> convertGeneInfoToTerms(File geneInfo, Set<String
Iterator<String> it = bw.lines().filter(record -> !record.startsWith("#")).iterator();
Iterator<ImportConcept> geneIterator = new Iterator<>() {

private boolean closed = false;

@Override
public boolean hasNext() {
boolean hasNext = it.hasNext();
boolean hasNext = closed ? false : it.hasNext();
if (!hasNext) {
try {
bw.close();
closed = true;
} catch (IOException e) {
throw new IllegalStateException(e);
}
Expand Down Expand Up @@ -585,6 +588,7 @@ public Stream<ImportConcepts> createConcepts(HierarchicalConfiguration<Immutable
options.doNotCreateHollowParents = false;
ImportConcepts importConcepts = new ImportConcepts(conceptStream, facet);
importConcepts.setNumConcepts(totalGeneIds.size() + homologeneAggregateCounter + orthologAggregateCounter + topHomologyAggregateCounter);
log.info("Created a total of {} concepts.", importConcepts.getNumConcepts());
importConcepts.setImportOptions(options);
return Stream.of(importConcepts);
} catch (IOException e) {
Expand Down
2 changes: 1 addition & 1 deletion julielab-concept-db-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>
<artifactId>julielab-concept-db-application</artifactId>
<name>JULIE Lab Concept DB Manager Application</name>
Expand Down
2 changes: 1 addition & 1 deletion julielab-concept-db-manager-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</parent>
<artifactId>julielab-concept-db-manager-core</artifactId>
<name>JULIE Lab Concept Database Manager Core</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void insertConcepts(HierarchicalConfiguration<ImmutableNode> importConfig
g.writeStartObject();
g.writeObjectField(NAME_FACET, concepts.getFacet());
g.writeObjectField(NAME_IMPORT_OPTIONS, concepts.getImportOptions());
g.writeNumberField(NAME_NUM_CONCEPTS, concepts.getNumConcepts());

Thread concept2json = new Thread(() -> {
try {
Expand All @@ -87,7 +88,8 @@ public void insertConcepts(HierarchicalConfiguration<ImmutableNode> importConfig
g.writeEndObject();
g.close();
} catch (IOException e) {
e.printStackTrace();
log.error("An error occurred while writing concepts into the output stream.", e);
throw new IllegalStateException(new ConceptInsertionException(e));
}
});
concept2json.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void exportData(HierarchicalConfiguration<ImmutableNode> exportConfig) th
File outputFile = new File(outputPath);
response = callNeo4jRestEndpoint(connectionConfiguration, exportConfig, "GET");
log.info("Writing file {}", outputFile);
HierarchicalConfiguration<ImmutableNode> decodingConfiguration = exportConfig.configurationAt(DECODING);
HierarchicalConfiguration<ImmutableNode> decodingConfiguration = exportConfig.configurationsAt(DECODING).size() > 0 ? exportConfig.configurationAt(DECODING) : null;
InputStream decodedResponse = decodingConfiguration != null ? decode(response, decodingConfiguration) : response;
writeData(outputFile, getResourceHeader(connectionConfiguration),decodedResponse);
log.info("Done.");
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-parent</artifactId>
<version>2.4.1</version>
<version>2.5.0</version>
</parent>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<name>JULIE Lab Concept Database Manager</name>
<description>This project is a collection of tools with the goal to import ontological concepts into a graph
database. The graph database then allows to traverse the imported data with a graph-specific query language. In
Expand Down

0 comments on commit 3841125

Please sign in to comment.