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/06 14:25:19 UTC

[3/3] tinkerpop git commit: TINKERPOP-1608 Update docs and changelog with GraphML XSTL

TINKERPOP-1608 Update docs and changelog with GraphML XSTL


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

Branch: refs/heads/TINKERPOP-1608
Commit: 609e96b2799162f1d5409d26446efcda650f0c14
Parents: 22bcad5
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Apr 6 10:24:48 2017 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Apr 6 10:24:48 2017 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                              |  1 +
 docs/src/reference/the-graph.asciidoc           | 26 ++++++++++++++++++++
 .../upgrade/release-3.1.x-incubating.asciidoc   | 16 ++++++++++--
 3 files changed, 41 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/609e96b2/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 3ac081b..1cf3fd3 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.7 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Added XSLT transform option to convert TinkerPop 2.x GraphML to 3.x GraphML.
 * Bumped to Jackson 2.8.7.
 * Fixed `EventStrategy` so that newly added properties trigger events with the name of the key that was added.
 * Drop use of jitpack for the jbcrypt artifact - using the official one in Maven Central.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/609e96b2/docs/src/reference/the-graph.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/the-graph.asciidoc b/docs/src/reference/the-graph.asciidoc
index e51c309..26ed778 100644
--- a/docs/src/reference/the-graph.asciidoc
+++ b/docs/src/reference/the-graph.asciidoc
@@ -444,6 +444,32 @@ try (final InputStream stream = new FileInputStream("tinkerpop-modern.xml")) {
 }
 ----
 
+GraphML was a supported format in TinkerPop 2.x, but there were several issues that made it inconsistent with the
+specification that were corrected for 3.x. As a result, attempting to read a GraphML file generated by 2.x with the
+3.x `GraphMLReader` will result in error. To help with this problem, an XSLT file is provided as a resource in
+`gremlin-core` which will transform 2.x GraphML to 3.x GraphML. It can be used as follows:
+
+[source,java]
+----
+import javax.xml.parsers.DocumentBuilderFactory
+import javax.xml.transform.TransformerFactory
+import javax.xml.transform.dom.DOMSource
+import javax.xml.transform.stream.StreamSource
+import javax.xml.transform.stream.StreamResult
+
+InputStream stylesheet = Thread.currentThread().getContextClassLoader().getResourceAsStream("tp2-to-tp3-graphml.xslt");
+File datafile = new File('/tmp/tp2-graphml.xml')
+File outfile = new File('/tmp/tp3-graphml.xml')
+
+TransformerFactory tFactory = TransformerFactory.newInstance()
+StreamSource stylesource = new StreamSource(stylesheet)
+Transformer transformer = tFactory.newTransformer(stylesource)
+
+StreamSource source = new StreamSource(datafile)
+StreamResult result = new StreamResult(new FileWriter(outfile))
+transformer.transform(source, result)
+----
+
 [[graphson-reader-writer]]
 GraphSON Reader/Writer
 ~~~~~~~~~~~~~~~~~~~~~~

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/609e96b2/docs/src/upgrade/release-3.1.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.1.x-incubating.asciidoc b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
index 05c34c2..2768048 100644
--- a/docs/src/upgrade/release-3.1.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.1.x-incubating.asciidoc
@@ -25,10 +25,23 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.7
 ---------------
 
-*Release Date: TBD*
+*Release Date: NOT OFFICIALLY RELEASED YET*
 
 Please see the link:https://github.com/apache/tinkerpop/blob/3.1.6/CHANGELOG.asciidoc#tinkerpop-xyz-release-date-MM-DD-YYYY[changelog] for a complete list of all the modifications that are part of this release.
 
+Upgrading for Users
+~~~~~~~~~~~~~~~~~~~
+
+GraphML XSLT
+^^^^^^^^^^^^
+
+There were some inconsistencies in the GraphML format supported in TinkerPop 2.x. These issues were corrected on the
+initial release of TinkerPop 3.0.0, but as a result, attempting to read GraphML from 2.x will end with an error. A
+newly added XSLT file in `gremlin-core`, called `tp2-to-tp3-graphml.xslt`, transforms 2.x GraphML into 3.x GraphML,
+making it possible easily read in legacy GraphML through a 3.x `GraphMLReader`.
+
+See: https://issues.apache.org/jira/browse/TINKERPOP-1608[TINKERPOP-1608]
+
 TinkerPop 3.1.6
 ---------------
 
@@ -53,7 +66,6 @@ to proceed only when the server was fully complete with its work.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1544[TINKERPOP-1544]
 
-
 TinkerPop 3.1.5
 ---------------