Class: ECoreToUML13

Inherits:
RGen::Transformer show all
Includes:
RGen::ECore
Defined in:
lib/transformers/ecore_to_uml13.rb

Constant Summary

Constants included from RGen::ECore

RGen::ECore::EBoolean, RGen::ECore::EFloat, RGen::ECore::EInt, RGen::ECore::EJavaClass, RGen::ECore::EJavaObject, RGen::ECore::ELong, RGen::ECore::ERubyClass, RGen::ECore::ERubyObject, RGen::ECore::EString

Instance Method Summary collapse

Methods included from RGen::MetamodelBuilder::ModuleExtension

#_annotations, #_constantOrder, #annotation, extended, #final_method, #method_added

Methods included from RGen::ECore::ECoreInterface

#_set_ecore_internal, 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

#createMultiplicity(ref) ⇒ Object



69
70
71
72
73
# File 'lib/transformers/ecore_to_uml13.rb', line 69

def createMultiplicity(ref)
  @env_out.new(UML13::Multiplicity, :range => [
    @env_out.new(UML13::MultiplicityRange, 
      :lower => ref.lowerBound.to_s.sub("-1","*"), :upper => ref.upperBound.to_s.sub("-1","*"))])    
end

#modelObject



75
76
77
# File 'lib/transformers/ecore_to_uml13.rb', line 75

def model
  @model ||= @env_out.new(UML13::Model, :name => "Model")
end

#transformObject



8
9
10
11
12
# File 'lib/transformers/ecore_to_uml13.rb', line 8

def transform
  trans(:class => EPackage)
  trans(:class => EClass)
  trans(:class => EEnum)
end