simple_bioc 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ed9fab44494192914d7688d3c5a470d3eeba17c
4
- data.tar.gz: 5143198cbfbb6c484298a52c9bfc2a80575046c8
3
+ metadata.gz: 1719fc17ee2bad246a6ae62db703987f427188b3
4
+ data.tar.gz: 320a979582d27f7b5fc6213f235f13329e4ffbe2
5
5
  SHA512:
6
- metadata.gz: 9767bc966d034b03af040c217e768e678fff7af58043699dba6b49de9ff086bb73f4146c1cf88b25b65e32ded4af7719cd90e0c999e45109511416ffa328c116
7
- data.tar.gz: 30efd08ecc35fbd78a781caa39c381a8d57e25fb4530a7547f5768548d5929beae55c782f6f7dda9c469a4423cc55fbdfc93d06fdc67ac495c71415d74bc2a06
6
+ metadata.gz: e60df171ccd18ddcdc26911f1dc24f3fcced3fb7336004c1c4b03a1259ceda25295511883353b9275be7e7d9ec711300b8f576536a829ac832fdbf943c454c63
7
+ data.tar.gz: b3c048a4c8a37e95e8bc35df8e4d9e01692fa792a176ac55db84376323835da2f0a8365eb6e784685a4829ac4cf0c9ab953dc5294890f48da615eda8a2371c4c
@@ -17,12 +17,12 @@ module BioCMerger
17
17
  doc_d = dest_collection.documents[0]
18
18
  doc_s = src_collection.documents[0]
19
19
 
20
- copy_infons(dest_collection, src_collection, warnings)
20
+ copy_infons(dest_collection, src_collection)
21
21
  dest_collection.source = src_collection.source if dest_collection.source.nil? || dest_collection.source.empty?
22
22
  dest_collection.date = src_collection.date if dest_collection.date.nil? || dest_collection.date.empty?
23
23
  dest_collection.key = src_collection.key if dest_collection.key.nil? || dest_collection.key.empty?
24
24
 
25
- copy_infons(doc_d, doc_s, warnings)
25
+ copy_infons(doc_d, doc_s)
26
26
  copy_relations(doc_d, doc_d, doc_s, id_map)
27
27
 
28
28
  if doc_d.passages.size != doc_s.passages.size
@@ -130,6 +130,7 @@ module BioCMerger
130
130
  node.role = relation.role
131
131
  new_r.nodes << node
132
132
  end
133
+ copy_infons(new_r, relation)
133
134
  new_r.original = relation
134
135
  dest.relations << new_r
135
136
  end
@@ -145,6 +146,7 @@ module BioCMerger
145
146
  new_l.length = l.length
146
147
  new_a.locations << new_l
147
148
  end
149
+ copy_infons(new_a, annotation)
148
150
  dest.annotations << new_a
149
151
  end
150
152
 
@@ -173,12 +175,12 @@ module BioCMerger
173
175
  return text.nil? || text.empty?
174
176
  end
175
177
 
176
- def copy_infons(dest, src, warnings)
178
+ def copy_infons(dest, src)
177
179
  src.infons.each do |k, v|
178
180
  if dest.infons[k].nil?
179
181
  dest.infons[k] = v
180
182
  elsif dest.infons[k] != v
181
- warnings << "Failed to copy <#{k}:#{v}>. the key is already exist in infons."
183
+
182
184
  end
183
185
  end
184
186
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleBioC
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end