Skip to content

Commit

Permalink
added "info" field to meta node
Browse files Browse the repository at this point in the history
  • Loading branch information
nneubarth committed Apr 12, 2019
1 parent 865aac8 commit 2163ed7
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 7 deletions.
Binary file modified executables/neuprint-load-procedures.jar
Binary file not shown.
Binary file modified executables/neuprint-procedures.jar
Binary file not shown.
Binary file modified executables/neuprint.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion meta-data/fib25_meta_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"uuid": "2b6d75f1c6e348ce945e1a66eb2f6bf3",
"dvidServer": "flyem.dvid.io",
"meshHost": "https://flyem.dvid.io",
"statusDefinitions": "{'final':'has been fully traced or reconstructed','orphan':'the body cannot be traced to a larger parent cell','leaves':'body leaves the volume','final (irrelevant)':'not a neuron','partially traced':'body is traced except for regions of the body that leave the volume','Not examined':'not proofread/traced','uncorrected':''}"
"statusDefinitions": "{'final':'has been fully traced or reconstructed','orphan':'the body cannot be traced to a larger parent cell','leaves':'body leaves the volume','final (irrelevant)':'not a neuron','partially traced':'body is traced except for regions of the body that leave the volume','Not examined':'not proofread/traced','uncorrected':''}",
"info": "https://github.com/connectome-neuprint/neuPrint/blob/master/fib25_info.md"
}
3 changes: 2 additions & 1 deletion meta-data/mb6_meta_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"uuid": "babdf6dbc23e44a69953a66e2260ff0a",
"dvidServer": "flyem.dvid.io",
"meshHost": "",
"statusDefinitions": "{'Finalized':'has been fully traced or reconstructed','Leaves':'body leaves the volume','Hard to trace':'proofreaders were not able to trace the body further; reconstruction incomplete','Partially Traced':'body is traced except for regions of the body that leave the volume','Orphan':'the body cannot be traced to a larger parent cell','Traced':''}"
"statusDefinitions": "{'Finalized':'has been fully traced or reconstructed','Leaves':'body leaves the volume','Hard to trace':'proofreaders were not able to trace the body further; reconstruction incomplete','Partially Traced':'body is traced except for regions of the body that leave the volume','Orphan':'the body cannot be traced to a larger parent cell','Traced':''}",
"info": "https://github.com/connectome-neuprint/neuPrint/blob/master/mb6_info.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -779,14 +779,15 @@ public void createMetaNodeWithDataModelNode(final String dataset, final float da
public void addMetaInfo(String dataset, MetaInfo metaInfo) {

LOG.info("addMetaInfo: enter");
String metaNodeUuidString = "MATCH (m:Meta{dataset:$dataset}) SET m.neuroglancerInfo=$neuroglancerInfo, m.uuid=$uuid, m.dvidServer=$dvidServer, m.statusDefinitions=$statusDefinitions, m.meshHost=$meshHost";
String metaNodeUuidString = "MATCH (m:Meta{dataset:$dataset}) SET m.neuroglancerInfo=$neuroglancerInfo, m.uuid=$uuid, m.dvidServer=$dvidServer, m.statusDefinitions=$statusDefinitions, m.meshHost=$meshHost, m.info=$info";
try (final TransactionBatch batch = getBatch()) {
batch.addStatement(new Statement(metaNodeUuidString, parameters("dataset", dataset,
"neuroglancerInfo", metaInfo.getNeuroglancerInfo(),
"uuid", metaInfo.getUuid(),
"dvidServer", metaInfo.getDvidServer(),
"statusDefinitions", metaInfo.getStatusDefinitions(),
"meshHost", metaInfo.getMeshHost()
"meshHost", metaInfo.getMeshHost(),
"info", metaInfo.getInfo()
)));

batch.writeTransaction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ public class MetaInfo {
@SerializedName("statusDefinitions")
private final String statusDefinitions;

public MetaInfo(final String neuroglancerInfo, String uuid, String dvidServer, String meshHost, String statusDefinitions) {
@SerializedName("info")
private final String info;

public MetaInfo(final String neuroglancerInfo, String uuid, String dvidServer, String meshHost, String statusDefinitions, String info) {
this.neuroglancerInfo = neuroglancerInfo;
this.uuid = uuid;
this.dvidServer = dvidServer;
this.meshHost = meshHost;
this.statusDefinitions = statusDefinitions;
this.info = info;
}

public String getDvidServer() {
Expand All @@ -52,6 +56,10 @@ public String getUuid() {
return uuid;
}

public String getInfo() {
return info;
}

public static MetaInfo fromJson(final BufferedReader reader) {
return JsonUtils.GSON.fromJson(reader, META_INFO_TYPE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ public void shouldAddMetaInfoToMetaNode() {
Assert.assertEquals("test neuroglancer info", metaNode.asMap().get("neuroglancerInfo"));
Assert.assertEquals("test host", metaNode.asMap().get("meshHost"));
Assert.assertEquals("test definitions", metaNode.asMap().get("statusDefinitions"));
Assert.assertEquals("test info", metaNode.asMap().get("info"));



}
Expand Down
3 changes: 2 additions & 1 deletion neuprint/src/test/resources/testMetaInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"uuid": "123456d",
"dvidServer": "test server",
"meshHost": "test host",
"statusDefinitions": "test definitions"
"statusDefinitions": "test definitions",
"info": "test info"
}
3 changes: 2 additions & 1 deletion neuprint/target/test-classes/testMetaInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"uuid": "123456d",
"dvidServer": "test server",
"meshHost": "test host",
"statusDefinitions": "test definitions"
"statusDefinitions": "test definitions",
"info": "test info"
}

0 comments on commit 2163ed7

Please sign in to comment.