{"issue":{"user":{"id":136681,"login":"EddyR","url":"https://api.github.com/users/EddyR","avatar_url":"https://secure.gravatar.com/avatar/1f30ccbc62a2318487c6f3f0eae827eb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1f30ccbc62a2318487c6f3f0eae827eb"},"title":"Feature Request: return vertex ID on loadGraphML()","milestone":null,"created_at":"2011-12-15T06:17:00Z","updated_at":"2011-12-15T23:52:07Z","labels":[],"state":"open","id":2563485,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/tinkerpop/gremlin/issues/268","closed_at":null,"body":"1 of 2 major issues I have before my little project can continue.\r\n\r\nWhen loading a GraphML file into a pre-existing graph (I use Neo4j for example) it basically gets dumped on it's own as a separate sub-graph with no way to add an edge to it on import.\r\n\r\nSay for example I want to give other users the ability to load their own GraphML files. My application can ask for the file and load it but unless the user also specified a vertex property or some other way of identifying the loaded graph then there is no other way to create a edge to place it in the correct location in my \"main\" graph. Worse, that none of these methods for identifying a vertex in the loaded GraphML file will be unique. A unique ID is required.\r\n\r\n\r\nWhat I'm proposing is:\r\n\r\nA) Allow a extra field in loadGraphML() for nominating a unique vertex ID provided by the GraphML file. This should then return the new ID generated for that vertex to allow an edge to be created. \r\n\r\nFor example: addEdge(g.loadGraphML('path/to/graphml.xml', <gml-id>), g.v(1).out.filter(it.getProperty('label')=='BIN'), 'ATTACH')\r\n\r\n\r\nB) Same as A) except the ID is specified with in the GraphML file itself. This might even be more flexible. For example you could specify more than 1 ID, etc. I don't know the structure it would take but something like: <attach id=1 name=\"tip\"/>\r\n\r\n\r\nC) Something similar or the same as loadGraphML().next() for finding the first loaded GraphML node. I must stress - and despite the conversations I've had on the Gremlin mailing list - I actually find this method extremely useful for structured data. This way the user doesn't have to specify a unique ID anywhere. In my mind this is far more important and useful than the first 2 options.\r\n\r\nThanks\r\nEddy","number":268,"url":"https://api.github.com/repos/tinkerpop/gremlin/issues/268","comments":1,"assignee":null},"comment":{"user":{"id":1114079,"login":"i000","url":"https://api.github.com/users/i000","avatar_url":"https://secure.gravatar.com/avatar/37c2f139156f76bf7d50bd01b559a1f0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"37c2f139156f76bf7d50bd01b559a1f0"},"created_at":"2011-12-15T23:52:07Z","updated_at":"2011-12-15T23:52:07Z","id":3171195,"body":"Could you customize `loadGraphML` to inject a unique node into the user-provided graph?","url":"https://api.github.com/repos/tinkerpop/gremlin/issues/comments/3171195"},"action":"created"}