From cf087f46e7aa38773134264b9e6462716b1b146b Mon Sep 17 00:00:00 2001 From: p29876 <165825455+p29876@users.noreply.github.com> Date: Thu, 9 May 2024 10:04:43 +0000 Subject: [PATCH 1/2] Gh-352 Update gaffer-gremlin example --- .../example/conf/gaffer/schema/elements.json | 83 +++++++++---------- .../example/conf/gaffer/schema/types.json | 41 ++++++--- .../conf/gafferpop/gafferpop.properties | 1 + 3 files changed, 72 insertions(+), 53 deletions(-) diff --git a/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json b/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json index 7508117d..d964d15c 100644 --- a/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json +++ b/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json @@ -1,52 +1,49 @@ { "entities": { - "person": { - "vertex": "person", - "properties": { - "name": "name.string", - "age": "age.integer" + "vertex": { + "vertex": "string.id" }, - "aggregate": false - }, - "software": { - "vertex": "software", - "properties": { - "name": "name.string", - "lang": "name.string" + "person": { + "vertex": "string.id", + "properties": { + "name": "property.string", + "age": "property.integer" + } }, - "aggregate": false - } + "software": { + "vertex": "string.id", + "properties": { + "name": "property.string", + "lang": "property.string" + } + } }, "edges": { - "knows": { - "source": "person", - "destination": "person", - "directed": "true", - "properties": { - "weight": "weight.double" + "knows": { + "source": "string.id", + "destination": "string.id", + "directed": "true", + "properties": { + "weight": "property.double" + } }, - "aggregate": false - }, - "created": { - "source": "person", - "destination": "software", - "directed": "true", - "properties": { - "weight": "weight.double" + "created": { + "source": "string.id", + "destination": "string.id", + "directed": "true", + "properties": { + "weight": "property.double" + } }, - "aggregate": false - }, - "dependsOn": { - "source": "software", - "destination": "software", - "directed": "true", - "aggregate": false - }, - "encapsulates": { - "source": "software", - "destination": "software", - "directed": "true", - "aggregate": false - } + "dependsOn": { + "source": "string.id", + "destination": "string.id", + "directed": "true" + }, + "encapsulates": { + "source": "string.id", + "destination": "string.id", + "directed": "true" + } } -} +} \ No newline at end of file diff --git a/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json b/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json index 95784312..84000e40 100644 --- a/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json +++ b/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json @@ -1,22 +1,43 @@ { "types": { - "person": { - "class": "java.lang.String" + "int.id": { + "class": "java.lang.Integer" }, - "software": { + "long.id": { + "class": "java.lang.Long" + }, + "string.id": { "class": "java.lang.String" }, + "uuid.id": { + "class": "java.util.UUID" + }, "true": { "class": "java.lang.Boolean" }, - "name.string": { - "class": "java.lang.String" + "property.string": { + "class": "java.lang.String", + "aggregateFunction": { + "class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" + } }, - "age.integer": { - "class": "java.lang.Integer" + "property.integer": { + "class": "java.lang.Integer", + "aggregateFunction": { + "class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" + } + }, + "property.double": { + "class": "java.lang.Double", + "aggregateFunction": { + "class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" + } }, - "weight.double": { - "class": "java.lang.Double" + "property.float": { + "class": "java.lang.Float", + "aggregateFunction": { + "class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" + } } } -} +} \ No newline at end of file diff --git a/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties b/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties index e4e662b0..10fe9513 100644 --- a/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties +++ b/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties @@ -18,3 +18,4 @@ gaffer.graphId=graph1 gaffer.storeproperties=conf/gaffer/store.properties gaffer.schemas=conf/gaffer/schema/ gaffer.userId=user01 +gaffer.elements.notreadonly=true \ No newline at end of file From f6813a68467a52e9b43d7c491e5c5fa827a4a7cc Mon Sep 17 00:00:00 2001 From: p29876 <165825455+p29876@users.noreply.github.com> Date: Thu, 9 May 2024 14:15:21 +0000 Subject: [PATCH 2/2] newlines --- docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json | 2 +- docker/gaffer-gremlin/example/conf/gaffer/schema/types.json | 2 +- .../gaffer-gremlin/example/conf/gafferpop/gafferpop.properties | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json b/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json index d964d15c..97f6285d 100644 --- a/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json +++ b/docker/gaffer-gremlin/example/conf/gaffer/schema/elements.json @@ -46,4 +46,4 @@ "directed": "true" } } -} \ No newline at end of file +} diff --git a/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json b/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json index 84000e40..2f632371 100644 --- a/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json +++ b/docker/gaffer-gremlin/example/conf/gaffer/schema/types.json @@ -40,4 +40,4 @@ } } } -} \ No newline at end of file +} diff --git a/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties b/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties index 10fe9513..d944079c 100644 --- a/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties +++ b/docker/gaffer-gremlin/example/conf/gafferpop/gafferpop.properties @@ -18,4 +18,4 @@ gaffer.graphId=graph1 gaffer.storeproperties=conf/gaffer/store.properties gaffer.schemas=conf/gaffer/schema/ gaffer.userId=user01 -gaffer.elements.notreadonly=true \ No newline at end of file +gaffer.elements.notreadonly=true