Module: Archimate

Defined in:
lib/archimate/maybe_io.rb,
lib/archimate.rb,
lib/archimate/color.rb,
lib/archimate/config.rb,
lib/archimate/logging.rb,
lib/archimate/version.rb,
lib/archimate/cli/lint.rb,
lib/archimate/svg/path.rb,
lib/archimate/cli/archi.rb,
lib/archimate/cli/duper.rb,
lib/archimate/cli/stats.rb,
lib/archimate/cli/svger.rb,
lib/archimate/svg/point.rb,
lib/archimate/cli/mapper.rb,
lib/archimate/data_model.rb,
lib/archimate/svg/entity.rb,
lib/archimate/svg/legend.rb,
lib/archimate/cli/cleanup.rb,
lib/archimate/cli/convert.rb,
lib/archimate/file_format.rb,
lib/archimate/lint/linter.rb,
lib/archimate/svg/diagram.rb,
lib/archimate/svg/extents.rb,
lib/archimate/svg/segment.rb,
lib/archimate/export/jsonl.rb,
lib/archimate/export/cypher.rb,
lib/archimate/svg/css_style.rb,
lib/archimate/svg/view_node.rb,
lib/archimate/export/n_quads.rb,
lib/archimate/svg/connection.rb,
lib/archimate/svg/entity/gap.rb,
lib/archimate/data_model/font.rb,
lib/archimate/export/graph_ml.rb,
lib/archimate/svg/entity/goal.rb,
lib/archimate/svg/entity/node.rb,
lib/archimate/svg/entity/note.rb,
lib/archimate/svg/entity/path.rb,
lib/archimate/svg/entity/rect.rb,
lib/archimate/core_refinements.rb,
lib/archimate/data_model/color.rb,
lib/archimate/data_model/layer.rb,
lib/archimate/data_model/model.rb,
lib/archimate/data_model/style.rb,
lib/archimate/file_formats/sax.rb,
lib/archimate/svg/entity/group.rb,
lib/archimate/svg/entity/value.rb,
lib/archimate/svg/svg_template.rb,
lib/archimate/data_model/bounds.rb,
lib/archimate/data_model/layers.rb,
lib/archimate/derived_relations.rb,
lib/archimate/export/csv_export.rb,
lib/archimate/svg/entity/device.rb,
lib/archimate/svg/entity/driver.rb,
lib/archimate/data_model/concern.rb,
lib/archimate/data_model/diagram.rb,
lib/archimate/data_model/element.rb,
lib/archimate/progress_indicator.rb,
lib/archimate/svg/entity/meaning.rb,
lib/archimate/svg/entity/network.rb,
lib/archimate/svg/entity/outcome.rb,
lib/archimate/svg/entity/plateau.rb,
lib/archimate/svg/entity/product.rb,
lib/archimate/svg/entity_factory.rb,
lib/archimate/data_model/elements.rb,
lib/archimate/data_model/location.rb,
lib/archimate/data_model/metadata.rb,
lib/archimate/data_model/property.rb,
lib/archimate/svg/entity/artifact.rb,
lib/archimate/svg/entity/contract.rb,
lib/archimate/svg/entity/facility.rb,
lib/archimate/svg/entity/grouping.rb,
lib/archimate/svg/entity/location.rb,
lib/archimate/svg/entity/material.rb,
lib/archimate/svg/entity/resource.rb,
lib/archimate/data_model/view_node.rb,
lib/archimate/data_model/viewpoint.rb,
lib/archimate/svg/entity/equipment.rb,
lib/archimate/svg/entity/principle.rb,
lib/archimate/data_model/comparison.rb,
lib/archimate/data_model/connection.rb,
lib/archimate/data_model/viewpoints.rb,
lib/archimate/svg/entity/assessment.rb,
lib/archimate/svg/entity/capability.rb,
lib/archimate/svg/entity/constraint.rb,
lib/archimate/svg/entity/node_shape.rb,
lib/archimate/data_model/any_element.rb,
lib/archimate/data_model/lang_string.rb,
lib/archimate/data_model/schema_info.rb,
lib/archimate/file_formats/sax/no_op.rb,
lib/archimate/svg/entity/base_entity.rb,
lib/archimate/svg/entity/data_entity.rb,
lib/archimate/svg/entity/data_object.rb,
lib/archimate/svg/entity/deliverable.rb,
lib/archimate/svg/entity/or_junction.rb,
lib/archimate/svg/entity/rect_entity.rb,
lib/archimate/svg/entity/requirement.rb,
lib/archimate/svg/entity/stakeholder.rb,
lib/archimate/data_model/diagram_type.rb,
lib/archimate/data_model/organization.rb,
lib/archimate/data_model/relationship.rb,
lib/archimate/file_formats/serializer.rb,
lib/archimate/lint/duplicate_entities.rb,
lib/archimate/svg/entity/and_junction.rb,
lib/archimate/svg/entity/event_entity.rb,
lib/archimate/svg/entity/work_package.rb,
lib/archimate/data_model/any_attribute.rb,
lib/archimate/data_model/modeling_note.rb,
lib/archimate/data_model/referenceable.rb,
lib/archimate/data_model/relationships.rb,
lib/archimate/file_formats/sax/handler.rb,
lib/archimate/svg/entity/business_role.rb,
lib/archimate/data_model/connector_type.rb,
lib/archimate/file_formats/sax/document.rb,
lib/archimate/svg/entity/business_actor.rb,
lib/archimate/svg/entity/business_event.rb,
lib/archimate/svg/entity/diagram_object.rb,
lib/archimate/svg/entity/process_entity.rb,
lib/archimate/svg/entity/representation.rb,
lib/archimate/svg/entity/service_entity.rb,
lib/archimate/svg/entity/business_object.rb,
lib/archimate/svg/entity/function_entity.rb,
lib/archimate/svg/entity/system_software.rb,
lib/archimate/svg/entity/business_process.rb,
lib/archimate/svg/entity/business_service.rb,
lib/archimate/svg/entity/course_of_action.rb,
lib/archimate/svg/entity/interface_entity.rb,
lib/archimate/svg/entity/technology_event.rb,
lib/archimate/file_formats/sax/any_element.rb,
lib/archimate/file_formats/sax/archi/model.rb,
lib/archimate/file_formats/sax/archi/style.rb,
lib/archimate/file_formats/sax/lang_string.rb,
lib/archimate/svg/entity/application_event.rb,
lib/archimate/svg/entity/business_function.rb,
lib/archimate/svg/entity/motivation_entity.rb,
lib/archimate/data_model/referenceable_list.rb,
lib/archimate/file_formats/sax/archi/bounds.rb,
lib/archimate/svg/entity/business_interface.rb,
lib/archimate/svg/entity/communication_path.rb,
lib/archimate/svg/entity/interaction_entity.rb,
lib/archimate/svg/entity/technology_process.rb,
lib/archimate/svg/entity/technology_service.rb,
lib/archimate/data_model/property_definition.rb,
lib/archimate/file_formats/archi_file_reader.rb,
lib/archimate/file_formats/archi_file_writer.rb,
lib/archimate/file_formats/sax/archi/content.rb,
lib/archimate/file_formats/sax/archi/diagram.rb,
lib/archimate/file_formats/sax/archi/element.rb,
lib/archimate/file_formats/serializer/writer.rb,
lib/archimate/svg/entity/application_process.rb,
lib/archimate/svg/entity/application_service.rb,
lib/archimate/svg/entity/rounded_rect_entity.rb,
lib/archimate/svg/entity/sketch_model_sticky.rb,
lib/archimate/svg/entity/technology_function.rb,
lib/archimate/file_formats/sax/archi/location.rb,
lib/archimate/file_formats/sax/archi/property.rb,
lib/archimate/svg/entity/application_function.rb,
lib/archimate/svg/entity/business_interaction.rb,
lib/archimate/svg/entity/distribution_network.rb,
lib/archimate/svg/entity/implementation_event.rb,
lib/archimate/svg/entity/technology_interface.rb,
lib/archimate/data_model/preserved_lang_string.rb,
lib/archimate/file_formats/archi_file_writer_4.rb,
lib/archimate/file_formats/sax/archi/view_node.rb,
lib/archimate/file_formats/sax/capture_content.rb,
lib/archimate/file_formats/sax/content_element.rb,
lib/archimate/svg/entity/application_component.rb,
lib/archimate/svg/entity/application_interface.rb,
lib/archimate/svg/entity/communication_network.rb,
lib/archimate/file_formats/sax/archi/connection.rb,
lib/archimate/svg/entity/business_collaboration.rb,
lib/archimate/svg/entity/infrastructure_service.rb,
lib/archimate/svg/entity/technology_interaction.rb,
lib/archimate/data_model/relationship_references.rb,
lib/archimate/svg/entity/application_interaction.rb,
lib/archimate/svg/entity/diagram_model_reference.rb,
lib/archimate/svg/entity/infrastructure_function.rb,
lib/archimate/file_formats/sax/archi/organization.rb,
lib/archimate/file_formats/sax/archi/relationship.rb,
lib/archimate/file_formats/sax/capture_properties.rb,
lib/archimate/file_formats/serializer/archi/model.rb,
lib/archimate/svg/entity/infrastructure_interface.rb,
lib/archimate/svg/entity/technology_collaboration.rb,
lib/archimate/file_formats/serializer/archi/bounds.rb,
lib/archimate/file_formats/serializer/xml_metadata.rb,
lib/archimate/svg/entity/application_collaboration.rb,
lib/archimate/file_formats/serializer/archi/diagram.rb,
lib/archimate/file_formats/serializer/archi/element.rb,
lib/archimate/file_formats/sax/capture_documentation.rb,
lib/archimate/file_formats/sax/preserved_lang_string.rb,
lib/archimate/file_formats/serializer/archi/property.rb,
lib/archimate/file_formats/model_exchange_file_reader.rb,
lib/archimate/file_formats/serializer/archi/view_node.rb,
lib/archimate/file_formats/serializer/xml_lang_string.rb,
lib/archimate/file_formats/serializer/archi/connection.rb,
lib/archimate/file_formats/serializer/archi/viewpoint3.rb,
lib/archimate/file_formats/serializer/archi/viewpoint4.rb,
lib/archimate/file_formats/serializer/named_collection.rb,
lib/archimate/file_formats/sax/model_exchange_file/font.rb,
lib/archimate/file_formats/sax/model_exchange_file/item.rb,
lib/archimate/file_formats/serializer/xml_property_defs.rb,
lib/archimate/file_formats/model_exchange_file_writer_21.rb,
lib/archimate/file_formats/model_exchange_file_writer_30.rb,
lib/archimate/file_formats/sax/model_exchange_file/color.rb,
lib/archimate/file_formats/sax/model_exchange_file/model.rb,
lib/archimate/file_formats/sax/model_exchange_file/style.rb,
lib/archimate/file_formats/serializer/archi/organization.rb,
lib/archimate/file_formats/serializer/archi/relationship.rb,
lib/archimate/file_formats/serializer/archi/documentation.rb,
lib/archimate/file_formats/sax/archi/archi_handler_factory.rb,
lib/archimate/file_formats/sax/model_exchange_file/diagram.rb,
lib/archimate/file_formats/sax/model_exchange_file/element.rb,
lib/archimate/file_formats/sax/model_exchange_file/location.rb,
lib/archimate/file_formats/sax/model_exchange_file/metadata.rb,
lib/archimate/file_formats/sax/model_exchange_file/property.rb,
lib/archimate/file_formats/sax/model_exchange_file/view_node.rb,
lib/archimate/file_formats/sax/model_exchange_file/connection.rb,
lib/archimate/file_formats/serializer/archi/archi_file_writer.rb,
lib/archimate/file_formats/sax/model_exchange_file/schema_info.rb,
lib/archimate/file_formats/sax/model_exchange_file/relationship.rb,
lib/archimate/file_formats/serializer/archi/archi_file_writer_3.rb,
lib/archimate/file_formats/serializer/archi/archi_file_writer_4.rb,
lib/archimate/file_formats/serializer/model_exchange_file/style.rb,
lib/archimate/file_formats/serializer/model_exchange_file/element.rb,
lib/archimate/file_formats/serializer/model_exchange_file/location.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/item.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/item.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/label.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/model.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/label.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/model.rb,
lib/archimate/file_formats/serializer/model_exchange_file/properties.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/diagram.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/diagram.rb,
lib/archimate/file_formats/sax/model_exchange_file/property_definition.rb,
lib/archimate/file_formats/serializer/model_exchange_file/organization.rb,
lib/archimate/file_formats/serializer/model_exchange_file/relationship.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/property.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/property.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/view_node.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/viewpoint.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/view_node.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/connection.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/connection.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v21/organization_body.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/organization_body.rb,
lib/archimate/file_formats/sax/model_exchange_file/model_exchange_handler_factory.rb,
lib/archimate/file_formats/serializer/model_exchange_file/v30/property_definitions.rb,
lib/archimate/file_formats/serializer/model_exchange_file/model_exchange_file_writer.rb

