semantic_naming 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,14 +69,18 @@ module N
69
69
  all_types_qry.where(:element, RDF.type, :type)
70
70
  all_types = all_types_qry.execute
71
71
 
72
- all_types_hash = {}
73
- all_types.each { |type| all_types_hash[type] = true }
74
-
75
72
  qry = Query.new(SourceClass).distinct.select(:class, :subclass)
76
73
  qry.where(:subclass, RDFS.subClassOf, :class)
77
74
  subtype_list = qry.execute
78
75
 
79
- hierarchy = build_hierarchy_from(subtype_list)
76
+ all_types_hash = {}
77
+ all_types.each { |type| all_types_hash[type] = true }
78
+
79
+ # TODO: Not very efficient, but then we don't expect many types
80
+ all_type_list = (all_types + subtype_list.collect { |el| el.last }).uniq
81
+
82
+ hierarchy = build_hierarchy_from(subtype_list, all_type_list)
83
+
80
84
  purge_hierarchy!(hierarchy, all_types_hash)
81
85
 
82
86
  hierarchy
metadata CHANGED
@@ -5,7 +5,7 @@ homepage: http://talia.discovery-project.eu/
5
5
  executables: []
6
6
 
7
7
  version: !ruby/object:Gem::Version
8
- version: 2.0.3
8
+ version: 2.0.4
9
9
  post_install_message:
10
10
  date: 2009-11-04 23:00:00 +00:00
11
11
  files: