relaton-3gpp 1.9.2 → 1.10.1

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
  SHA256:
3
- metadata.gz: af19a7b45a0d67db44cc1678a818f841c547f5ef600572b60c687880c1fc5e4c
4
- data.tar.gz: 201c0eecf2e2b95617b6e0cc52125e64a1b2e985a70a24694fed488c20dde864
3
+ metadata.gz: 275ee049ce18d121101b1bc9d3e77bf50740172f13c61e1849606814aab0d88f
4
+ data.tar.gz: 888698e5663d0bd316f42d0742677efdd8fb70c7552e1524cf67b4d9fbb5698e
5
5
  SHA512:
6
- metadata.gz: 70f45499052e82453314a19cfc903b88929af2ce0c64afa4101f67b892f4170903902b681ca912025cc6fda2306f03a694fcbfaf034667e93ce26180296ca02a
7
- data.tar.gz: 22e846ea7686f0d5e91d79096501b7546830298f5c8611667b1e65bea43efc78b8594c1da8999ca9a92f5661da85c83eae810389bebf30a8155638be54b90c2d
6
+ metadata.gz: 1dd744071cbc47d39d57dab35bffc4585375d80c4084d70d9c032b5005be008af08e8a714e0f819f74a181f5cfca9d21eec5b693dfc38d704d596818b855734c
7
+ data.tar.gz: 97fcb1b2dd3417870e39cfb309808cd6d14826d267f8f920d9329a9ca80ae071234c076f22a4695a913be4f430a8ac21df56273820ff5695a4770f007a82d0b5
data/.gitignore CHANGED
@@ -11,3 +11,4 @@
11
11
  .rubocop-https---raw-githubusercontent-com-riboseinc-oss-guides-master-ci-rubocop-yml
12
12
  Gemfile.lock
13
13
  .vscode/
14
+ .rspec_status
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -624,6 +626,9 @@
624
626
  <choice>
625
627
  <ref name="PureTextElement"/>
626
628
  <ref name="stem"/>
629
+ <ref name="eref"/>
630
+ <ref name="xref"/>
631
+ <ref name="hyperlink"/>
627
632
  </choice>
628
633
  </zeroOrMore>
629
634
  </element>
@@ -634,6 +639,9 @@
634
639
  <choice>
635
640
  <ref name="PureTextElement"/>
636
641
  <ref name="stem"/>
642
+ <ref name="eref"/>
643
+ <ref name="xref"/>
644
+ <ref name="hyperlink"/>
637
645
  </choice>
638
646
  </zeroOrMore>
639
647
  </element>
@@ -641,7 +649,12 @@
641
649
  <define name="tt">
642
650
  <element name="tt">
643
651
  <zeroOrMore>
644
- <ref name="PureTextElement"/>
652
+ <choice>
653
+ <ref name="PureTextElement"/>
654
+ <ref name="eref"/>
655
+ <ref name="xref"/>
656
+ <ref name="hyperlink"/>
657
+ </choice>
645
658
  </zeroOrMore>
646
659
  </element>
647
660
  </define>
@@ -822,7 +835,9 @@
822
835
  <attribute name="alt"/>
823
836
  </optional>
824
837
  <ref name="CitationType"/>
825
- <text/>
838
+ <oneOrMore>
839
+ <ref name="PureTextElement"/>
840
+ </oneOrMore>
826
841
  </define>
827
842
  <define name="hyperlink">
828
843
  <element name="link">
@@ -835,7 +850,9 @@
835
850
  <optional>
836
851
  <attribute name="alt"/>
837
852
  </optional>
838
- <text/>
853
+ <oneOrMore>
854
+ <ref name="PureTextElement"/>
855
+ </oneOrMore>
839
856
  </element>
840
857
  </define>
841
858
  <define name="xref">
@@ -849,7 +866,9 @@
849
866
  <optional>
850
867
  <attribute name="alt"/>
851
868
  </optional>
852
- <text/>
869
+ <oneOrMore>
870
+ <ref name="PureTextElement"/>
871
+ </oneOrMore>
853
872
  </element>
854
873
  </define>
855
874
  <define name="fn">
data/grammars/biblio.rng CHANGED
@@ -209,9 +209,6 @@
209
209
  <zeroOrMore>
210
210
  <ref name="contact"/>
211
211
  </zeroOrMore>
212
- <zeroOrMore>
213
- <ref name="uri"/>
214
- </zeroOrMore>
215
212
  </element>
216
213
  </define>
217
214
  <define name="fullname">
@@ -401,9 +398,9 @@
401
398
  <choice>
