You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/04/06 14:43:41 UTC

[jira] [Commented] (TINKERPOP-1608) TP2-to-TP3 GraphML XSLT

    [ https://issues.apache.org/jira/browse/TINKERPOP-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15959023#comment-15959023 ] 

ASF GitHub Bot commented on TINKERPOP-1608:
-------------------------------------------

GitHub user spmallette opened a pull request:

    https://github.com/apache/tinkerpop/pull/595

    TINKERPOP-1608 XSLT for converting GraphSON

    https://issues.apache.org/jira/browse/TINKERPOP-1608
    
    Finished up the PR originally started on #501 - this basically just takes the work @joshsh started over there, adds a test and documentation. 
    
    Builds well with `mvn clean install -DincludeNeo4j`
    
    VOTE +1

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/tinkerpop TINKERPOP-1608

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tinkerpop/pull/595.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #595
    
----
commit cfef83624caa50af5b520738d3a817bda433628a
Author: Joshua Shinavier <jo...@fortytwo.net>
Date:   2016-11-18T20:08:00Z

    Added TP2-to-TP3 GraphML XSLT to resources

commit 22bcad585e2df84f6521296c41b6173563c56d15
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-04-06T13:41:29Z

    TINKERPOP-1608 Added test for GraphML transform

commit 609e96b2799162f1d5409d26446efcda650f0c14
Author: Stephen Mallette <sp...@genoprime.com>
Date:   2017-04-06T14:24:48Z

    TINKERPOP-1608 Update docs and changelog with GraphML XSTL

----


> TP2-to-TP3 GraphML XSLT
> -----------------------
>
>                 Key: TINKERPOP-1608
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1608
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 3.1.5, 3.2.3
>            Reporter: Jason Plurad
>
> There were some changes in the GraphML format between TinkerPop 2 and TinkerPop 3. [~joshsh] has [started work|https://github.com/apache/tinkerpop/pull/501] on an XSLT to transform between the two formats.
> I performed an initial test of the transform using this code within the Gremlin Console.
> {noformat}
> 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
> stylesheet = new File('/tmp/tp-graphml-convert.xslt')
> datafile = new File('/tmp/tp2-graphml.xml')
> outfile = new File('/tmp/tp3-graphml.xml')
> tFactory = TransformerFactory.newInstance()
> stylesource = new StreamSource(stylesheet)
> transformer = tFactory.newTransformer(stylesource)
> source = new StreamSource(datafile)
> result = new StreamResult(new FileWriter(outfile))
> transformer.transform(source, result)
> {noformat}
> Example TinkerPop 2 GraphML: https://github.com/tinkerpop/gremlin/blob/master/data/graph-example-1.xml
> Example TinkerPop 3 GraphML: https://github.com/apache/tinkerpop/blob/3.1.5/data/tinkerpop-classic.xml



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)