eec4341e50d67a74ef88c09944e94213303e5632
3 def initialize(link_element
= nil, vertices
= nil)
5 read(link_element
, vertices
) unless link_element
.nil?
9 def read(link_element
, vertices
)
10 self.id
= link_element
.attributes
["id"].to_i
11 self.mark
= link_element
.attributes
["mark"].to_f
12 self.name
= link_element
.elements
['moveableName'].attributes
['name']
13 puts
"vertices = #{vertices}"
14 box1
= vertices
.select
{|v
| v
.id
== link_element
.elements
['box1'].attributes
['id']}[0]
15 puts
"found box1: #{box1}"
16 box2
= vertices
.select
{|v
| v
.id
== link_element
.elements
['box2'].attributes
['id']}[0]
17 puts
"found box2: #{box2}"
19 c1
= self.connections
.find
{|c
| c
.end == box1
}
20 c1
.blob
= link_element
.elements
['box1EndAdornments'].attributes
['blob']
21 c1
.crowsfoot
= link_element
.elements
['box1EndAdornments'].attributes
['crowsfoot']
22 c2
= self.connections
.find
{|c
| c
.end == box2
}
23 c2
.blob
= link_element
.elements
['box2EndAdornments'].attributes
['blob']
24 c2
.crowsfoot
= link_element
.elements
['box2EndAdornments'].attributes
['crowsfoot']