402
399
  <!-- iso191606 TODO -->
403
400
  <group>
404
- <oneOrMore>
401
+ <zeroOrMore>
405
402
  <ref name="street"/>
406
- </oneOrMore>
403
+ </zeroOrMore>
407
404
  <ref name="city"/>
408
405
  <optional>
409
406
  <ref name="state"/>
@@ -828,6 +825,11 @@
828
825
  <optional>
829
826
  <attribute name="scope"/>
830
827
  </optional>
828
+ <optional>
829
+ <attribute name="primary">
830
+ <data type="boolean"/>
831
+ </attribute>
832
+ </optional>
831
833
  <text/>
832
834
  </element>
833
835
  </define>
data/grammars/isodoc.rng CHANGED
@@ -32,6 +32,56 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="index">
36
+ <element name="index">
37
+ <optional>
38
+ <attribute name="to">
39
+ <data type="IDREF"/>
40
+ </attribute>
41
+ </optional>
42
+ <element name="primary">
43
+ <oneOrMore>
44
+ <choice>
45
+ <ref name="PureTextElement"/>
46
+ <ref name="stem"/>
47
+ </choice>
48
+ </oneOrMore>
49
+ </element>
50
+ <optional>
51
+ <element name="secondary">
52
+ <oneOrMore>
53
+ <choice>
54
+ <ref name="PureTextElement"/>
55
+ <ref name="stem"/>
56
+ </choice>
57
+ </oneOrMore>
58
+ </element>
59
+ </optional>
60
+ <optional>
61
+ <element name="tertiary">
62
+ <oneOrMore>
63
+ <choice>
64
+ <ref name="PureTextElement"/>
65
+ <ref name="stem"/>
66
+ </choice>
67
+ </oneOrMore>
68
+ </element>
69
+ </optional>
70
+ </element>
71
+ </define>
72
+ <define name="bibitem">
73
+ <element name="bibitem">
74
+ <attribute name="id">
75
+ <data type="ID"/>
76
+ </attribute>
77
+ <optional>
78
+ <attribute name="hidden">
79
+ <data type="boolean"/>
80
+ </attribute>
81
+ </optional>
82
+ <ref name="BibliographicItem"/>
83
+ </element>
84
+ </define>
35
85
  <define name="section-title">
36
86
  <element name="title">
37
87
  <zeroOrMore>
@@ -690,6 +740,7 @@
690
740
  <ref name="terms"/>
691
741
  <ref name="term-clause"/>
692
742
  <ref name="definitions"/>
743
+ <ref name="floating-title"/>
693
744
  </choice>
694
745
  </oneOrMore>
695
746
  </element>
@@ -1013,6 +1064,26 @@
1013
1064
  </zeroOrMore>
1014
1065
  </element>
1015
1066
  </define>
1067
+ <define name="sub">
1068
+ <element name="sub">
1069
+ <zeroOrMore>
1070
+ <choice>
1071
+ <ref name="PureTextElement"/>
1072
+ <ref name="stem"/>
1073
+ </choice>
1074
+ </zeroOrMore>
1075
+ </element>
1076
+ </define>
1077
+ <define name="sup">
1078
+ <element name="sup">
1079
+ <zeroOrMore>
1080
+ <choice>
1081
+ <ref name="PureTextElement"/>
1082
+ <ref name="stem"/>
1083
+ </choice>
1084
+ </zeroOrMore>
1085
+ </element>
1086
+ </define>
1016
1087
  <define name="pagebreak">
1017
1088
  <element name="pagebreak">
1018
1089
  <optional>
@@ -1680,6 +1751,7 @@
1680
1751
  <ref name="clause-subsection"/>
1681
1752
  <ref name="terms"/>
1682
1753
  <ref name="definitions"/>
1754
+ <ref name="floating-title"/>
1683
1755
  </choice>
1684
1756
  </oneOrMore>
1685
1757
  </choice>
@@ -1722,6 +1794,7 @@
1722
1794
  <ref name="terms"/>
1723
1795
  <ref name="definitions"/>
1724
1796
  <ref name="references"/>
1797
+ <ref name="floating-title"/>
1725
1798
  </choice>
1726
1799
  </zeroOrMore>
1727
1800
  </group>
@@ -1796,6 +1869,20 @@
1796
1869
  <data type="ID"/>
1797
1870
  </attribute>
1798
1871
  </optional>
