Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1608

TP2-to-TP3 GraphML XSLT

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: 3.1.5, 3.2.3
    • Fix Version/s: 3.1.7
    • Component/s: io
    • Labels:
      None

      Description

      There were some changes in the GraphML format between TinkerPop 2 and TinkerPop 3. Joshua Shinavier has started work on an XSLT to transform between the two formats.

      I performed an initial test of the transform using this code within the Gremlin Console.

      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)
      

      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

        Attachments

          Activity

            People

            • Assignee:
              spmallette stephen mallette
              Reporter:
              pluradj Jason Plurad
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: