Revize 54e9f5b9
Přidáno uživatelem Vít Mazín před téměř 6 roky(ů)
sources/imiger-dot-converter/src/main/java/cz/zcu/kiv/imiger/plugin/dot/loader/PaypalDOTLoader.java | ||
---|---|---|
94 | 94 |
|
95 | 95 |
if(!node.getAttributes().entrySet().isEmpty()) { |
96 | 96 |
for (Map.Entry<String, Object> entry : node.getAttributes().entrySet()) { |
97 |
attrs.put(entry.getKey(), entry.getValue().toString()); |
|
98 |
attributeNames.add(entry.getKey()); |
|
97 |
String key = entry.getKey().replaceAll("\\\\n|\\\\l", ""); |
|
98 |
String value = entry.getValue().toString().replaceAll("\\\\n|\\\\l", ""); |
|
99 |
attrs.put(key, value); |
|
100 |
attributeNames.add(key); |
|
99 | 101 |
} |
100 | 102 |
} |
101 | 103 |
|
102 |
VertexDTO vertex = new VertexDTO(node.getId(), id++, attrs); |
|
104 |
VertexDTO vertex = new VertexDTO(node.getId().replaceAll("\\\\n|\\\\l", ""), id++, attrs);
|
|
103 | 105 |
this.remappedVertices.put(node, vertex.getId()); |
104 | 106 |
|
105 | 107 |
vertices.add(vertex); |
... | ... | |
118 | 120 |
|
119 | 121 |
if(!edge.getAttributes().entrySet().isEmpty()) { |
120 | 122 |
for (Map.Entry<String, Object> entry : edge.getAttributes().entrySet()) { |
121 |
attrs.put(entry.getKey(), entry.getValue().toString()); |
|
122 |
attributeNames.add(entry.getKey()); |
|
123 |
String key = entry.getKey().replaceAll("\\\\n|\\\\l", ""); |
|
124 |
String value = entry.getValue().toString().replaceAll("\\\\n|\\\\l", ""); |
|
125 |
attrs.put(key, value); |
|
126 |
attributeNames.add(key); |
|
123 | 127 |
} |
124 | 128 |
} |
125 | 129 |
|
126 | 130 |
int from = remappedVertices.get(edge.getNode1()); |
127 | 131 |
int to = remappedVertices.get(edge.getNode2()); |
128 |
EdgeDTO edgeDTO = new EdgeDTO(edge.getId(), from, to, id++, attrs); |
|
132 |
EdgeDTO edgeDTO = new EdgeDTO(edge.getId().replaceAll("\\\\n|\\\\l", ""), from, to, id++, attrs);
|
|
129 | 133 |
|
130 | 134 |
edges.add(edgeDTO); |
131 | 135 |
} |
Také k dispozici: Unified diff
Deleting chars from vertex and edge name and attributes