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

GraphML serialization invalid if a vertex and edge have similar named property

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.4.0
    • Component/s: io
    • Labels:
      None
    • Flags:
      Patch

      Description

      I have created a graph using the Tinkerpop Graph and required for Gephi visualization a property called color on edges and vertices to be coloured.

      The current gremlin-core serialization creates the following two key elements in GraphML

      <key id="color" for="node" attr.name="color" attr.type="string"></key>
      <key id="color" for="edge" attr.name="color" attr.type="string"></key>

      the id attribute is an internal name, but have to be different.

      I would suggest a patch to check for an intersection of the edge & vertices keys and add for those keys an additional differentiating letter like:

      <key id="colorV" for="node" attr.name="color" attr.type="string"></key>
      <key id="colorE" for="edge" attr.name="color" attr.type="string"></key>

       

      Going to provide a pullrequest on GitHub.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spmallette Stephen Mallette
                Reporter:
                svanteschubert Svante Schubert
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: