emf_jruby 0.1.2-java → 0.1.4-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/emf/emf_nav.rb CHANGED
@@ -4,6 +4,8 @@ module JSON
4
4
  end
5
5
  end
6
6
 
7
+ # This module permits to manipulate EObjects serialized
8
+ # as Hash
7
9
  module EMF
8
10
 
9
11
  def self.rel_conts(root)
@@ -1,3 +1,6 @@
1
+ # This code permit to transform EObjects in Hash objects
2
+ # containing lists and single values
3
+
1
4
  require 'emf/ast_serialization'
2
5
 
3
6
  def qname(e_object)
@@ -0,0 +1,15 @@
1
+ module EObjectUtil
2
+
3
+ def self.all_contents(root)
4
+ contents = []
5
+ root.getAllContents.each {|e| contents << e}
6
+ contents
7
+ end
8
+
9
+ def self.only_content_of_eclass(root,eclass)
10
+ selected = all_contents(root).select {|o| o.eClass.isSuperTypeOf eclass}
11
+ raise "One expected, #{selected.count} found" unless selected.count == 1
12
+ selected.first
13
+ end
14
+
15
+ end
data/lib/emf/model.rb ADDED
@@ -0,0 +1,5 @@
1
+ class Model
2
+ attr_accessor :root
3
+ attr_accessor :name
4
+ attr_accessor :external_objects
5
+ end
data/lib/emf_jruby.rb CHANGED
@@ -6,4 +6,6 @@ Dir[emf_libs[0]+"/jars/*.jar"].each do |jar|
6
6
  end
7
7
 
8
8
  require 'emf/ast_serialization'
9
- require 'emf/emf_to_json'
9
+ require 'emf/emf_to_json'
10
+ require 'emf/eobject_util'
11
+ require 'emf/model'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: emf_jruby
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.1.4
6
6
  platform: java
7
7
  authors:
8
8
  - Federico Tomassetti
@@ -21,6 +21,8 @@ files:
21
21
  - lib/emf/emf_to_json.rb
22
22
  - lib/emf/emf_nav.rb
23
23
  - lib/emf/ast_serialization.rb
24
+ - lib/emf/eobject_util.rb
25
+ - lib/emf/model.rb
24
26
  - lib/jars/org.antlr.runtime_3.0.0.v200803061811.jar
25
27
  - lib/jars/org.eclipse.emf.common_2.8.0.v20130125-0546.jar
26
28
  - lib/jars/org.eclipse.emf.ecore.xmi_2.8.1.v20130125-0546.jar