relaton-calconnect 1.0.0 → 1.4.0

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.
@@ -1,4 +1,4 @@
1
- require "relaton_iso_bib"
1
+ require "relaton_bib"
2
2
  require "relaton_calconnect/version"
3
3
  require "relaton_calconnect/cc_bibliography"
4
4
  require "relaton_calconnect/hit_collection"
@@ -1,5 +1,5 @@
1
1
  module RelatonCalconnect
2
- class CcBibliographicItem < RelatonIsoBib::IsoBibliographicItem
2
+ class CcBibliographicItem < RelatonBib::BibliographicItem
3
3
  TYPES = %w[
4
4
  directive guide specification standard report administrative amendment
5
5
  technical\ corrigendum advisory
@@ -1,5 +1,4 @@
1
1
  module RelatonCalconnect
2
- class HashConverter < RelatonIsoBib::HashConverter
3
-
2
+ class HashConverter < RelatonBib::HashConverter
4
3
  end
5
4
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonCalconnect
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.4.0".freeze
3
3
  end
@@ -1,15 +1,11 @@
1
1
  module RelatonCalconnect
2
- class XMLParser < RelatonIsoBib::XMLParser
2
+ class XMLParser < RelatonBib::XMLParser
3
3
  class << self
4
- def from_xml(xml)
5
- doc = Nokogiri::XML xml
6
- doc.remove_namespaces!
7
- cctitem = doc.at("/bibitem|/bibdata")
8
- if cctitem
9
- CcBibliographicItem.new(item_data(cctitem))
10
- else
11
- warn "[relaton-calconnect] can't find bibitem or bibdata element in the XML"
12
- end
4
+ # override RelatonBib::BibliographicItem.bib_item method
5
+ # @param item_hash [Hash]
6
+ # @return [RelatonIsoBib::IsoBibliographicItem]
7
+ def bib_item(item_hash)
8
+ CcBibliographicItem.new item_hash
13
9
  end
14
10
  end
15
11
  end
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "webmock"
38
38
 
39
39
  spec.add_dependency "faraday"
40
- spec.add_dependency "relaton-iso-bib", "~> 1.0.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.4.0"
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-calconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-25 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -151,19 +151,19 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: relaton-iso-bib
154
+ name: relaton-bib
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.0.0
159
+ version: 1.4.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.0.0
166
+ version: 1.4.0
167
167
  description: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
168
168
  model'
169
169
  email:
@@ -189,7 +189,6 @@ files:
189
189
  - grammars/biblio.rng
190
190
  - grammars/csd.rng
191
191
  - grammars/isodoc.rng
192
- - grammars/isostandard.rng
193
192
  - grammars/reqt.rng
194
193
  - lib/relaton_calconnect.rb
195
194
  - lib/relaton_calconnect/cc_bibliographic_item.rb
@@ -206,7 +205,7 @@ homepage: https://github.com/relaton/relaton-calconnect
206
205
  licenses:
207
206
  - BSD-2-Clause
208
207
  metadata: {}
209
- post_install_message:
208
+ post_install_message:
210
209
  rdoc_options: []
211
210
  require_paths:
212
211
  - lib
@@ -222,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
221
  version: '0'
223
222
  requirements: []
224
223
  rubygems_version: 3.0.6
225
- signing_key:
224
+ signing_key:
226
225
  specification_version: 4
227
226
  summary: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
228
227
  model'
@@ -1,522 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
4
- <include href="isodoc.rng">
5
- <start>
6
- <ref name="iso-standard"/>
7
- </start>
8
- <define name="organization">
9
- <element name="organization">
10
- <oneOrMore>
11
- <ref name="orgname"/>
12
- </oneOrMore>
13
- <optional>
14
- <ref name="abbreviation"/>
15
- </optional>
16
- <optional>
17
- <ref name="uri"/>
18
- </optional>
19
- <zeroOrMore>
20
- <ref name="org-identifier"/>
21
- </zeroOrMore>
22
- <zeroOrMore>
23
- <ref name="contact"/>
24
- </zeroOrMore>
25
- <optional>
26
- <ref name="technical-committee"/>
27
- </optional>
28
- <optional>
29
- <ref name="subcommittee"/>
30
- </optional>
31
- <optional>
32
- <ref name="workgroup"/>
33
- </optional>
34
- <optional>
35
- <ref name="secretariat"/>
36
- </optional>
37
- </element>
38
- </define>
39
- <define name="BibDataExtensionType">
40
- <ref name="doctype"/>
41
- <ref name="editorialgroup"/>
42
- <zeroOrMore>
43
- <ref name="ics"/>
44
- </zeroOrMore>
45
- <ref name="structuredidentifier"/>
46
- <optional>
47
- <ref name="stagename"/>
48
- </optional>
49
- </define>
50
- <define name="bdate">
51
- <element name="date">
52
- <attribute name="type">
53
- <choice>
54
- <ref name="BibliographicDateType"/>
55
- <text/>
56
- </choice>
57
- </attribute>
58
- <choice>
59
- <group>
60
- <element name="from">
61
- <ref name="ISO8601Date"/>
62
- </element>
63
- <optional>
64
- <element name="to">
65
- <ref name="ISO8601Date"/>
66
- </element>
67
- </optional>
68
- </group>
69
- <element name="on">
70
- <choice>
71
- <ref name="ISO8601Date"/>
72
- <value>--</value>
73
- <value>–</value>
74
- </choice>
75
- </element>
76
- </choice>
77
- </element>
78
- </define>
79
- <define name="ul">
80
- <element name="ul">
81
- <attribute name="id">
82
- <data type="ID"/>
83
- </attribute>
84
- <oneOrMore>
85
- <ref name="ul_li"/>
86
- </oneOrMore>
87
- <zeroOrMore>
88
- <ref name="note"/>
89
- </zeroOrMore>
90
- </element>
91
- </define>
92
- <define name="sections">
93
- <element name="sections">
94
- <ref name="clause"/>
95
- <optional>
96
- <choice>
97
- <ref name="term-clause"/>
98
- <ref name="terms"/>
99
- </choice>
100
- </optional>
101
- <optional>
102
- <ref name="definitions"/>
103
- </optional>
104
- <oneOrMore>
105
- <ref name="clause"/>
106
- </oneOrMore>
107
- </element>
108
- </define>
109
- <define name="Clause-Section">
110
- <optional>
111
- <attribute name="id">
112
- <data type="ID"/>
113
- </attribute>
114
- </optional>
115
- <optional>
116
- <attribute name="language"/>
117
- </optional>
118
- <optional>
119
- <attribute name="script"/>
120
- </optional>
121
- <optional>
122
- <attribute name="inline-header">
123
- <data type="boolean"/>
124
- </attribute>
125
- </optional>
126
- <optional>
127
- <attribute name="obligation">
128
- <choice>
129
- <value>normative</value>
130
- <value>informative</value>
131
- </choice>
132
- </attribute>
133
- </optional>
134
- <optional>
135
- <ref name="section-title"/>
136
- </optional>
137
- <choice>
138
- <group>
139
- <oneOrMore>
140
- <ref name="BasicBlock"/>
141
- </oneOrMore>
142
- <zeroOrMore>
143
- <ref name="note"/>
144
- </zeroOrMore>
145
- </group>
146
- <oneOrMore>
147
- <ref name="clause-subsection"/>
148
- </oneOrMore>
149
- </choice>
150
- </define>
151
- <define name="term">
152
- <element name="term">
153
- <optional>
154
- <attribute name="id">
155
- <data type="ID"/>
156
- </attribute>
157
- </optional>
158
- <ref name="preferred"/>
159
- <zeroOrMore>
160
- <ref name="admitted"/>
161
- </zeroOrMore>
162
- <zeroOrMore>
163
- <ref name="deprecates"/>
164
- </zeroOrMore>
165
- <optional>
166
- <ref name="termdomain"/>
167
- </optional>
168
- <ref name="definition"/>
169
- <zeroOrMore>
170
- <ref name="termnote"/>
171
- </zeroOrMore>
172
- <zeroOrMore>
173
- <ref name="termexample"/>
174
- </zeroOrMore>
175
- <zeroOrMore>
176
- <ref name="termsource"/>
177
- </zeroOrMore>
178
- </element>
179
- </define>
180
- <define name="definition">
181
- <element name="definition">
182
- <oneOrMore>
183
- <choice>
184
- <ref name="paragraph"/>
185
- <ref name="figure"/>
186
- <ref name="formula"/>
187
- </choice>
188
- </oneOrMore>
189
- </element>
190
- </define>
191
- <define name="annex">
192
- <element name="annex">
193
- <optional>
194
- <attribute name="id">
195
- <data type="ID"/>
196
- </attribute>
197
- </optional>
198
- <optional>
199
- <attribute name="language"/>
200
- </optional>
201
- <optional>
202
- <attribute name="script"/>
203
- </optional>
204
- <optional>
205
- <attribute name="inline-header">
206
- <data type="boolean"/>
207
- </attribute>
208
- </optional>
209
- <optional>
210
- <attribute name="obligation">
211
- <choice>
212
- <value>normative</value>
213
- <value>informative</value>
214
- </choice>
215
- </attribute>
216
- </optional>
217
- <optional>
218
- <ref name="section-title"/>
219
- </optional>
220
- <zeroOrMore>
221
- <!--
222
- allow hanging paragraps in annexes: they introduce lists
223
- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
224
- -->
225
- <ref name="BasicBlock"/>
226
- </zeroOrMore>
227
- <zeroOrMore>
228
- <ref name="note"/>
229
- </zeroOrMore>
230
- <zeroOrMore>
231
- <ref name="clause-hanging-paragraph-with-footnote"/>
232
- </zeroOrMore>
233
- <zeroOrMore>
234
- <ref name="annex-appendix"/>
235
- </zeroOrMore>
236
- </element>
237
- </define>
238
- <define name="AdmonitionType">
239
- <choice>
240
- <value>danger</value>
241
- <value>caution</value>
242
- <value>warning</value>
243
- <value>important</value>
244
- <value>safety precautions</value>
245
- </choice>
246
- </define>
247
- <define name="preface">
248
- <element name="preface">
249
- <optional>
250
- <ref name="preface_abstract"/>
251
- </optional>
252
- <ref name="foreword"/>
253
- <optional>
254
- <ref name="introduction"/>
255
- </optional>
256
- </element>
257
- </define>
258
- <define name="DocumentType">
259
- <choice>
260
- <value>international-standard</value>
261
- <value>technical-specification</value>
262
- <value>technical-report</value>
263
- <value>publicly-available-specification</value>
264
- <value>international-workshop-agreement</value>
265
- <value>guide</value>
266
- </choice>
267
- </define>
268
- <define name="structuredidentifier">
269
- <element name="structuredidentifier">
270
- <optional>
271
- <attribute name="type"/>
272
- </optional>
273
- <group>
274
- <ref name="documentnumber"/>
275
- <optional>
276
- <ref name="tc-documentnumber"/>
277
- </optional>
278
- </group>
279
- </element>
280
- </define>
281
- <define name="foreword">
282
- <element name="foreword">
283
- <ref name="Basic-Section"/>
284
- </element>
285
- </define>
286
- <define name="introduction">
287
- <element name="introduction">
288
- <ref name="Content-Section"/>
289
- </element>
290
- </define>
291
- <define name="editorialgroup">
292
- <element name="editorialgroup">
293
- <oneOrMore>
294
- <ref name="technical-committee"/>
295
- </oneOrMore>
296
- <zeroOrMore>
297
- <ref name="subcommittee"/>
298
- </zeroOrMore>
299
- <zeroOrMore>
300
- <ref name="workgroup"/>
301
- </zeroOrMore>
302
- <optional>
303
- <ref name="secretariat"/>
304
- </optional>
305
- </element>
306
- </define>
307
- <define name="Content-Section">
308
- <optional>
309
- <attribute name="id">
310
- <data type="ID"/>
311
- </attribute>
312
- </optional>
313
- <optional>
314
- <attribute name="language"/>
315
- </optional>
316
- <optional>
317
- <attribute name="script"/>
318
- </optional>
319
- <optional>
320
- <attribute name="obligation">
321
- <choice>
322
- <value>normative</value>
323
- <value>informative</value>
324
- </choice>
325
- </attribute>
326
- </optional>
327
- <optional>
328
- <ref name="section-title"/>
329
- </optional>
330
- <choice>
331
- <group>
332
- <zeroOrMore>
333
- <ref name="BasicBlock"/>
334
- </zeroOrMore>
335
- <zeroOrMore>
336
- <ref name="note"/>
337
- </zeroOrMore>
338
- </group>
339
- <oneOrMore>
340
- <ref name="content-subsection"/>
341
- </oneOrMore>
342
- </choice>
343
- </define>
344
- <define name="table">
345
- <element name="table">
346
- <attribute name="id">
347
- <data type="ID"/>
348
- </attribute>
349
- <optional>
350
- <attribute name="width"/>
351
- </optional>
352
- <optional>
353
- <attribute name="unnumbered">
354
- <data type="boolean"/>
355
- </attribute>
356
- </optional>
357
- <optional>
358
- <attribute name="subsequence"/>
359
- </optional>
360
- <optional>
361
- <attribute name="alt"/>
362
- </optional>
363
- <optional>
364
- <attribute name="summary"/>
365
- </optional>
366
- <optional>
367
- <attribute name="uri">
368
- <data type="anyURI"/>
369
- </attribute>
370
- </optional>
371
- <optional>
372
- <ref name="tname"/>
373
- </optional>
374
- <optional>
375
- <ref name="thead"/>
376
- </optional>
377
- <ref name="tbody"/>
378
- <optional>
379
- <ref name="tfoot"/>
380
- </optional>
381
- <zeroOrMore>
382
- <ref name="table-note"/>
383
- </zeroOrMore>
384
- <optional>
385
- <ref name="dl"/>
386
- </optional>
387
- </element>
388
- </define>
389
- </include>
390
- <!-- end overrides -->
391
- <!--
392
- We display the Normative References between scope and terms; but to keep the
393
- grammar simple, we keep the references together
394
- -->
395
- <define name="iso-standard">
396
- <element name="iso-standard">
397
- <ref name="bibdata"/>
398
- <zeroOrMore>
399
- <ref name="termdocsource"/>
400
- </zeroOrMore>
401
- <optional>
402
- <ref name="boilerplate"/>
403
- </optional>
404
- <ref name="preface"/>
405
- <oneOrMore>
406
- <ref name="sections"/>
407
- </oneOrMore>
408
- <zeroOrMore>
409
- <ref name="annex"/>
410
- </zeroOrMore>
411
- <ref name="bibliography"/>
412
- </element>
413
- </define>
414
- <define name="documentnumber">
415
- <element name="project-number">
416
- <optional>
417
- <attribute name="part">
418
- <data type="int"/>
419
- </attribute>
420
- </optional>
421
- <optional>
422
- <attribute name="subpart">
423
- <data type="int"/>
424
- </attribute>
425
- </optional>
426
- <text/>
427
- </element>
428
- </define>
429
- <define name="tc-documentnumber">
430
- <element name="tc-document-number">
431
- <data type="int"/>
432
- </element>
433
- </define>
434
- <define name="subcommittee">
435
- <element name="subcommittee">
436
- <ref name="IsoWorkgroup"/>
437
- </element>
438
- </define>
439
- <define name="workgroup">
440
- <element name="workgroup">
441
- <ref name="IsoWorkgroup"/>
442
- </element>
443
- </define>
444
- <define name="secretariat">
445
- <element name="secretariat">
446
- <text/>
447
- </element>
448
- </define>
449
- <define name="clause-hanging-paragraph-with-footnote">
450
- <element name="clause">
451
- <optional>
452
- <attribute name="id">
453
- <data type="ID"/>
454
- </attribute>
455
- </optional>
456
- <optional>
457
- <attribute name="language"/>
458
- </optional>
459
- <optional>
460
- <attribute name="script"/>
461
- </optional>
462
- <optional>
463
- <attribute name="inline-header">
464
- <data type="boolean"/>
465
- </attribute>
466
- </optional>
467
- <optional>
468
- <attribute name="obligation">
469
- <choice>
470
- <value>normative</value>
471
- <value>informative</value>
472
- </choice>
473
- </attribute>
474
- </optional>
475
- <optional>
476
- <ref name="section-title"/>
477
- </optional>
478
- <zeroOrMore>
479
- <!-- allow hanging paragraphs in annexes: they introduce lists -->
480
- <ref name="BasicBlock"/>
481
- </zeroOrMore>
482
- <zeroOrMore>
483
- <ref name="note"/>
484
- </zeroOrMore>
485
- <zeroOrMore>
486
- <ref name="clause-hanging-paragraph-with-footnote"/>
487
- </zeroOrMore>
488
- </element>
489
- </define>
490
- <define name="annex-appendix">
491
- <element name="appendix">
492
- <ref name="Clause-Section"/>
493
- </element>
494
- </define>
495
- <define name="ul_li">
496
- <element name="li">
497
- <optional>
498
- <attribute name="id">
499
- <data type="ID"/>
500
- </attribute>
501
- </optional>
502
- <optional>
503
- <attribute name="uncheckedcheckbox">
504
- <data type="boolean"/>
505
- </attribute>
506
- </optional>
507
- <optional>
508
- <attribute name="checkedcheckbox">
509
- <data type="boolean"/>
510
- </attribute>
511
- </optional>
512
- <oneOrMore>
513
- <ref name="paragraph-with-footnote"/>
514
- </oneOrMore>
515
- </element>
516
- </define>
517
- <define name="stagename">
518
- <element name="stagename">
519
- <text/>
520
- </element>
521
- </define>
522
- </grammar>