Merge branch 'TINKERPOP-1676' into TINKERPOP-1676-master
Conflicts:
docs/src/dev/io/graphson.asciidoc
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/bb7ff829
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/bb7ff829
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/bb7ff829
Branch: refs/heads/master
Commit: bb7ff8290962e30dd4d78c4bd904eef31a3f2478
Parents: 000cba1 f32d725
Author: Stephen Mallette <[email protected]>
Authored: Thu May 25 15:25:32 2017 -0400
Committer: Stephen Mallette <[email protected]>
Committed: Thu May 25 15:25:32 2017 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 4 +
docs/src/dev/io/graphson.asciidoc | 121 +----------
.../upgrade/release-3.2.x-incubating.asciidoc | 12 ++
.../io/graphson/AbstractObjectDeserializer.java | 10 +-
.../structure/io/graphson/GraphSONReader.java | 5 +-
.../io/graphson/GraphSONSerializersV2d0.java | 200 +++++++++++++++----
.../io/graphson/GraphSONTypeDeserializer.java | 9 +-
.../io/graphson/JavaTimeSerializersV2d0.java | 5 +
.../io/graphson/TraversalSerializersV2d0.java | 146 +++++++++++---
.../structure/util/detached/DetachedEdge.java | 78 +++++++-
.../util/detached/DetachedElement.java | 4 +-
.../structure/util/detached/DetachedVertex.java | 63 +++++-
.../util/detached/DetachedVertexProperty.java | 49 ++++-
.../GraphSONMapperEmbeddedTypeTest.java | 109 ++++++++--
.../util/detached/DetachedEdgeTest.java | 3 +-
.../io/graphson/_3_3_0/path-v2d0-no-types.json | 59 +-----
.../io/graphson/_3_3_0/path-v2d0-partial.json | 122 +----------
.../io/graphson/_3_3_0/property-v3d0.json | 15 --
.../io/graphson/_3_3_0/standardresult-v3d0.json | 120 ++++++-----
.../io/graphson/_3_3_0/stargraph-v3d0.json | 120 ++++++-----
.../tinkergraph/structure/TinkerIoRegistry.java | 5 +-
.../structure/TinkerIoRegistryV1d0.java | 5 +-
.../structure/TinkerIoRegistryV2d0.java | 5 +
23 files changed, 745 insertions(+), 524 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/CHANGELOG.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/docs/src/dev/io/graphson.asciidoc
----------------------------------------------------------------------
diff --cc docs/src/dev/io/graphson.asciidoc
index 9ae9ef7,e4c671d..2f94251
--- a/docs/src/dev/io/graphson.asciidoc
+++ b/docs/src/dev/io/graphson.asciidoc
@@@ -1301,24 -1671,7 +1191,25 @@@ Pat
"@type" : "g:Int32",
"@value" : 10
},
+ "label" : "software"
+ "label" : "software",
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 4
+ },
+ "value" : "gremlin",
+ "vertex" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
+ "label" : "name"
+ }
+ } ]
+ }
}
}, {
"@type" : "g:Vertex",
@@@ -1327,24 -1680,7 +1218,24 @@@
"@type" : "g:Int32",
"@value" : 11
},
- "label" : "software",
+ "label" : "software"
+ "properties" : {
+ "name" : [ {
+ "@type" : "g:VertexProperty",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int64",
+ "@value" : 5
+ },
+ "value" : "tinkergraph",
+ "vertex" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
+ "label" : "name"
+ }
+ } ]
+ }
}
} ]
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
----------------------------------------------------------------------
diff --cc
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
index f8f4cd1,8d19e4f..a8af4b6
---
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
+++
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONSerializersV2d0.java
@@@ -579,5 -694,13 +694,10 @@@ class GraphSONSerializersV2d0
public Double deserialize(JsonParser jsonParser,
DeserializationContext deserializationContext) throws IOException,
JsonProcessingException {
return jsonParser.getDoubleValue();
}
+
+ @Override
+ public boolean isCachable() {
+ return true;
+ }
}
- }
+ }
-
-
-
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/detached/DetachedVertexProperty.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-no-types.json
----------------------------------------------------------------------
diff --cc
gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-no-types.json
index 06a9522,0000000..a592d2f
mode 100644,000000..100644
---
a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-no-types.json
+++
b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-no-types.json
@@@ -1,66 -1,0 +1,13 @@@
+{
+ "labels" : [ [ ], [ ], [ ] ],
+ "objects" : [ {
+ "id" : 1,
- "label" : "person",
- "properties" : {
- "name" : [ {
- "id" : 0,
- "value" : "marko",
- "label" : "name"
- } ],
- "location" : [ {
- "id" : 6,
- "value" : "san diego",
- "label" : "location",
- "properties" : {
- "startTime" : 1997,
- "endTime" : 2001
- }
- }, {
- "id" : 7,
- "value" : "santa cruz",
- "label" : "location",
- "properties" : {
- "startTime" : 2001,
- "endTime" : 2004
- }
- }, {
- "id" : 8,
- "value" : "brussels",
- "label" : "location",
- "properties" : {
- "startTime" : 2004,
- "endTime" : 2005
- }
- }, {
- "id" : 9,
- "value" : "santa fe",
- "label" : "location",
- "properties" : {
- "startTime" : 2005
- }
- } ]
- }
++ "label" : "person"
+ }, {
+ "id" : 10,
- "label" : "software",
- "properties" : {
- "name" : [ {
- "id" : 4,
- "value" : "gremlin",
- "label" : "name"
- } ]
- }
++ "label" : "software"
+ }, {
+ "id" : 11,
- "label" : "software",
- "properties" : {
- "name" : [ {
- "id" : 5,
- "value" : "tinkergraph",
- "label" : "name"
- } ]
- }
++ "label" : "software"
+ } ]
+}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-partial.json
----------------------------------------------------------------------
diff --cc
gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-partial.json
index 54ff76d,0000000..9ccaa00
mode 100644,000000..100644
---
a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-partial.json
+++
b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/path-v2d0-partial.json
@@@ -1,150 -1,0 +1,34 @@@
+{
+ "@type" : "g:Path",
+ "@value" : {
+ "labels" : [ [ ], [ ], [ ] ],
+ "objects" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
- "label" : "person",
- "properties" : {
- "name" : [ {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 0
- },
- "value" : "marko",
- "label" : "name"
- }
- } ],
- "location" : [ {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 6
- },
- "value" : "san diego",
- "label" : "location",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 1997
- },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
- }
- }
- }
- }, {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 7
- },
- "value" : "santa cruz",
- "label" : "location",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
- },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
- }
- }
- }
- }, {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 8
- },
- "value" : "brussels",
- "label" : "location",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
- },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
- }
- }
- }
- }, {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 9
- },
- "value" : "santa fe",
- "label" : "location",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
- }
- }
- }
- } ]
- }
++ "label" : "person"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 10
+ },
- "label" : "software",
- "properties" : {
- "name" : [ {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 4
- },
- "value" : "gremlin",
- "label" : "name"
- }
- } ]
- }
++ "label" : "software"
+ }
+ }, {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 11
+ },
- "label" : "software",
- "properties" : {
- "name" : [ {
- "@type" : "g:VertexProperty",
- "@value" : {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 5
- },
- "value" : "tinkergraph",
- "label" : "name"
- }
- } ]
- }
++ "label" : "software"
+ }
+ } ]
+ }
+}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/property-v3d0.json
----------------------------------------------------------------------
diff --cc
gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/property-v3d0.json
index db2e8db,0000000..296fe32
mode 100644,000000..100644
---
a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/property-v3d0.json
+++
b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/property-v3d0.json
@@@ -1,25 -1,0 +1,10 @@@
+{
+ "@type" : "g:Property",
+ "@value" : {
+ "key" : "since",
+ "value" : {
+ "@type" : "g:Int32",
+ "@value" : 2009
- },
- "edge" : {
- "id" : {
- "@type" : "g:Int32",
- "@value" : 13
- },
- "label" : "develops",
- "inV" : {
- "@type" : "g:Int32",
- "@value" : 10
- },
- "outV" : {
- "@type" : "g:Int32",
- "@value" : 1
- }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/standardresult-v3d0.json
----------------------------------------------------------------------
diff --cc
gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/standardresult-v3d0.json
index 2b48871,0000000..857c6db
mode 100644,000000..100644
---
a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/standardresult-v3d0.json
+++
b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/standardresult-v3d0.json
@@@ -1,91 -1,0 +1,111 @@@
+{
+ "requestId" : "41d2e28a-20a4-4ab0-b379-d810dede3786",
+ "status" : {
+ "message" : "",
+ "code" : 200,
+ "attributes" : { }
+ },
+ "result" : {
+ "data" : [ {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 0
- },
- "value" : "marko"
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 0
++ },
++ "value" : "marko",
++ "label" : "name"
++ }
+ } ],
+ "location" : [ {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 6
- },
- "value" : "san diego",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 1997
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 6
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
++ "value" : "san diego",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 1997
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2001
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 7
- },
- "value" : "santa cruz",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 7
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
++ "value" : "santa cruz",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2001
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2004
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 8
- },
- "value" : "brussels",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 8
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
++ "value" : "brussels",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2004
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2005
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 9
- },
- "value" : "santa fe",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 9
++ },
++ "value" : "santa fe",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2005
++ }
+ }
+ }
+ } ]
+ }
+ }
+ } ],
+ "meta" : { }
+ }
+}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bb7ff829/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/stargraph-v3d0.json
----------------------------------------------------------------------
diff --cc
gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/stargraph-v3d0.json
index 0d82b27,0000000..59ff13a
mode 100644,000000..100644
---
a/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/stargraph-v3d0.json
+++
b/gremlin-tools/gremlin-io-test/src/test/resources/org/apache/tinkerpop/gremlin/structure/io/graphson/_3_3_0/stargraph-v3d0.json
@@@ -1,82 -1,0 +1,102 @@@
+{
+ "starVertex" : {
+ "@type" : "g:Vertex",
+ "@value" : {
+ "id" : {
+ "@type" : "g:Int32",
+ "@value" : 1
+ },
+ "label" : "person",
+ "properties" : {
+ "name" : [ {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 0
- },
- "value" : "marko"
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 0
++ },
++ "value" : "marko",
++ "label" : "name"
++ }
+ } ],
+ "location" : [ {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 6
- },
- "value" : "san diego",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 1997
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 6
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
++ "value" : "san diego",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 1997
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2001
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 7
- },
- "value" : "santa cruz",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2001
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 7
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
++ "value" : "santa cruz",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2001
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2004
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 8
- },
- "value" : "brussels",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2004
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 8
+ },
- "endTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
++ "value" : "brussels",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2004
++ },
++ "endTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2005
++ }
+ }
+ }
+ }, {
- "id" : {
- "@type" : "g:Int64",
- "@value" : 9
- },
- "value" : "santa fe",
- "properties" : {
- "startTime" : {
- "@type" : "g:Int32",
- "@value" : 2005
++ "@type" : "g:VertexProperty",
++ "@value" : {
++ "id" : {
++ "@type" : "g:Int64",
++ "@value" : 9
++ },
++ "value" : "santa fe",
++ "label" : "location",
++ "properties" : {
++ "startTime" : {
++ "@type" : "g:Int32",
++ "@value" : 2005
++ }
+ }
+ }
+ } ]
+ }
+ }
+ }
+}