Commit 2d236977 authored by j.hoerdt's avatar j.hoerdt
Browse files

implement valid LandingPage

parent b545394d
......@@ -250,18 +250,17 @@ public class Main {
Map<String, Object> parameters = new Gson().fromJson(new FileReader("sensor_type_info.json"), new TypeToken <Map<String, Object>>() {}.getType());
try (var session = Main.driver.session(SessionConfig.forDatabase(Main.database_name))) {
session.writeTransaction(tx -> {
Result res = tx.run(
tx.run(
"unwind $sensor_type_info as sensor_type_info\n" +
"merge (n:SensorType {sensor_type: sensor_type_info.props.sensor_type})\n" +
"set n = sensor_type_info.props\n" +
"with n, sensor_type_info\n" +
"unwind sensor_type_info.measured_variables as measured_variable\n" +
"merge (m:MeasuredVariable {variable: measured_variable})\n" +
"merge (n)-[:MEASURES]->(m)\n" +
"return 1",
"merge (n)-[:MEASURES]->(m)\n",
parameters
);
return 5;
return 42;
});
}
}
......
......@@ -74,6 +74,9 @@ class Sensor {
"21.T11148/709a23220f2c3d64d1e1",
rec.get("sensor_type").asString()
);
add_attribute(body, "21.T11148/9a15a4735d4bda329d80",
"https://sensor.community"
);
Main.glogger.fine("sent body: " + body);
HttpRequest request = HttpRequest.newBuilder(URI.create(Main.pid_registry_uri + target_uri))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment