Skip to content

Commit

Permalink
Version 1.3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
khituras committed Jan 23, 2023
1 parent 4cb976e commit ffdd873
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 14 deletions.
3 changes: 2 additions & 1 deletion julielab-concept-creation-bioportal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>julielab-concept-creation-bioportal</artifactId>
<name>JULIE Lab Concept Creation for BioPortal</name>
Expand Down
3 changes: 2 additions & 1 deletion julielab-concept-creation-famplex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<parent>
<artifactId>julielab-concept-db-manager</artifactId>
<groupId>de.julielab</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>JULIE Lab Concept Creation for FamPlex</name>
Expand Down
3 changes: 2 additions & 1 deletion julielab-concept-creation-hgnc-groups/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<parent>
<artifactId>julielab-concept-db-manager</artifactId>
<groupId>de.julielab</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>JULIE Lab Concept Creation HGNC Groups</name>
Expand Down
5 changes: 3 additions & 2 deletions julielab-concept-creation-mesh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>julielab-concept-creation-mesh</artifactId>
<name>JULIE Lab Concept Creation Provider MeSH</name>
Expand All @@ -13,7 +14,7 @@
<dependency>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager-core</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
3 changes: 2 additions & 1 deletion julielab-concept-creation-ncbi-gene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>julielab-concept-creation-ncbi-gene</artifactId>
<name>JULIE Lab Concept Creation for NCBI Gene</name>
Expand Down
3 changes: 2 additions & 1 deletion julielab-concept-db-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>julielab-concept-db-application</artifactId>
<name>JULIE Lab Concept DB Manager Application</name>
Expand Down
3 changes: 2 additions & 1 deletion julielab-concept-db-manager-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>de.julielab</groupId>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.0</version>
<version>1.3.1</version>
<relativePath>../pom.xml</relativePath>
</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 @@ -24,6 +24,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

Expand Down Expand Up @@ -68,6 +69,9 @@ public void insertConcepts(HierarchicalConfiguration<ImmutableNode> importConfig
try {
log.debug("Inserting the concepts of facet {} (customId: {}) into the Neo4j database", facet.getName(),
facet.getCustomId());
// The JULIE Lab Neo4j plugins cannot handle parents in merging mode
if (concepts.getImportOptions().merge)
concepts.setConcepts(concepts.getConcepts().map(c -> {c.parentCoordinates = Collections.emptyList(); return c;}));
Map<String, Object> response = new HashMap<>();
ConceptInsertion.insertConcepts(graphDb, ciLog, concepts, response);
log.debug("Successfully inserted the given concepts: {}", response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import java.io.UnsupportedEncodingException;
import java.util.Collections;
import java.util.stream.Stream;

import static de.julielab.concepts.db.core.ConfigurationConstants.*;
Expand Down Expand Up @@ -83,6 +84,9 @@ public void insertConcepts(HierarchicalConfiguration<ImmutableNode> importConfig
g.writeFieldName(NAME_CONCEPTS);
g.writeStartArray();
for (ImportConcept concept : (Iterable<ImportConcept>) importConcepts::iterator) {
// The JULIE Lab Neo4j plugins cannot handle parents in merging mode
if (concepts.getImportOptions().merge)
concept.parentCoordinates = Collections.emptyList();
g.writeObject(concept);
progressBar.incrementDone(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public interface ConceptInserter extends DatabaseConnected {
*/
default ImportOptions setGlobalOptions(HierarchicalConfiguration<ImmutableNode> importConfiguration, @Nullable ImportOptions optionsFromConceptCreator) {
ImportOptions retOptions = optionsFromConceptCreator != null ? optionsFromConceptCreator : new ImportOptions();
final Boolean merge = importConfiguration.getBoolean(slash(IMPORT_OPTIONS, MERGE));
final Boolean overridePreferredName = importConfiguration.getBoolean(slash(IMPORT_OPTIONS, OVERRIDE_PREFERRED_NAME));
final Boolean merge = importConfiguration.getBoolean(slash(IMPORT_OPTIONS, MERGE), null);
final Boolean overridePreferredName = importConfiguration.getBoolean(slash(IMPORT_OPTIONS, OVERRIDE_PREFERRED_NAME), null);

if (merge != null)
retOptions.merge = merge;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<xs:complexType>
<xs:sequence>
<xs:element ref="rest" minOccurs="0"/>
<xs:element ref="importoptions" minOccurs="0"/>
<xs:element ref="concepts" minOccurs="0"/>
<xs:element ref="facet" minOccurs="0"/>
<xs:element ref="mappings" minOccurs="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
</xs:complexType>
</xs:element>

<xs:element name="importoptions">
<xs:complexType>
<xs:sequence>
<xs:element name="merge" type="xs:boolean"/>
<xs:element name="overridepreferredname" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="parameter">
<xs:annotation>
<xs:documentation xml:lang="en">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class ITTestsSetup {
public static GenericContainer neo4j = new GenericContainer(
new ImageFromDockerfile("cdbm-1.2.0-test", true)
.withFileFromClasspath("Dockerfile", "dockercontext/Dockerfile")
.withFileFromClasspath("julielab-neo4j-plugins-concepts-3.1.0-assembly.jar", "dockercontext/julielab-neo4j-plugins-concepts-3.1.0-assembly.jar")
.withFileFromClasspath("julielab-neo4j-plugins-concepts-3.2.1-assembly.jar", "dockercontext/julielab-neo4j-plugins-concepts-3.2.1-assembly.jar")
.withFileFromClasspath("neo4j.conf", "dockercontext/neo4j.conf"))
.withExposedPorts(7474, 7687)
.withEnv("NEO4J_AUTH", "none");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM neo4j:4.4.2
COPY julielab-neo4j-plugins-concepts-3.1.0-assembly.jar /var/lib/neo4j/plugins
COPY julielab-neo4j-plugins-concepts-3.2.1-assembly.jar /var/lib/neo4j/plugins
COPY neo4j.conf /var/lib/neo4j/conf/neo4j.conf
Binary file not shown.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<version>2.5.0</version>
</parent>
<artifactId>julielab-concept-db-manager</artifactId>
<version>1.3.1-SNAPSHOT</version>
<version>1.3.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 Expand Up @@ -59,7 +59,7 @@
</dependencies>
</dependencyManagement>
<properties>
<julielab-neo4j-plugins-version>3.2.1-SNAPSHOT</julielab-neo4j-plugins-version>
<julielab-neo4j-plugins-version>3.2.1</julielab-neo4j-plugins-version>
<neo4j-version>4.4.2</neo4j-version>
</properties>
</project>

0 comments on commit ffdd873

Please sign in to comment.