Class: UML13EAToUML13

Inherits:
RGen::Transformer show all
Includes:
UML13EA
Defined in:
lib/ea_support/uml13_ea_to_uml13.rb

Constant Summary

Constants included from UML13EA

UML13EA::AggregationKind, UML13EA::CallConcurrencyKind, UML13EA::ChangeableKind, UML13EA::MessageDirectionKind, UML13EA::OperationDirectionKind, UML13EA::OrderingKind, UML13EA::ParameterDirectionKind, UML13EA::PseudostateKind, UML13EA::ScopeKind, UML13EA::VisibilityKind

Constants included from RGen::MetamodelBuilder::DataTypes

RGen::MetamodelBuilder::DataTypes::Boolean

Instance Method Summary collapse

Methods included from RGen::MetamodelBuilder::ModuleExtension

#_annotations, #annotation, #final_method, #method_added

Methods included from RGen::ECore::ECoreInstantiator

clear_ecore_cache, #ecore

Methods inherited from RGen::Transformer

_methods, #_transformProperties, _transformer_blocks, copy, copy_all, #copy_features, #initialize, method, #method_missing, #trans, transform

Constructor Details

This class inherits a constructor from RGen::Transformer

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RGen::Transformer

Instance Method Details

#cleanModelObject



13
14
15
16
17
# File 'lib/ea_support/uml13_ea_to_uml13.rb', line 13

def cleanModel
  @env_out.find(:class => UML13::ModelElement).each do |me|
    me.taggedValue = []
  end
end

#copyAssociationEndObject



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/ea_support/uml13_ea_to_uml13.rb', line 37

def copyAssociationEnd
  copy_features :except => [:isOrdered, :changeable] do
    {:ordering => isOrdered ? :ordered : :unordered,
     :changeability => {:none => :frozen}[changeable] || changeable,
     :aggregation => {:shared => :aggregate}[aggregation] || aggregation,
     :multiplicity => UML13::Multiplicity.new(
      :range => [UML13::MultiplicityRange.new(
        :lower => multiplicity && multiplicity.split("..").first,
        :upper => multiplicity && multiplicity.split("..").last)])}
  end
end

#transformObject



8
9
10
11
# File 'lib/ea_support/uml13_ea_to_uml13.rb', line 8

def transform
  trans(:class => Package)
  trans(:class => Class)
end