Repository navigation
Expand file tree
/
Copy pathgexf.erb
More file actions
31 lines (31 loc) · 1.29 KB
/
Copy pathgexf.erb
File metadata and controls
31 lines (31 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gexf.net/1.2draft http://www.gexf.net/1.2draft/gexf.xsd" version="1.2">
<meta lastmodifieddate="2009-03-20">
<creator>intrigue.io</creator>
<description>generated graph</description>
</meta>
<graph defaultedgetype="undirected">
<attributes class="node">
<attribute id="0" title="name" type="string"/>
<attribute id="1" title="type" type="string"/>
</attributes>
<nodes>
<% @entity_pairs.each do |hash| %>
<node id="<%= hash[:entity].id %>" label="<%= hash[:entity].name %>">
<attvalues>
<attvalue for="0" value="<%= hash[:entity].name %>"/>
<attvalue for="1" value="<%= hash[:entity].type %>"/>
</attvalues>
</node>
<% end %>
</nodes>
<edges>
<% count=0 %>
<% @entity_pairs.each do |hash| %>
<edge id="<%="#{count}"%>" source="<%="#{hash[:task_result].base_entity.id}"%>" target="<%="#{hash[:entity].id}"%>" label="<%=hash[:task_result].name%>"/>
<% count+=1
end
%>
</edges>
</graph>
</gexf>