Overview

This module takes an ArchiMate model and builds a set of CSV files representing it.

Defined Under Namespace

Modules: Cli, CoreRefinements, DataModel, Export, FileFormats, Lint, Logging, Svg Classes: Color, Config, DerivedRelations, FileFormat, MaybeIO, ProgressIndicator

Constant Summary collapse

SUPPORTED_FORMATS =

Support Archimate file format versions

%i[
  archi_3
  archi_4
  archimate_2_1
  archimate_3_0
].freeze
ARCHIMATE_VERSIONS =

Archimate modeling specification version

%i[
  archimate_2_1
  archimate_3_0
].freeze
VERSION =
"2.2.1"

Class Method Summary collapse

Class Method Details

.parse(str) ⇒ Object

Reads the given file and returns the Archimate model

Parameters:

  • str

    XML string containing the Archimate model

Returns:

  • Archimate::DataModel::Model of ArchiMate model in the file



92
93
94
# File 'lib/archimate.rb', line 92

def self.parse(str)
  FileFormat.parse(str)
end

.read(filename) ⇒ Object

Reads the given file and returns the Archimate model

Parameters:

  • filename

    File name of the file to read

Returns:

  • Archimate::DataModel::Model of ArchiMate model in the file



83
84
85
86
# File 'lib/archimate.rb', line 83

def self.read(filename)
  raise "#{filename.inspect} not found" unless File.exist?(filename)
  FileFormat.read(filename)
end