tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [36/44] tinkerpop git commit: TINKERPOP-1130 Added Request/ResponseMessage incompatibilty reasons.
Date Fri, 06 Jan 2017 19:42:41 GMT
TINKERPOP-1130 Added Request/ResponseMessage incompatibilty reasons.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/86e04c68
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/86e04c68
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/86e04c68

Branch: refs/heads/master
Commit: 86e04c689e29934273e57e81dd9478a5c96f8d5a
Parents: 7f94d29
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Dec 29 10:27:01 2016 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Tue Jan 3 10:34:56 2017 -0500

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/io/Model.java   | 32 +++++++++-----------
 1 file changed, 14 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/86e04c68/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
----------------------------------------------------------------------
diff --git a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
index 3ecaccb..3bf7770 100644
--- a/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
+++ b/gremlin-tools/gremlin-io-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/Model.java
@@ -332,32 +332,22 @@ public class Model {
         addEntry("Graph Process", obj, title, description);
     }
 
-    private void addGraphProcessEntry(final Object obj, final String title, final String
description, final Compatibility... incompatibleWith) {
-        addGraphProcessEntry(obj, title, description, null, incompatibleWith);
-    }
-
     private void addGraphProcessEntry(final Object obj, final String title, final String
description, final Map<Compatibility, String> incompatibilityNotes, final Compatibility...
incompatibleWith) {
         addEntry("Graph Process", obj, title, description, incompatibilityNotes, incompatibleWith);
     }
 
-    private void addGraphProcessEntry(final Object obj, final String title, final String
description, final List<Compatibility> compatibleWith) {
-        addEntry("Graph Process", obj, title, description, compatibleWith);
-    }
-
-    private void addRequestMessageEntry(final Object obj, final String title, final String
description) {
-        addEntry("RequestMessage", obj, title, description, GRAPHSON_ONLY);
-    }
-
     private void addRequestMessageEntry(final Object obj, final String title, final String
description, final Compatibility... incompatibleWith) {
-        addEntry("RequestMessage", obj, title, description, incompatibleWith);
-    }
-
-    private void addResponseMessageEntry(final Object obj, final String title, final String
description) {
-        addEntry("ResponseMessage", obj, title, description, GRAPHSON_ONLY);
+        addEntry("RequestMessage", obj, title, description,
+                createIncompatibilityMap("RequestMessage is not testable prior to Gryo 3.0
as serialization was handled by an intermediate component (MessageSerializer) that doesn't
fit the test model.",
+                        GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_2_4, GryoCompatibility.V1D0_3_3_0),
+                incompatibleWith);
     }
 
     private void addResponseMessageEntry(final Object obj, final String title, final String
description, final Compatibility... incompatibleWith) {
-        addEntry("ResponseMessage", obj, title, description, incompatibleWith);
+        addEntry("ResponseMessage", obj, title, description,
+                createIncompatibilityMap("ResponseMessage is not testable prior to Gryo 3.0
as serialization was handled by an intermediate component (MessageSerializer) that doesn't
fit the test model.",
+                        GryoCompatibility.V1D0_3_2_3, GryoCompatibility.V1D0_3_2_4, GryoCompatibility.V1D0_3_3_0),
+                incompatibleWith);
     }
 
     private void addExtendedEntry(final Object obj, final String title) {
@@ -417,6 +407,12 @@ public class Model {
         entries.get(group).add(new Entry(title, obj, description, compatibleWith, maker,
incompatibilityNotes));
     }
 
+    private Map<Compatibility, String> createIncompatibilityMap(final String msg, final
Compatibility... incompatibilities) {
+        final Map<Compatibility, String> m = new HashMap<>();
+        Arrays.asList(incompatibilities).forEach(c -> m.put(c, msg));
+        return m;
+    }
+
     public void saveAsCsv(final String file) throws Exception {
         final File f = new File(file);
         f.getParentFile().mkdirs();


Mime
View raw message