1872
+ <optional>
1873
+ <attribute name="language"/>
1874
+ </optional>
1875
+ <optional>
1876
+ <attribute name="script"/>
1877
+ </optional>
1878
+ <optional>
1879
+ <attribute name="tag"/>
1880
+ </optional>
1881
+ <optional>
1882
+ <attribute name="multilingual-rendering">
1883
+ <ref name="MultilingualRenderingType"/>
1884
+ </attribute>
1885
+ </optional>
1799
1886
  <oneOrMore>
1800
1887
  <ref name="preferred"/>
1801
1888
  </oneOrMore>
@@ -1959,7 +2046,11 @@
1959
2046
  </optional>
1960
2047
  <element name="name">
1961
2048
  <zeroOrMore>
1962
- <ref name="PureTextElement"/>
2049
+ <choice>
2050
+ <ref name="PureTextElement"/>
2051
+ <ref name="stem"/>
2052
+ <ref name="index"/>
2053
+ </choice>
1963
2054
  </zeroOrMore>
1964
2055
  </element>
1965
2056
  <optional>
@@ -1973,7 +2064,7 @@
1973
2064
  </element>
1974
2065
  </optional>
1975
2066
  <optional>
1976
- <element name="grammar-info">
2067
+ <element name="grammar">
1977
2068
  <ref name="Grammar"/>
1978
2069
  </element>
1979
2070
  </optional>
@@ -2182,7 +2273,18 @@
2182
2273
  <ref name="MultilingualRenderingType"/>
2183
2274
  </attribute>
2184
2275
  </optional>
2185
- <ref name="paragraph"/>
2276
+ <oneOrMore>
2277
+ <choice>
2278
+ <ref name="formula"/>
2279
+ <ref name="ul"/>
2280
+ <ref name="ol"/>
2281
+ <ref name="dl"/>
2282
+ <ref name="quote"/>
2283
+ <ref name="sourcecode"/>
2284
+ <ref name="paragraph"/>
2285
+ <ref name="figure"/>
2286
+ </choice>
2287
+ </oneOrMore>
2186
2288
  </element>
2187
2289
  </define>
2188
2290
  <define name="termsource">
@@ -2516,4 +2618,17 @@
2516
2618
  </oneOrMore>
2517
2619
  </element>
2518
2620
  </define>
2621
+ <define name="floating-title">
2622
+ <element name="floating-title">
2623
+ <attribute name="id">
2624
+ <data type="ID"/>
2625
+ </attribute>
2626
+ <attribute name="depth">
2627
+ <data type="int"/>
2628
+ </attribute>
2629
+ <zeroOrMore>
2630
+ <ref name="TextElement"/>
2631
+ </zeroOrMore>
2632
+ </element>
2633
+ </define>
2519
2634
  </grammar>
data/grammars/reqt.rng CHANGED
@@ -58,6 +58,14 @@
58
58
  <optional>
59
59
  <attribute name="type"/>
60
60
  </optional>
61
+ <optional>
62
+ <attribute name="tag"/>
63
+ </optional>
64
+ <optional>
65
+ <attribute name="multilingual-rendering">
66
+ <ref name="MultilingualRenderingType"/>
67
+ </attribute>
68
+ </optional>
61
69
  <optional>
62
70
  <ref name="reqtitle"/>
63
71
  </optional>
@@ -101,7 +109,9 @@
101
109
  </define>
102
110
  <define name="label">
103
111
  <element name="label">
104
- <text/>
112
+ <oneOrMore>
113
+ <ref name="TextElement"/>
114
+ </oneOrMore>
105
115
  </element>
106
116
  </define>
107
117
  <define name="subject">
@@ -175,6 +185,14 @@
175
185
  <data type="boolean"/>
176
186
  </attribute>
177
187
  </optional>
188
+ <optional>
189
+ <attribute name="tag"/>
190
+ </optional>
191
+ <optional>
192
+ <attribute name="multilingual-rendering">
193
+ <ref name="MultilingualRenderingType"/>
194
+ </attribute>
195
+ </optional>
178
196
  <oneOrMore>
179
197
  <ref name="BasicBlock"/>
180
198
  </oneOrMore>
@@ -52,8 +52,9 @@ module Relaton3gpp
52
52
  specs = dbs["Specs_GSM+3G"]
53
53
  specrels = dbs["Specs_GSM+3G_release-info"]
54
54
  releases = dbs["Releases"]
55
+ tstatus = dbs["temp-status"]
55
56
  dbs["2001-04-25_schedule"].each do |row|
56
- fetch_doc row, specs, specrels, releases
57
+ fetch_doc row, specs, specrels, releases, tstatus
57
58
  end
58
59
  File.write CURRENT, @current.to_yaml, encoding: "UTF-8"
59
60
  end
