relaton-3gpp 1.9.3 → 1.10.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd03b82770ff07a30f928c483e3958baacc4ea00724c2299c7ac276ae24380f3
4
- data.tar.gz: 0dfd8ddc26d71306f93dce4591173c31387f74832717d625b2d94406c9094677
3
+ metadata.gz: 1fe80e9a7c1d3fe486d97073fe91ef7a62b8c492b174a58a695e3ce0b9ffd08f
4
+ data.tar.gz: 738bef010298a3868bfa48d4dc885050abe8e82cd13d2986972af9cfc534ccb6
5
5
  SHA512:
6
- metadata.gz: 19fdb0f33718616a0589472504b51fbcf207dbdc4003c7958e4d59347022b38501f306720403abe892883221546bda70bf02023ed5dcdf449c7f3f40ca226036
7
- data.tar.gz: 95f0848300e19fd43ff189dedc64fdc4ae219354ae67ec79a1b2e6d8046825a33a7bade62832c230a4517d54f3ba1ce031ef53c731f122d34c6ca93cd0d5257a
6
+ metadata.gz: 510174a3e86318552a46ab29877bd3eca7e9da7519a223d28fc4a36a28057aee98dbbe53d5f122400b1684f9b2042109751c6a926b7c6a6b05bf4eb1f6fe06ee
7
+ data.tar.gz: e789cb690f01c661350015bcebdebb8d34eb9fb65d9c10dcc8e108ed6eb9d9480a0d5908f9611e0fc45a0bc945952b79293e9ca144a2cf7ee6853523fcf44737
@@ -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
  #
@@ -152,19 +151,21 @@ module Relaton3gpp
152
151
  # @return [RelatonBib::EditorialGroup] editorialgroups
153
152
  #
154
153
  def parse_editorialgroup # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
155
- wgp = RelatonBib::WorkGroup.new(name: @spec[:"WG prime"], type: "prime")
156
- eg = [RelatonBib::TechnicalCommittee.new(wgp)]
154
+ eg = [create_workgroup(@spec[:"WG prime"], "prime")]
157
155
  if @spec[:"WG other"] && @spec[:"WG other"] != "-"
158
- wgo = RelatonBib::WorkGroup.new(name: @spec[:"WG other"], type: "other")
159
- eg << RelatonBib::TechnicalCommittee.new(wgo)
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.3"
4
+ VERSION = "1.10.2"
5
5
  end
data/relaton_3gpp.gemspec CHANGED
@@ -45,6 +45,7 @@ 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 "net-ftp", "~> 0.1.0"
49
+ spec.add_dependency "relaton-bib", "~> 1.10.1"
49
50
  spec.add_dependency "rubyzip", "~> 2.3.0"
50
51
  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.3
4
+ version: 1.10.2
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-20 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -136,20 +136,34 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.5.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: net-ftp
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.1.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.1.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: relaton-bib
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: 1.9.0
159
+ version: 1.10.1
146
160
  type: :runtime
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: 1.9.0
166
+ version: 1.10.1
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: rubyzip
155
169
  requirement: !ruby/object:Gem::Requirement