Class: Archimate::DataModel::Organization

Inherits:
ArchimateNode
  • Object
show all
Defined in:
lib/archimate/data_model/organization.rb

Overview

An organization element represents a structural node in a particular organization of the model concepts. An organization element may be a parent or sibling of other organization elements, each one representing a unique structural node.

An organization element may reference an ArchiMate element, ArchiMate relationship, or nothing (in which case it is a structural container)

An organization has no meaning unless it has at least child organization element.

Note that Organization must fit into a tree structure (so strictly nested).

Instance Attribute Summary

Attributes inherited from ArchimateNode

#parent_attribute_name, #struct_instance_variables

Instance Method Summary collapse

Methods inherited from ArchimateNode

#ancestors, #build_index, #clone, #compact!, #delete, #diff, #dup, #element_by_id, #id, #in_model, #in_model=, #initialize, #parent, #parent=, #path, #primitive?, #set, #with

Constructor Details

This class inherits a constructor from Archimate::DataModel::ArchimateNode

Instance Method Details

#referenced_identified_nodesObject



28
29
30
31
32
# File 'lib/archimate/data_model/organization.rb', line 28

def referenced_identified_nodes
  organizations.reduce(items) do |a, e|
    a.concat(e.referenced_identified_nodes)
  end
end

#remove(id) ⇒ Object



34
35
36
# File 'lib/archimate/data_model/organization.rb', line 34

def remove(id)
  items.delete(id)
end

#to_sObject

attribute :other_elements, Strict::Array.member(AnyElement).default([]) attribute :other_attributes, Strict::Array.member(AnyAttribute).default([])



24
25
26
# File 'lib/archimate/data_model/organization.rb', line 24

def to_s
  "#{Archimate::Color.data_model('Organization')}<#{id}>[#{Archimate::Color.color(name, [:white, :underline])}]"
end