@@ -91,12 +92,15 @@ module Relaton3gpp
91
92
  # Fetch document
92
93
  #
93
94
  # @param [Hash] row row from mdb
94
- # @param [Mdb] dbs mdb
95
+ # @param [Array<Hash>] specs specs
96
+ # @param [Array<Hash>] specrels specrels
97
+ # @param [Array<Hash>] releases releases
98
+ # @param [Array<Hash>] tstatus tstatus
95
99
  #
96
100
  # @return [Relaton3gpp::BibliographicItem, nil] bibliographic item
97
101
  #
98
- def fetch_doc(row, specs, specrels, releases)
99
- doc = Parser.parse row, specs, specrels, releases
102
+ def fetch_doc(row, specs, specrels, releases, tstatus)
103
+ doc = Parser.parse row, specs, specrels, releases, tstatus
100
104
  save_doc doc
101
105
  rescue StandardError => e
102
106
  warn "Error: #{e.message}"
@@ -7,8 +7,9 @@ module Relaton3gpp
7
7
  # @param [Array<Hash>] specrels Spec + Release table
8
8
  # @param [Array<Hash>] relaeases Releases table
9
9
  # @param [Array<Hash>] specs Specs table
10
+ # @param [Array<Hash>] tstatus temp status-table
10
11
  #
11
- def initialize(row, specs, specrels, releases) # rubocop:disable Metrics/AbcSize
12
+ def initialize(row, specs, specrels, releases, tstatus) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
12
13
  @row = row
13
14
  @spec = specs.detect { |s| s[:Number] == row[:spec] }
14
15
  if @spec
@@ -17,6 +18,7 @@ module Relaton3gpp
17
18
  end
18
19
  @rel = releases.detect { |r| r[:Release_code] == row[:release] }
19
20
  end
21
+ @tstatus = tstatus.detect { |t| t[:Number] == row[:spec] }
20
22
  end
21
23
 
22
24
  #
@@ -26,11 +28,12 @@ module Relaton3gpp
26
28
  # @param [Array<Hash>] specrels Spec + Release table
27
29
  # @param [Array<Hash>] relaeases Releases table
28
30
  # @param [Array<Hash>] specs Specs table
31
+ # @param [Array<Hash>] tstatus temp status-table
29
32
  #
30
33
  # @return [RelatonBib:BibliographicItem, nil] bibliographic item
31
34
  #
32
- def self.parse(row, specs, specrels, relaeases)
33
- new(row, specs, specrels, relaeases).parse
35
+ def self.parse(row, specs, specrels, relaeases, tstatus)
36
+ new(row, specs, specrels, relaeases, tstatus).parse
34
37
  end
35
38
 
36
39
  #
@@ -60,7 +63,7 @@ module Relaton3gpp
60
63
  common_ims_spec: @spec[:ComIMS] == "1",
61
64
  # internal: @spec[:"For publication"] == "0",
62
65
  release: parse_release,
63
- # contributor: contributor,
66
+ contributor: parse_contributor,
64
67
  )
65
68
  end
66
69
 
@@ -103,11 +106,7 @@ module Relaton3gpp
103
106
  # @return [Arra<RelatonBib::DocumentIdentifier>] docidentifier
104
107
  #
105
108
  def parse_docid
106
- [
107
- RelatonBib::DocumentIdentifier.new(type: "3GPP", id: "3GPP #{number}"),
108
- RelatonBib::DocumentIdentifier.new(type: "rapporteurId",
109
- id: @spec[:"rapporteur id"]),
110
- ]
109
+ [RelatonBib::DocumentIdentifier.new(type: "3GPP", id: "3GPP #{number}", primary: true)]
111
110
  end
112
111
 
113
112
  #
@@ -151,20 +150,22 @@ module Relaton3gpp
151
150
  #
152
151
  # @return [RelatonBib::EditorialGroup] editorialgroups
153
152
  #
154
- def parse_editorialgroup # rubocop:disable Metrics/MethodLength
155
- wgp = RelatonBib::WorkGroup.new(name: @spec[:"WG prime"], type: "prime")
156
- eg = [RelatonBib::TechnicalCommittee.new(wgp)]
157
- if @spec[:"WG other"]
158
- wgo = RelatonBib::WorkGroup.new(name: @spec[:"WG other"], type: "other")
159
- eg << RelatonBib::TechnicalCommittee.new(wgo)
153
+ def parse_editorialgroup # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
154
+ eg = [create_workgroup(@spec[:"WG prime"], "prime")]
155
+ if @spec[:"WG other"] && @spec[:"WG other"] != "-"
156
+ eg << create_workgroup(@spec[:"WG other"], "other")
160
157
  end
