You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adding custom properties to edge or node in yED changes .graphml key id for description #128
Within the class YEdContextFactory the methods addVertices and addEdges retrieve the description by calling getStringValue on the DataType with data.getKey().equals("d5") and data.getKey().equals("d9") respectively.
However, if a custom node or edge property is added to the graph in yED the key ids will no longer be "d5" or "d9".
document.getGraphml().getKeyArray()
String key =data.getKey();
Lookup key
make sure !isSetYfilesType
get the attrib.name and default if it exists
then vertex.setProperty =(attr.name,value or default)
but am trying to figure out how to be fast :)
then same for edges.
I figure then any custom attribute can be used and will be part of json
If you can help me just get for-"node" attributes I would feel more comfortable knowing that all keys would have a hit. Sample below will include for=edge also.
I hate lookups when I know there are items I am not interested in.
Looks good. Regards to your question.
What about starting with adding a couple of unit tests. Also add a couple of yEd graphml files with single and multiple custom properties for vertices and edges.
Do that in the graphwalker-io module.
You could add the tests into org.graphwalker.io.factory.yed.YEdContextFactoryTest class.
Add the graphml files into ./graphwalker-io/src/test/resources/graphml folder
Activity
KristianKarl-zz commentedon Mar 5, 2017
Yeah, that's a problem with yWorks graphml file format.
DarrenHowatt commentedon Mar 6, 2017
Would you mind if I tried to implement a fix?
KristianKarl-zz commentedon Mar 7, 2017
That would be great. Give it a shot!
What would your solution look like? On a higher level.
DarrenHowatt commentedon Mar 7, 2017
By high level i hope this isn't too high :)
document.getGraphml().getKeyArray()
String key =data.getKey();
Lookup key
make sure !isSetYfilesType
get the attrib.name and default if it exists
then vertex.setProperty =(attr.name,value or default)
but am trying to figure out how to be fast :)
then same for edges.
I figure then any custom attribute can be used and will be part of json
thoughts?
DarrenHowatt commentedon Mar 7, 2017
If you can help me just get for-"node" attributes I would feel more comfortable knowing that all keys would have a hit. Sample below will include for=edge also.
I hate lookups when I know there are items I am not interested in.
document.selectPath(NAMESPACE + "$this/xq:graphml/xq:key");
I have tried multiple variations of:
document.selectPath(NAMESPACE + "$this/xq:graphml/xq:key[@for=node]");
with no luck
KristianKarl-zz commentedon Mar 7, 2017
Looks good. Regards to your question.
What about starting with adding a couple of unit tests. Also add a couple of yEd graphml files with single and multiple custom properties for vertices and edges.
Do that in the graphwalker-io module.
You could add the tests into
org.graphwalker.io.factory.yed.YEdContextFactoryTestclass.Add the graphml files into
./graphwalker-io/src/test/resources/graphmlfolder