Skip to content

Commit

Permalink
Merge pull request #5 from JULIELab/neo4j3.5
Browse files Browse the repository at this point in the history
Neo4j3.5
  • Loading branch information
khituras authored May 14, 2020
2 parents 2e5dfe1 + 3424b67 commit cd86e0f
Show file tree
Hide file tree
Showing 43 changed files with 1,763 additions and 2,018 deletions.
4 changes: 2 additions & 2 deletions julielab-neo4j-plugins-concepts-representation/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-neo4j-server-plugins</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0</version>
</parent>
<artifactId>julielab-neo4j-plugins-concepts-representation</artifactId>
<dependencies>
Expand All @@ -20,7 +20,7 @@
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${jackson-release-version}</version>
<version>2.9.9</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package de.julielab.neo4j.plugins.datarepresentation;

import org.neo4j.shell.util.json.JSONException;
import org.neo4j.shell.util.json.JSONObject;

import de.julielab.neo4j.plugins.auxiliaries.JSON;
import de.julielab.neo4j.plugins.datarepresentation.constants.CoordinateConstants;

public class ConceptCoordinates implements Cloneable {

public String sourceId;
Expand Down Expand Up @@ -48,30 +42,6 @@ public ConceptCoordinates(String id, String source, CoordinateType src) {
}
}

public ConceptCoordinates(JSONObject jsonObject) throws JSONException {
this(jsonObject, true);
}

public ConceptCoordinates(JSONObject jsonObject, boolean checkConsistency) throws JSONException {
sourceId = JSON.getString(jsonObject, CoordinateConstants.SOURCE_ID);
source = JSON.getString(jsonObject, CoordinateConstants.SOURCE);
originalId = JSON.getString(jsonObject, CoordinateConstants.ORIGINAL_ID);
originalSource = JSON.getString(jsonObject, CoordinateConstants.ORIGINAL_SOURCE);
uniqueSourceId = JSON.getBoolean(jsonObject, CoordinateConstants.UNIQUE_SOURCE_ID);

if (checkConsistency) {
if (sourceId == null && source == null && originalId == null && originalSource == null)
throw new CoordinatesInvalidException(
"The passed concept coordinates JSON object did not specify any IDs or sources");

if (originalId == null ^ originalSource == null)
throw new CoordinatesInvalidException(
"Coordinates JSON specifies originalId / original source of (" + originalId + ", "
+ originalSource + ") but when one is not null, the other must be given, too.");
}
}



public ConceptCoordinates(ConceptCoordinates coordinates) {
this.originalId = coordinates.originalId;
Expand Down
Loading

0 comments on commit cd86e0f

Please sign in to comment.