161
158
  if @spec[:"former WG"]
162
- wgf = RelatonBib::WorkGroup.new(name: @spec[:"former WG"], type: "former")
163
- eg << RelatonBib::TechnicalCommittee.new(wgf)
159
+ eg << create_workgroup(@spec[:"former WG"], "former")
164
160
  end
165
161
  RelatonBib::EditorialGroup.new eg
166
162
  end
167
163
 
164
+ def create_workgroup(name, type)
165
+ wgf = RelatonBib::WorkGroup.new(name: name, type: type)
166
+ RelatonBib::TechnicalCommittee.new(wgf)
167
+ end
168
+
168
169
  #
169
170
  # Parse note
170
171
  #
@@ -172,10 +173,10 @@ module Relaton3gpp
172
173
  #
173
174
  def parse_note
174
175
  n = []
175
- if @specrel && @specrel[:remarks]
176
+ if @specrel && @specrel[:remarks] && @specrel[:remarks] != "."
176
177
  n << RelatonBib::BiblioNote.new(type: "remark", content: @specrel[:remarks])
177
178
  end
178
- if @row[:comment]
179
+ if @row[:comment] && @row[:comment] != "."
179
180
  n << RelatonBib::BiblioNote.new(type: "comment", content: @row[:comment])
180
181
  end
181
182
  RelatonBib::BiblioNoteCollection.new n
@@ -234,16 +235,27 @@ module Relaton3gpp
234
235
  end
235
236
 
236
237
  #
237
- # Create contributor
238
+ # Create contributors
238
239
  #
239
- # @return [Array<RelatonBib::Contribution>] contributor
240
+ # @return [Array<RelatonBib::ContributionInfo>] contributor
240
241
  #
241
- # def contributor
242
- # org = RelatonBib::Organization.new(
243
- # name: "Internet Assigned Numbers Authority", abbreviation: "IANA",
244
- # )
245
- # role = { type: "publisher" }
246
- # [RelatonBib::ContributionInfo.new(entity: org, role: [role])]
247
- # end
242
+ def parse_contributor # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
243
+ org = RelatonBib::Organization.new(
244
+ name: "3rd Generation Partnership Project", abbreviation: "3GPP",
245
+ )
246
+ contribs = [RelatonBib::ContributionInfo.new(entity: org, role: [type: "author"])]
247
+ return contribs unless @tstatus && @tstatus[:rapporteur]
248
+
249
+ aff = []
250
+ if @tstatus[:"rapp org"]
251
+ org = RelatonBib::Organization.new(name: @tstatus[:"rapp org"])
252
+ cn = RelatonBib::LocalizedString.new @tstatus[:rapporteur], "en", "Latn"
253
+ name = RelatonBib::FullName.new(completename: cn)
254
+ aff << RelatonBib::Affiliation.new(organization: org)
255
+ end
256
+ person = RelatonBib::Person.new(name: name, affiliation: aff)
257
+ role = { type: "author" }
258
+ contribs << RelatonBib::ContributionInfo.new(entity: person, role: [role])
259
+ end
248
260
  end
249
261
  end
@@ -52,10 +52,15 @@ module Relaton3gpp
52
52
  end
53
53
  end
54
54
 
55
+ #
56
+ # Render Hash.
57
+ #
58
+ # @return [Hash]
59
+ #
55
60
  def to_hash
56
61
  hash = {}
57
62
  instance_variables.each do |var|
58
- unless instance_variable_get(var).nil?
63
+ unless instance_variable_get(var).nil?
59
64
  hash[var.to_s.delete("@")] = instance_variable_get var
60
65
  end
61
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Relaton3gpp
4
- VERSION = "1.9.2"
4
+ VERSION = "1.10.1"
5
5
  end
data/relaton_3gpp.gemspec CHANGED
@@ -45,6 +45,6 @@ Gem::Specification.new do |spec|
45
45
  spec.add_development_dependency "webmock", "~> 3.14.0"
46
46
 
47
47
  spec.add_dependency "mdb", "~> 0.5.0"
48
- spec.add_dependency "relaton-bib", "~> 1.9.0"
48
+ spec.add_dependency "relaton-bib", "~> 1.10.1"
49
49
  spec.add_dependency "rubyzip", "~> 2.3.0"
50
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-3gpp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.2
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-12 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.9.0
145
+ version: 1.10.1
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.9.0
152
+ version: 1.10.1
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rubyzip
155
155
  requirement: !ruby/object:Gem::Requirement