bel_parser 1.0.0.alpha.24 → 1.0.0.alpha.25

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: 617ddc578c6940935e8fb9a51b6a3c208df4bae8
4
- data.tar.gz: c9a72673b33b655c94d89794f0447550d22fea39
3
+ metadata.gz: 34152c1783a2172b735ca8b24fefe15e9c54acdb
4
+ data.tar.gz: 38dda7b229288ed5b773d10de465403460aa51cd
5
5
  SHA512:
6
- metadata.gz: 922ef32d7cbdc44f4199e2fba5e8b3709a09702781b60d18716bb94775ff33f3c4c691cb30b31950ad3fbcc7554fc09afcf0543145a3e7c22e981100c976da8f
7
- data.tar.gz: 0ce2bbb50b3f1d58a0a2afe2c7d76c02b9b87acd5483bf0532955c7408cf937aa12b48111fba0120d543a062668a382cc94a8f089800a8a3232db384d6740fa1
6
+ metadata.gz: 0c17ce508194ae5377a20996878f73bae578581602b778ce856be0a1c6d33c1fa88c7b7c7a4791c8fda3f21066b9ce760865f1620a2afc569b8efbc2a762f2e3
7
+ data.tar.gz: 1c9d09cae82f9013a03b791262afd9c3ed658615c575a3030e52cf81b31ec52b0026e366307f29dee49267ee1307975b08dec352b57a2f810ba67f1cc60c38d4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha.24
1
+ 1.0.0.alpha.25
@@ -35,12 +35,12 @@ module BEL::Translator::Plugins::BelScript::BelCitationSerialization
35
35
  bel = ''
36
36
 
37
37
  citation = citation_value(nanopub)
38
- summary_text = summary_text_value(nanopub)
38
+ support = support_value(nanopub)
39
39
  annotations = annotation_values(nanopub)
40
40
 
41
41
  current_annotations = {}.merge(annotations)
42
42
  current_annotations[:Citation] = citation if citation
43
- current_annotations[:Support] = summary_text if summary_text
43
+ current_annotations[:Support] = support if support
44
44
 
45
45
  if !nanopub.citation.id || nanopub.citation.id.empty?
46
46
  citation_id = quote('')
@@ -85,9 +85,9 @@ module BEL::Translator::Plugins::BelScript::BelCitationSerialization
85
85
  end
86
86
 
87
87
  # SET Support
88
- summary_text = current_annotations.delete(:Support)
89
- if summary_text
90
- bel << %Q{SET Support = "#{summary_text}"\n}
88
+ support = current_annotations.delete(:Support)
89
+ if support
90
+ bel << %Q{SET Support = "#{support}"\n}
91
91
  end
92
92
 
93
93
  # SET new or modified annotations
@@ -50,12 +50,12 @@ module BEL::Translator::Plugins::BelScript::BelDiscreteSerialization
50
50
  bel = ''
51
51
 
52
52
  citation = citation_value(nanopub)
53
- summary_text = summary_text_value(nanopub)
53
+ support = support_value(nanopub)
54
54
  annotations = annotation_values(nanopub)
55
55
 
56
56
  current_annotations = {}.merge(annotations)
57
57
  current_annotations[:Citation] = citation if citation
58
- current_annotations[:Support] = summary_text if summary_text
58
+ current_annotations[:Support] = support if support
59
59
 
60
60
  # UNSET unused annotations from previous nanopub.
61
61
  (cumulative_annotations.keys - current_annotations.keys).each do |unset_key|
@@ -73,9 +73,9 @@ module BEL::Translator::Plugins::BelScript::BelDiscreteSerialization
73
73
  end
74
74
 
75
75
  # SET Support
76
- summary_text = current_annotations.delete(:Support)
77
- if summary_text
78
- bel << %Q{SET Support = "#{summary_text}"\n}
76
+ support = current_annotations.delete(:Support)
77
+ if support
78
+ bel << %Q{SET Support = "#{support}"\n}
79
79
  end
80
80
 
81
81
  # SET new or modified annotations
@@ -34,12 +34,12 @@ module BEL::Translator::Plugins::BelScript::BelTopDownSerialization
34
34
  bel = ''
35
35
 
36
36
  citation = citation_value(nanopub)
37
- summary_text = summary_text_value(nanopub)
37
+ support = support_value(nanopub)
38
38
  annotations = annotation_values(nanopub)
39
39
 
40
40
  current_annotations = {}.merge(annotations)
41
41
  current_annotations[:Citation] = citation if citation
42
- current_annotations[:Support] = summary_text if summary_text
42
+ current_annotations[:Support] = support if support
43
43
 
44
44
  # UNSET unused annotations from previous nanopub.
45
45
  (cumulative_annotations.keys - current_annotations.keys).each do |unset_key|
@@ -64,9 +64,9 @@ module BEL::Translator::Plugins::BelScript::BelTopDownSerialization
64
64
  end
65
65
 
66
66
  # SET Support
67
- summary_text = current_annotations.delete(:Support)
68
- if summary_text
69
- bel << %Q{SET Support = "#{summary_text}"\n}
67
+ support = current_annotations.delete(:Support)
68
+ if support
69
+ bel << %Q{SET Support = "#{support}"\n}
70
70
  end
71
71
 
72
72
  # SET new or modified annotations
@@ -42,12 +42,12 @@ module BEL::Translator::Plugins::BelScript::NanopubSerialization
42
42
  values.join(', ')
43
43
  end
44
44
 
45
- def summary_text_value(nanopub)
46
- summary_text = nanopub.summary_text
45
+ def support_value(nanopub)
46
+ support = nanopub.support
47
47
 
48
- return nil unless summary_text && summary_text.value
48
+ return nil unless support && support.value
49
49
 
50
- value = summary_text.value
50
+ value = support.value
51
51
  value.gsub!("\n", "")
52
52
  value.gsub!('"', %Q{\\"})
53
53
  value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.24
4
+ version: 1.0.0.alpha.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Bargnesi