simple_bioc 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/lib/simple_bioc/bioc_merger.rb +6 -4
- data/lib/simple_bioc/version.rb +1 -1
- data/xml/merge/output.xml +972 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1719fc17ee2bad246a6ae62db703987f427188b3
|
4
|
+
data.tar.gz: 320a979582d27f7b5fc6213f235f13329e4ffbe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
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
|
-
|
183
|
+
|
182
184
|
end
|
183
185
|
end
|
184
186
|
end
|
data/lib/simple_bioc/version.rb
CHANGED