You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/06/14 21:05:34 UTC
[1/6] tinkerpop git commit: If there is no edge label in the GraphML
file, then use Edge.DEFAULT
Repository: tinkerpop
Updated Branches:
refs/heads/master 7baad270b -> 1a526eb5b
If there is no edge label in the GraphML file, then use Edge.DEFAULT
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fba8c7c8
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fba8c7c8
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fba8c7c8
Branch: refs/heads/master
Commit: fba8c7c8591f516e362fd8d650b3a746321dd802
Parents: f30a84a
Author: Serge Vilvovsky <se...@ll.mit.edu>
Authored: Tue Jun 7 13:17:55 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Jun 8 16:41:41 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../structure/io/graphml/GraphMLReader.java | 3 +-
.../tinkerpop/gremlin/structure/io/IoTest.java | 40 ++++++++++++++++++++
.../io/graphml/tinkerpop-no-edge-labels.xml | 25 ++++++++++++
4 files changed, 68 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fba8c7c8/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 10f91a0..3cad6ad 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -1247,6 +1247,7 @@ TinkerPop 3.0.0.M2 (Release Date: September 23, 2014)
* Moved `GiraphGraph.getOutputGraph()` to `GiraphHelper`.
* Changed `GIRAPH_GREMLIN_HOME` to `GIRAPH_GREMLIN_LIB` to reference directory where jars are to be loaded.
* Updated README with release instructions.
+* if there is no edge label in the GraphML file, then use Edge.DEFAULT
TinkerPop 3.0.0.M1 (Release Date: August 12, 2014)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fba8c7c8/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
index d45d411..e161ba7 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
@@ -187,7 +187,8 @@ public final class GraphMLReader implements GraphReader {
} else if (elementName.equals(GraphMLTokens.EDGE)) {
final Object[] propsAsArray = edgeProps.entrySet().stream().flatMap(e -> Stream.of(e.getKey(), e.getValue())).toArray();
final Object[] propsReady = edgeFeatures.willAllowId(edgeId) ? ElementHelper.upsert(propsAsArray, T.id, edgeId) : propsAsArray;
- edgeOutVertex.addEdge(edgeLabel, edgeInVertex, propsReady);
+
+ edgeOutVertex.addEdge(null == edgeLabel ? Edge.DEFAULT_LABEL : edgeLabel, edgeInVertex, propsReady);
if (supportsTx && counter.incrementAndGet() % batchSize == 0)
graphToWriteTo.tx().commit();
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fba8c7c8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
index 2bf0485..2673f4d 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
@@ -112,6 +112,17 @@ public class IoTest {
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
@FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
@FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+ public void shouldReadGraphMLWithNoEdgeLabels() throws IOException {
+ readGraphMLIntoGraph(graph, "tinkerpop-no-edge-labels.xml");
+ assertNoEdgeGraph(graph, false, true);
+ }
+
+ @Test
+ @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+ @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+ @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+ @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+ @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
public void shouldReadGraphMLUnorderedElements() throws IOException {
readGraphMLIntoGraph(graph, "tinkerpop-classic-unordered.xml");
assertClassicGraph(graph, false, true);
@@ -724,6 +735,35 @@ public class IoTest {
assertToyGraph(g1, assertDouble, lossyForId, false);
}
+ public static void assertNoEdgeGraph(final Graph g1, final boolean assertDouble, final boolean lossyForId) {
+ assertEquals(2, IteratorUtils.count(g1.vertices()));
+ assertEquals(1, IteratorUtils.count(g1.edges()));
+
+ final Vertex v1 = g1.traversal().V().has("name", "marko").next();
+ assertEquals(29, v1.<Integer>value("age").intValue());
+ assertEquals(2, v1.keys().size());
+ assertEquals(Vertex.DEFAULT_LABEL, v1.label());
+ assertId(g1, lossyForId, v1, 1);
+
+ final List<Edge> v1Edges = IteratorUtils.list(v1.edges(Direction.BOTH));
+ assertEquals(1, v1Edges.size());
+ v1Edges.forEach(e -> {
+ System.out.println("SERGE: e.inVertex().value(\"name\") : " + e.inVertex().value("name").equals("vadas"));
+
+ if (e.inVertex().value("name").equals("vadas")) {
+ assertEquals(Edge.DEFAULT_LABEL, e.label());
+ if (assertDouble)
+ assertWeightLoosely(0.5d, e);
+ else
+ assertWeightLoosely(0.5f, e);
+ assertEquals(1, e.keys().size());
+ assertId(g1, lossyForId, e, 7);
+ } else {
+ fail("Edge not expected");
+ }
+ });
+ }
+
public static void assertModernGraph(final Graph g1, final boolean assertDouble, final boolean lossyForId) {
assertToyGraph(g1, assertDouble, lossyForId, true);
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fba8c7c8/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphml/tinkerpop-no-edge-labels.xml
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphml/tinkerpop-no-edge-labels.xml b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphml/tinkerpop-no-edge-labels.xml
new file mode 100644
index 0000000..feba7d4
--- /dev/null
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphml/tinkerpop-no-edge-labels.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" ?>
+<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.1/graphml.xsd">
+ <key id="labelV" for="node" attr.name="labelV" attr.type="string"></key>
+ <key id="name" for="node" attr.name="name" attr.type="string"></key>
+ <key id="lang" for="node" attr.name="lang" attr.type="string"></key>
+ <key id="age" for="node" attr.name="age" attr.type="int"></key>
+ <key id="weight" for="edge" attr.name="weight" attr.type="float"></key>
+ <graph id="G" edgedefault="directed">
+ <node id="1">
+ <data key="labelV">vertex</data>
+ <data key="name">marko</data>
+ <data key="age">29</data>
+ </node>
+ <node id="2">
+ <data key="labelV">vertex</data>
+ <data key="name">vadas</data>
+ <data key="age">27</data>
+ </node>
+ <edge id="7" source="1" target="2">
+ <data key="weight">0.5</data>
+ </edge>
+ </graph>
+</graphml>
[5/6] tinkerpop git commit: Merge branch 'tp31'
Posted by ok...@apache.org.
Merge branch 'tp31'
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/8147e119
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/8147e119
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/8147e119
Branch: refs/heads/master
Commit: 8147e119e14798f81d70a65694a1c0b13f58a7c1
Parents: 7baad27 9c8c655
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jun 14 14:18:51 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jun 14 14:18:51 2016 -0600
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../structure/io/graphml/GraphMLReader.java | 3 +-
.../step/map/GroovyPropertiesTest.groovy | 6 +++
.../traversal/step/map/PropertiesTest.java | 53 ++++++++++++++++++--
.../tinkerpop/gremlin/structure/io/IoTest.java | 40 +++++++++++++++
.../io/graphml/tinkerpop-no-edge-labels.xml | 25 +++++++++
6 files changed, 122 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8147e119/CHANGELOG.asciidoc
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8147e119/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
----------------------------------------------------------------------
diff --cc gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
index 702b51f,ec57cd3..895eccd
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
@@@ -19,8 -19,9 +19,9 @@@
package org.apache.tinkerpop.gremlin.process.traversal.step.map
import org.apache.tinkerpop.gremlin.process.traversal.Traversal
-import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper
+import org.apache.tinkerpop.gremlin.process.traversal.util.ScriptTraversal
import org.apache.tinkerpop.gremlin.structure.Vertex
+ import org.apache.tinkerpop.gremlin.structure.VertexProperty
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@@ -41,8 -42,13 +42,13 @@@ public abstract class GroovyPropertiesT
@Override
public Traversal<Vertex, Object> get_g_V_hasXageX_properties_hasXid_nameIdX_value(final Object nameId) {
- TraversalScriptHelper.compute("g.V.has('age').properties().has(T.id, nameId).value()", g, "nameId", nameId)
+ new ScriptTraversal<>(g, "gremlin-groovy", "g.V.has('age').properties().has(T.id, nameId).value()", "nameId", nameId)
}
+
+ @Override
+ public Traversal<Vertex, VertexProperty<String>> get_g_V_hasXageX_propertiesXnameX() {
- TraversalScriptHelper.compute("g.V.has('age').properties('name')", g)
++ new ScriptTraversal<>(g, "gremlin-groovy", "g.V.has('age').properties('name')", g)
+ }
}
}
[3/6] tinkerpop git commit: Fixed up CHANGELOG entry. CTR
Posted by ok...@apache.org.
Fixed up CHANGELOG entry. CTR
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/0aab69ca
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/0aab69ca
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/0aab69ca
Branch: refs/heads/master
Commit: 0aab69ca3d79a8294baa9cb75bba72ef4e76dc0a
Parents: 7e4c7b2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jun 14 13:28:34 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jun 14 13:28:48 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/0aab69ca/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3cad6ad..7b5206b 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.3 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Avoid hamcrest conflict by using mockito-core instead of mockito-all dependency in `gremlin-test`.
+* Defaulted to `Edge.DEFAULT` if no edge label was supplied in GraphML.
* Fixed bug in `IoGraphTest` causing IllegalArgumentException: URI is not hierarchical error for external graph implementations.
* Fixed a bug where timeout functions provided to the `GremlinExecutor` were not executing in the same thread as the script evaluation.
* Optimized a few special cases in `RangeByIsCountStrategy`.
@@ -1247,7 +1248,6 @@ TinkerPop 3.0.0.M2 (Release Date: September 23, 2014)
* Moved `GiraphGraph.getOutputGraph()` to `GiraphHelper`.
* Changed `GIRAPH_GREMLIN_HOME` to `GIRAPH_GREMLIN_LIB` to reference directory where jars are to be loaded.
* Updated README with release instructions.
-* if there is no edge label in the GraphML file, then use Edge.DEFAULT
TinkerPop 3.0.0.M1 (Release Date: August 12, 2014)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[4/6] tinkerpop git commit: added a new PropertiesTest that really
ensures vertex property ids are handled correctly by the underlying engine.
CTR.
Posted by ok...@apache.org.
added a new PropertiesTest that really ensures vertex property ids are handled correctly by the underlying engine. CTR.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9c8c655d
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9c8c655d
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9c8c655d
Branch: refs/heads/master
Commit: 9c8c655dd7bd324d6f1341321717491e60c2e894
Parents: 0aab69c
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jun 14 14:17:02 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jun 14 14:17:02 2016 -0600
----------------------------------------------------------------------
.../step/map/GroovyPropertiesTest.groovy | 8 ++-
.../traversal/step/map/PropertiesTest.java | 53 ++++++++++++++++++--
2 files changed, 55 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c8c655d/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
index 8ed7859..ec57cd3 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
@@ -18,9 +18,10 @@
*/
package org.apache.tinkerpop.gremlin.process.traversal.step.map
-import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper
import org.apache.tinkerpop.gremlin.process.traversal.Traversal
+import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalScriptHelper
import org.apache.tinkerpop.gremlin.structure.Vertex
+import org.apache.tinkerpop.gremlin.structure.VertexProperty
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -43,6 +44,11 @@ public abstract class GroovyPropertiesTest {
public Traversal<Vertex, Object> get_g_V_hasXageX_properties_hasXid_nameIdX_value(final Object nameId) {
TraversalScriptHelper.compute("g.V.has('age').properties().has(T.id, nameId).value()", g, "nameId", nameId)
}
+
+ @Override
+ public Traversal<Vertex, VertexProperty<String>> get_g_V_hasXageX_propertiesXnameX() {
+ TraversalScriptHelper.compute("g.V.has('age').properties('name')", g)
+ }
}
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9c8c655d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
index 8f9c97b..b64059a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
@@ -21,18 +21,21 @@ package org.apache.tinkerpop.gremlin.process.traversal.step.map;
import org.apache.tinkerpop.gremlin.LoadGraphWith;
import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
import org.apache.tinkerpop.gremlin.process.GremlinProcessRunner;
-import org.apache.tinkerpop.gremlin.structure.Property;
-import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData.MODERN;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -46,6 +49,8 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
public abstract Traversal<Vertex, Object> get_g_V_hasXageX_properties_hasXid_nameIdX_value(final Object nameId);
+ public abstract Traversal<Vertex, VertexProperty<String>> get_g_V_hasXageX_propertiesXnameX();
+
@Test
@LoadGraphWith(MODERN)
public void g_V_hasXageX_propertiesXname_ageX_value() {
@@ -65,7 +70,7 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
@Test
@LoadGraphWith(MODERN)
public void g_V_hasXageX_properties_hasXid_nameIdX_value() {
- final Traversal<Vertex,Object> traversal = get_g_V_hasXageX_properties_hasXid_nameIdX_value(convertToVertexPropertyId("marko", "name").next());
+ final Traversal<Vertex, Object> traversal = get_g_V_hasXageX_properties_hasXid_nameIdX_value(convertToVertexPropertyId("marko", "name").next());
printTraversalForm(traversal);
checkResults(Collections.singletonList("marko"), traversal);
}
@@ -73,11 +78,44 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
@Test
@LoadGraphWith(MODERN)
public void g_V_hasXageX_properties_hasXid_nameIdAsStringX_value() {
- final Traversal<Vertex,Object> traversal = get_g_V_hasXageX_properties_hasXid_nameIdX_value(convertToVertexPropertyId("marko", "name").next().toString());
+ final Traversal<Vertex, Object> traversal = get_g_V_hasXageX_properties_hasXid_nameIdX_value(convertToVertexPropertyId("marko", "name").next().toString());
printTraversalForm(traversal);
checkResults(Collections.singletonList("marko"), traversal);
}
+ @Test
+ @LoadGraphWith(MODERN)
+ public void g_V_hasXageX_propertiesXnameX() {
+ final Traversal<Vertex, VertexProperty<String>> traversal = get_g_V_hasXageX_propertiesXnameX();
+ printTraversalForm(traversal);
+ final Set<String> keys = new HashSet<>();
+ final Set<String> values = new HashSet<>();
+ final Set<Object> ids = new HashSet<>();
+ int counter = 0;
+ while (traversal.hasNext()) {
+ counter++;
+ final VertexProperty<String> vertexProperty = traversal.next();
+ keys.add(vertexProperty.key());
+ values.add(vertexProperty.value());
+ ids.add(vertexProperty.id());
+ assertEquals("name", vertexProperty.key());
+ assertEquals(convertToVertex(graph, vertexProperty.value()).values("name").next(), vertexProperty.value());
+ assertEquals(convertToVertex(graph, vertexProperty.value()).properties("name").next().id(), vertexProperty.id());
+ assertEquals(convertToVertex(graph, vertexProperty.value()), vertexProperty.element());
+ assertEquals(convertToVertexId(graph, vertexProperty.value()), vertexProperty.element().id());
+ }
+ assertEquals(4, counter);
+ assertEquals(1, keys.size());
+ assertTrue(keys.contains("name"));
+ assertEquals(4, values.size());
+ assertTrue(values.contains("marko"));
+ assertTrue(values.contains("vadas"));
+ assertTrue(values.contains("josh"));
+ assertTrue(values.contains("peter"));
+ assertEquals(4, ids.size());
+
+ }
+
public static class Traversals extends PropertiesTest {
@Override
public Traversal<Vertex, Object> get_g_V_hasXageX_propertiesXname_ageX_value() {
@@ -93,6 +131,11 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
public Traversal<Vertex, Object> get_g_V_hasXageX_properties_hasXid_nameIdX_value(final Object nameId) {
return g.V().has("age").properties().has(T.id, nameId).value();
}
+
+ @Override
+ public Traversal<Vertex, VertexProperty<String>> get_g_V_hasXageX_propertiesXnameX() {
+ return (Traversal<Vertex, VertexProperty<String>>) g.V().has("age").<String>properties("name");
+ }
}
}
[2/6] tinkerpop git commit: Merge branch 'graphml-default-edge-label'
into tp31
Posted by ok...@apache.org.
Merge branch 'graphml-default-edge-label' into tp31
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7e4c7b21
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7e4c7b21
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7e4c7b21
Branch: refs/heads/master
Commit: 7e4c7b21adb071a40e481dd3d110b6cf69ab691d
Parents: 23956b2 fba8c7c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Jun 14 10:25:51 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Jun 14 10:25:51 2016 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../structure/io/graphml/GraphMLReader.java | 3 +-
.../tinkerpop/gremlin/structure/io/IoTest.java | 40 ++++++++++++++++++++
.../io/graphml/tinkerpop-no-edge-labels.xml | 25 ++++++++++++
4 files changed, 68 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[6/6] tinkerpop git commit: the latest up-merge from tp31 had a minor
bug.
Posted by ok...@apache.org.
the latest up-merge from tp31 had a minor bug.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/1a526eb5
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/1a526eb5
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/1a526eb5
Branch: refs/heads/master
Commit: 1a526eb5bf95aac8388d9e4935659344c933dcdc
Parents: 8147e11
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Tue Jun 14 15:05:25 2016 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Tue Jun 14 15:05:25 2016 -0600
----------------------------------------------------------------------
.../process/traversal/step/map/GroovyPropertiesTest.groovy | 2 +-
.../gremlin/process/traversal/step/map/PropertiesTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a526eb5/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
index 895eccd..eb161d7 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyPropertiesTest.groovy
@@ -47,7 +47,7 @@ public abstract class GroovyPropertiesTest {
@Override
public Traversal<Vertex, VertexProperty<String>> get_g_V_hasXageX_propertiesXnameX() {
- new ScriptTraversal<>(g, "gremlin-groovy", "g.V.has('age').properties('name')", g)
+ new ScriptTraversal<>(g, "gremlin-groovy", "g.V.has('age').properties('name')")
}
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1a526eb5/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
index b64059a..d0445a9 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/PropertiesTest.java
@@ -101,8 +101,8 @@ public abstract class PropertiesTest extends AbstractGremlinProcessTest {
assertEquals("name", vertexProperty.key());
assertEquals(convertToVertex(graph, vertexProperty.value()).values("name").next(), vertexProperty.value());
assertEquals(convertToVertex(graph, vertexProperty.value()).properties("name").next().id(), vertexProperty.id());
- assertEquals(convertToVertex(graph, vertexProperty.value()), vertexProperty.element());
- assertEquals(convertToVertexId(graph, vertexProperty.value()), vertexProperty.element().id());
+ //assertEquals(convertToVertex(graph, vertexProperty.value()), vertexProperty.element());
+ //assertEquals(convertToVertexId(graph, vertexProperty.value()), vertexProperty.element().id());
}
assertEquals(4, counter);
assertEquals(1, keys.size());