You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2017/04/11 11:52:43 UTC

[7/7] tinkerpop git commit: Merge branch 'tp31' into tp32

Merge branch 'tp31' into tp32

Conflicts:
	gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java


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

Branch: refs/heads/tp32
Commit: e6826508d559b5a2d34eea834f077a8dde3b878d
Parents: 2436a69 d4f4108
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Apr 11 07:28:26 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Apr 11 07:28:26 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/the-graph.asciidoc           | 28 +++++++++-
 .../upgrade/release-3.1.x-incubating.asciidoc   | 16 +++++-
 .../src/main/resources/tp2-to-tp3-graphml.xslt  | 59 ++++++++++++++++++++
 .../tinkerpop/gremlin/structure/io/IoTest.java  | 27 +++++++++
 .../io/graphml/tinkerpop-classic-tp2.xml        | 54 ++++++++++++++++++
 6 files changed, 182 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e6826508/CHANGELOG.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e6826508/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e6826508/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --cc gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
index a523b15,9246aa7..6a1d965
--- 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
@@@ -310,16 -290,29 +313,40 @@@ public class IoTest 
              assertEquals(IteratorUtils.count(source.edges()), IteratorUtils.count(target.edges()));
          }
  
+         @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 shouldTransformGraphMLV2ToV3ViaXSLT() throws Exception {
+             final InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
+             final InputStream datafile = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "tinkerpop-classic-tp2.xml");
+             final ByteArrayOutputStream output = new ByteArrayOutputStream();
+ 
+             final TransformerFactory tFactory = TransformerFactory.newInstance();
+             final StreamSource stylesource = new StreamSource(stylesheet);
+             final Transformer transformer = tFactory.newTransformer(stylesource);
+ 
+             final StreamSource source = new StreamSource(datafile);
+             final StreamResult result = new StreamResult(output);
+             transformer.transform(source, result);
+ 
+             final GraphReader reader = GraphMLReader.build().create();
+             reader.readGraph(new ByteArrayInputStream(output.toByteArray()), graph);
+             assertClassicGraph(graph, false, true);
+         }
++
 +        private boolean isGraphMLXSDPresent() {
 +            // when the graphml website goes down then tests won't pass - this allows the tests that rely on this
 +            // resource to conditionally run
 +            try {
 +                new URL("http://graphml.graphdrawing.org/xmlns/1.1/graphml-structure.xsd").openConnection().connect();
 +                return true;
 +            } catch (Exception ex) {
 +                return false;
 +            }
 +        }
      }
  
      public static final class GryoTest extends AbstractGremlinTest {