Class: Archimate::FileFormats::Sax::Archi::Model
Instance Attribute Summary collapse
Attributes inherited from Handler
#attrs, #element_type, #name, #parent_handler
Instance Method Summary
collapse
-
#complete ⇒ Object
-
#initialize(name, attrs, parent_handler) ⇒ Model
constructor
-
#on_diagram(diagram, _source) ⇒ Object
-
#on_element(element, _source) ⇒ Object
-
#on_future(future, _source) ⇒ Object
-
#on_organization(organization, _source) ⇒ Object
-
#on_property_definition(property_definition, _source) ⇒ Object
-
#on_referenceable(referenceable, _source) ⇒ Object
-
#on_relationship(relationship, _source) ⇒ Object
-
#on_viewpoint(viewpoint, _source) ⇒ Object
#on_property, #properties
#documentation, #on_preserved_lang_string
Methods inherited from Handler
#characters, #diagram, #event, #method_missing, #process_text, #respond_to_missing?
Constructor Details
#initialize(name, attrs, parent_handler) ⇒ Model
Returns a new instance of Model.
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 13
def initialize(name, attrs, parent_handler)
super
@property_definitions = {}
@elements = []
@organizations = []
@relationships = []
@diagrams = []
@viewpoints = []
@futures = []
@index = {}
@model = nil
end
|
Instance Attribute Details
#property_definitions ⇒ Object
Returns the value of attribute property_definitions.
11
12
13
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 11
def property_definitions
@property_definitions
end
|
Instance Method Details
#complete ⇒ Object
26
27
28
29
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 26
def complete
process_futures
[event(:on_model, model)]
end
|
#on_diagram(diagram, _source) ⇒ Object
46
47
48
49
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 46
def on_diagram(diagram, _source)
@diagrams << diagram
false
end
|
#on_element(element, _source) ⇒ Object
31
32
33
34
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 31
def on_element(element, _source)
@elements << element
false
end
|
#on_future(future, _source) ⇒ Object
61
62
63
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 61
def on_future(future, _source)
@futures << future
end
|
#on_organization(organization, _source) ⇒ Object
36
37
38
39
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 36
def on_organization(organization, _source)
@organizations << organization
false
end
|
#on_property_definition(property_definition, _source) ⇒ Object
56
57
58
59
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 56
def on_property_definition(property_definition, _source)
@property_definitions[property_definition.id] = property_definition
false
end
|
#on_referenceable(referenceable, _source) ⇒ Object
65
66
67
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 65
def on_referenceable(referenceable, _source)
@index[referenceable.id] = referenceable
end
|
#on_relationship(relationship, _source) ⇒ Object
41
42
43
44
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 41
def on_relationship(relationship, _source)
@relationships << relationship
false
end
|
#on_viewpoint(viewpoint, _source) ⇒ Object
51
52
53
54
|
# File 'lib/archimate/file_formats/sax/archi/model.rb', line 51
def on_viewpoint(viewpoint, _source)
@viewpoints << viewpoint
false
end
|