Class/Module Index [+]

Quicksearch

EASupport

Constants

ERROR
FIXMAP
INFO
WARN

Public Class Methods

instantiateUML13FromXMI11(envUML, fileName, options={}) click to toggle source
# File lib/ea_support/ea_support.rb, line 24
def self.instantiateUML13FromXMI11(envUML, fileName, options={})
  envUMLEA = RGen::Environment.new
  xmiInst = XMI11Instantiator.new(envUMLEA, FIXMAP, options[:loglevel] || ERROR)
  xmiInst.add_metamodel("omg.org/UML1.3", UML13EA)
  File.open(fileName) do |f|
    xmiInst.instantiate(f.read)
  end
  trans = UML13EAToUML13.new(envUMLEA, envUML)
  trans.transform
  trans.cleanModel if options[:clean_model]
end
serializeUML13ToXMI11(envUML, fileName, options={}) click to toggle source
# File lib/ea_support/ea_support.rb, line 36
def self.serializeUML13ToXMI11(envUML, fileName, options={})
  envUMLEA = RGen::Environment.new
  
  UML13EA.idStore = options[:keep_ids] ? 
    IdStore.new(File.dirname(fileName)+"/"+File.basename(fileName)+".ids") : IdStore.new
  
  UML13ToUML13EA.new(envUML, envUMLEA).transform
  
  File.open(fileName, "w") do |f|
    xmiSer = RGen::Serializer::XMI11Serializer.new(f)
    xmiSer.setNamespace("UML","omg.org/UML1.3")
    xmiSer.serialize(envUMLEA.find(:class => UML13EA::Model).first, 
      {:documentation => {:exporter => "Enterprise Architect", :exporterVersion => "2.5"}})
  end
  
  UML13EA.idStore.store
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.