Class: Archimate::FileFormats::ModelExchangeFileReader30
Instance Method Summary
collapse
#identifier_to_id, #parse, #parse_bendpoints, #parse_bounds, #parse_color, #parse_connections, #parse_diagrams, #parse_documentation, #parse_elements, #parse_font, #parse_model, #parse_nodes, #parse_organizations, #parse_properties, #parse_property, #parse_property_defs, #parse_relationships, #parse_style
Instance Method Details
#connection_relationship_ref ⇒ Object
52
53
54
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 52
def connection_relationship_ref
"relationshipRef"
end
|
#diagrams_path ⇒ Object
40
41
42
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 40
def diagrams_path
">views>diagrams>view"
end
|
#identifier_ref_name ⇒ Object
36
37
38
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 36
def identifier_ref_name
"identifierRef"
end
|
#organizations_root_selector ⇒ Object
16
17
18
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 16
def organizations_root_selector
">organizations"
end
|
#parse_archimate_version(root) ⇒ Object
7
8
9
10
11
12
13
14
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 7
def parse_archimate_version(root)
case root.namespace.href
when "http://www.opengroup.org/xsd/archimate/3.0/"
:archimate_3_0
else
raise "Unexpected namespace version: #{root.namespace.href}"
end
end
|
#parse_element_name(el) ⇒ Object
32
33
34
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 32
def parse_element_name(el)
ModelExchangeFile::XmlLangString.parse(el.at_css(">name"))
end
|
#parse_viewpoints(model) ⇒ Object
<xs:complexType name=“ViewpointType”>
<xs:complexContent>
<xs:extension base="NamedReferenceableType">
<xs:sequence>
<xs:group ref="PropertiesGroup" />
<xs:element name="concern" type="ConcernType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="viewpointPurpose" type="ViewpointPurposeType" minOccurs="0" maxOccurs="1" />
<xs:element name="viewpointContent" type="ViewpointContentType" minOccurs="0" maxOccurs="1" />
<xs:element name="allowedElementType" type="AllowedElementTypeType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="allowedRelationshipType" type="AllowedRelationshipTypeType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="modelingNote" type="ModelingNoteType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 110
def parse_viewpoints(model)
[]
end
|
#property_def_attr_name ⇒ Object
24
25
26
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 24
def property_def_attr_name
"propertyDefinitionRef"
end
|
#property_def_name(node) ⇒ Object
28
29
30
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 28
def property_def_name(node)
ModelExchangeFile::XmlLangString.parse(node.at_css("name"))
end
|
#property_defs_selector ⇒ Object
20
21
22
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 20
def property_defs_selector
">propertyDefinitions>propertyDefinition"
end
|
#style_to_int(str) ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 56
def style_to_int(str)
case str
when nil
0
when "italic"
1
when "bold"
2
when "bold italic"
3
else
raise "Broken for value: #{str}"
end
end
|
#view_node_element_ref ⇒ Object
44
45
46
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 44
def view_node_element_ref
"elementRef"
end
|
#view_node_type_attr ⇒ Object
48
49
50
|
# File 'lib/archimate/file_formats/model_exchange_file_reader_30.rb', line 48
def view_node_type_attr
"xsi:type"
end
|