Module: Muml_Model
- Defined in:
- lib/ontomde-uml2/select.rb
Instance Method Summary collapse
-
#uml_Class_all(ret = Set.new) ⇒ Object
search and returns every uml class contained in the current model.
-
#uml_Component_all(ret = Array.new) ⇒ Object
search and returns every uml component contained in the current model.
-
#uml_Enumeration_all(ret = Array.new) ⇒ Object
search and returns every uml use case contained in the current model.
-
#uml_UseCase_all(ret = Array.new) ⇒ Object
search and returns every uml use case contained in the current model.
Instance Method Details
#uml_Class_all(ret = Set.new) ⇒ Object
search and returns every uml class contained in the current model. NOTE: inner classes are not included
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ontomde-uml2/select.rb', line 47 def uml_Class_all(ret=Set.new) uml_ownedMember.each { |n| if n.kind_of?(Muml_Enumeration)||n.kind_of?(Muml_Interface) || (n.kind_of?(Muml_Class) && n.umlx_isReallyAClass?) ret << n elsif n.kind_of?(Muml_Package) && !n.kind_of?(Muml_Profile) n.uml_Class_all(ret) else #log.debug { "uml_Class_all ignored #{n.class.name} #{n}" } end } return ret end |
#uml_Component_all(ret = Array.new) ⇒ Object
search and returns every uml component contained in the current model.
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/ontomde-uml2/select.rb', line 87 def uml_Component_all(ret=Array.new) uml_ownedMember.each { |n| if n.kind_of?(Muml_Component) ret << n elsif n.kind_of?(Muml_Package) && !n.kind_of?(Muml_Profile) n.uml_Component_all(ret) else #log.debug { "ignored #{n}" } end } return ret end |
#uml_Enumeration_all(ret = Array.new) ⇒ Object
search and returns every uml use case contained in the current model.
74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/ontomde-uml2/select.rb', line 74 def uml_Enumeration_all(ret=Array.new) uml_ownedMember.each { |n| if n.kind_of?(Muml_Enumeration) ret << n elsif n.kind_of?(Muml_Package) && !n.kind_of?(Muml_Profile) n.uml_Enumeration_all(ret) else #log.debug { "ignored #{n}" } end } return ret end |
#uml_UseCase_all(ret = Array.new) ⇒ Object
search and returns every uml use case contained in the current model.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/ontomde-uml2/select.rb', line 60 def uml_UseCase_all(ret=Array.new) uml_ownedMember.each { |n| if n.kind_of?(Muml_UseCase) ret << n elsif n.kind_of?(Muml_Package) && !n.kind_of?(Muml_Profile) n.uml_UseCase_all(ret) else #log.debug { "ignored #{n}" } end } return ret end |