relaton-iso 1.19.2 → 2.0.0.pre.alpha.1

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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/Gemfile +1 -0
  4. data/README.adoc +134 -131
  5. data/bin/console +1 -1
  6. data/grammars/basicdoc.rng +2110 -0
  7. data/grammars/biblio-standoc.rng +287 -0
  8. data/grammars/biblio.rng +2097 -0
  9. data/grammars/relaton-iso-compile.rng +11 -0
  10. data/grammars/relaton-iso.rng +214 -0
  11. data/lib/relaton/iso/bibliography.rb +206 -0
  12. data/lib/relaton/iso/data_fetcher.rb +227 -0
  13. data/lib/relaton/iso/hash_parser_v1.rb +121 -0
  14. data/lib/relaton/iso/hit.rb +62 -0
  15. data/lib/relaton/iso/hit_collection.rb +117 -0
  16. data/lib/relaton/iso/item_data.rb +49 -0
  17. data/lib/relaton/iso/model/bibdata.rb +9 -0
  18. data/lib/relaton/iso/model/bibitem.rb +7 -0
  19. data/lib/relaton/iso/model/contributor.rb +7 -0
  20. data/lib/relaton/iso/model/contributor_info.rb +9 -0
  21. data/lib/relaton/iso/model/docidentifier.rb +128 -0
  22. data/lib/relaton/iso/model/doctype.rb +13 -0
  23. data/lib/relaton/iso/model/ext.rb +47 -0
  24. data/lib/relaton/iso/model/iso_project_group.rb +21 -0
  25. data/lib/relaton/iso/model/item.rb +17 -0
  26. data/lib/relaton/iso/model/item_base.rb +19 -0
  27. data/lib/relaton/iso/model/organization.rb +9 -0
  28. data/lib/relaton/iso/model/project_number.rb +22 -0
  29. data/lib/relaton/iso/model/relation.rb +9 -0
  30. data/lib/relaton/iso/model/stagename.rb +14 -0
  31. data/lib/relaton/iso/model/structured_identifier.rb +31 -0
  32. data/lib/relaton/iso/processor.rb +78 -0
  33. data/lib/relaton/iso/queue.rb +63 -0
  34. data/lib/relaton/iso/scraper.rb +591 -0
  35. data/lib/relaton/iso/util.rb +8 -0
  36. data/lib/relaton/iso/version.rb +7 -0
  37. data/lib/relaton/iso.rb +17 -0
  38. data/relaton_iso.gemspec +9 -7
  39. metadata +79 -49
  40. data/bin/bundle +0 -109
  41. data/bin/byebug +0 -27
  42. data/bin/coderay +0 -27
  43. data/bin/gdb_wrapper +0 -29
  44. data/bin/htmldiff +0 -27
  45. data/bin/httpclient +0 -29
  46. data/bin/ldiff +0 -27
  47. data/bin/nokogiri +0 -27
  48. data/bin/pry +0 -27
  49. data/bin/pubid-nist +0 -27
  50. data/bin/racc +0 -27
  51. data/bin/rackup +0 -29
  52. data/bin/rake +0 -27
  53. data/bin/rubocop +0 -27
  54. data/bin/ruby-parse +0 -27
  55. data/bin/ruby-rewrite +0 -27
  56. data/bin/safe_yaml +0 -29
  57. data/bin/thor +0 -27
  58. data/lib/relaton_iso/data_fetcher.rb +0 -246
  59. data/lib/relaton_iso/document_identifier.rb +0 -46
  60. data/lib/relaton_iso/hash_converter.rb +0 -15
  61. data/lib/relaton_iso/hit.rb +0 -59
  62. data/lib/relaton_iso/hit_collection.rb +0 -100
  63. data/lib/relaton_iso/iso_bibliography.rb +0 -202
  64. data/lib/relaton_iso/processor.rb +0 -67
  65. data/lib/relaton_iso/queue.rb +0 -61
  66. data/lib/relaton_iso/scrapper.rb +0 -553
  67. data/lib/relaton_iso/util.rb +0 -6
  68. data/lib/relaton_iso/version.rb +0 -5
  69. data/lib/relaton_iso.rb +0 -17
@@ -0,0 +1,287 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
5
+ of relaton
6
+
7
+ Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
8
+ (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
9
+ -->
10
+ <include href="biblio.rng">
11
+ <define name="BibData">
12
+ <a:documentation>The bibliographic description of a standardisation document</a:documentation>
13
+ <ref name="StandardBibliographicItem"/>
14
+ <optional>
15
+ <ref name="ext">
16
+ <a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
17
+ </ref>
18
+ </optional>
19
+ </define>
20
+ <define name="docrelation">
21
+ <a:documentation>Update to StandardReducedBibliographicItem</a:documentation>
22
+ <element name="relation">
23
+ <attribute name="type">
24
+ <ref name="DocRelationType"/>
25
+ </attribute>
26
+ <optional>
27
+ <element name="description">
28
+ <ref name="LocalizedMarkedUpString"/>
29
+ </element>
30
+ </optional>
31
+ <element name="bibitem">
32
+ <ref name="StandardReducedBibliographicItem"/>
33
+ </element>
34
+ <choice>
35
+ <zeroOrMore>
36
+ <ref name="locality"/>
37
+ </zeroOrMore>
38
+ <zeroOrMore>
39
+ <ref name="localityStack"/>
40
+ </zeroOrMore>
41
+ </choice>
42
+ <choice>
43
+ <zeroOrMore>
44
+ <ref name="sourceLocality"/>
45
+ </zeroOrMore>
46
+ <zeroOrMore>
47
+ <ref name="sourceLocalityStack"/>
48
+ </zeroOrMore>
49
+ </choice>
50
+ </element>
51
+ </define>
52
+ </include>
53
+ <define name="ext">
54
+ <a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
55
+ <element name="ext">
56
+ <ref name="BibDataExtensionType"/>
57
+ </element>
58
+ </define>
59
+ <define name="BibDataExtensionType">
60
+ <optional>
61
+ <attribute name="schema-version">
62
+ <a:documentation>The version of the flavour-specific schema that this extension point conforms to</a:documentation>
63
+ </attribute>
64
+ </optional>
65
+ <ref name="doctype">
66
+ <a:documentation>Classification of the standardisation document that is treated as a distinct series by the
67
+ standards defining organization, and that is rendered in a distinct manner</a:documentation>
68
+ </ref>
69
+ <optional>
70
+ <ref name="docsubtype">
71
+ <a:documentation>Subclass of the standardisation document, that is treated or processed differently
72
+ from other documents in the same doctype</a:documentation>
73
+ </ref>
74
+ </optional>
75
+ <ref name="flavor">
76
+ <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
77
+ </ref>
78
+ <optional>
79
+ <ref name="editorialgroup">
80
+ <a:documentation>Groups associated with the production of the standards document, typically within
81
+ a standards definition organization</a:documentation>
82
+ </ref>
83
+ </optional>
84
+ <zeroOrMore>
85
+ <ref name="ics">
86
+ <a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
87
+ </ref>
88
+ </zeroOrMore>
89
+ <zeroOrMore>
90
+ <ref name="structuredidentifier">
91
+ <a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
92
+ </ref>
93
+ </zeroOrMore>
94
+ </define>
95
+ <define name="doctype">
96
+ <a:documentation>Classification of the standardisation document</a:documentation>
97
+ <element name="doctype">
98
+ <optional>
99
+ <attribute name="abbreviation">
100
+ <a:documentation>Standard abbreviation for the doctype value used by the standards defining organization</a:documentation>
101
+ </attribute>
102
+ </optional>
103
+ <ref name="DocumentType">
104
+ <a:documentation>Name of the doctype</a:documentation>
105
+ </ref>
106
+ </element>
107
+ </define>
108
+ <define name="DocumentType">
109
+ <text/>
110
+ </define>
111
+ <define name="docsubtype">
112
+ <element name="subdoctype">
113
+ <ref name="DocumentSubtype"/>
114
+ </element>
115
+ </define>
116
+ <define name="DocumentSubtype">
117
+ <text/>
118
+ </define>
119
+ <define name="flavor">
120
+ <element name="flavor">
121
+ <ref name="MetanormaFlavor"/>
122
+ </element>
123
+ </define>
124
+ <define name="MetanormaFlavor">
125
+ <a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
126
+ However we prefer not to hardcode it, given ongoing extension.</a:documentation>
127
+ <text/>
128
+ </define>
129
+ <define name="editorialgroup">
130
+ <a:documentation>A group associated with the production of the standards document, typically within
131
+ a standards definition organization</a:documentation>
132
+ <element name="editorialgroup">
133
+ <oneOrMore>
134
+ <ref name="technical-committee">
135
+ <a:documentation>A technical committee associated with the production of the standards document</a:documentation>
136
+ </ref>
137
+ </oneOrMore>
138
+ </element>
139
+ </define>
140
+ <define name="technical-committee">
141
+ <a:documentation>Technical committee associated with the production of a standards document</a:documentation>
142
+ <element name="technical-committee">
143
+ <ref name="IsoWorkgroup"/>
144
+ </element>
145
+ </define>
146
+ <define name="IsoWorkgroup">
147
+ <optional>
148
+ <attribute name="number">
149
+ <a:documentation>Numeric identifier of the technical committee</a:documentation>
150
+ </attribute>
151
+ </optional>
152
+ <optional>
153
+ <attribute name="type">
154
+ <a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
155
+ </attribute>
156
+ </optional>
157
+ <optional>
158
+ <attribute name="identifier">
159
+ <a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
160
+ </attribute>
161
+ </optional>
162
+ <optional>
163
+ <attribute name="prefix">
164
+ <a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
165
+ typically indicating its type</a:documentation>
166
+ </attribute>
167
+ </optional>
168
+ <text>
169
+ <a:documentation>Name of the technical committee</a:documentation>
170
+ </text>
171
+ </define>
172
+ <define name="ics">
173
+ <a:documentation>Classification taken from the International Classification of Standards.
174
+ ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
175
+ <element name="ics">
176
+ <element name="code">
177
+ <a:documentation>Classification code taken from the ICS</a:documentation>
178
+ <text/>
179
+ </element>
180
+ <optional>
181
+ <element name="text">
182
+ <a:documentation>Text string associated with the classification code</a:documentation>
183
+ <text/>
184
+ </element>
185
+ </optional>
186
+ </element>
187
+ </define>
188
+ <define name="structuredidentifier">
189
+ <a:documentation>Representation of the identifier for a standardisation document, giving its individual semantic components</a:documentation>
190
+ <element name="structuredidentifier">
191
+ <optional>
192
+ <attribute name="type">
193
+ <a:documentation>Representation in the identifier of the type of standard document, corresponds to bibitem/ext/doctype</a:documentation>
194
+ </attribute>
195
+ </optional>
196
+ <oneOrMore>
197
+ <element name="agency">
198
+ <a:documentation>Representation in the identifier of the agency responsible for the standard document</a:documentation>
199
+ <text/>
200
+ </element>
201
+ </oneOrMore>
202
+ <optional>
203
+ <element name="class">
204
+ <a:documentation>Representation in the identifier of the class of standard document (as a subclass of the document type),
205
+ corresponds to bibitem/item/docsubtype</a:documentation>
206
+ <text/>
207
+ </element>
208
+ </optional>
209
+ <element name="docnumber">
210
+ <a:documentation>Representation in the identifier of the (typically numeric) component uniquely identifying the document
211
+ or standard. If a document includes parts or supplements, the docnumber identifies the document as whole,
212
+ and not those document components</a:documentation>
213
+ <text/>
214
+ </element>
215
+ <optional>
216
+ <element name="partnumber">
217
+ <a:documentation>Representation in the identifier of the document part, if this is a document part. May be compound</a:documentation>
218
+ <text/>
219
+ </element>
220
+ </optional>
221
+ <optional>
222
+ <element name="edition">
223
+ <a:documentation>Representation in the identifier of the document edition, if this is a published document</a:documentation>
224
+ <text/>
225
+ </element>
226
+ </optional>
227
+ <optional>
228
+ <element name="version">
229
+ <a:documentation>Representation in the identifier of the document version, which can include document drafts</a:documentation>
230
+ <text/>
231
+ </element>
232
+ </optional>
233
+ <optional>
234
+ <element name="supplementtype">
235
+ <a:documentation>Representation in the identifier of the type of document supplement, if this is a document supplement</a:documentation>
236
+ <text/>
237
+ </element>
238
+ </optional>
239
+ <optional>
240
+ <element name="supplementnumber">
241
+ <a:documentation>Representation in the identifier of the document supplement, if this is a document supplement</a:documentation>
242
+ <text/>
243
+ </element>
244
+ </optional>
245
+ <optional>
246
+ <element name="amendment">
247
+ <a:documentation>Representation in the identifier of the document amendment, if this is a document amendment</a:documentation>
248
+ <text/>
249
+ </element>
250
+ </optional>
251
+ <optional>
252
+ <element name="corrigendum">
253
+ <a:documentation>Representation in the identifier of the document corrigendum, if this is a document corrigendum</a:documentation>
254
+ <text/>
255
+ </element>
256
+ </optional>
257
+ <optional>
258
+ <element name="language">
259
+ <a:documentation>Representation in the identifier of the language of the document</a:documentation>
260
+ <text/>
261
+ </element>
262
+ </optional>
263
+ <optional>
264
+ <element name="year">
265
+ <a:documentation>Representation in the identifier of the year of publication or issuance of the document</a:documentation>
266
+ <text/>
267
+ </element>
268
+ </optional>
269
+ </element>
270
+ </define>
271
+ <define name="StandardBibliographicItem">
272
+ <ref name="BibliographicItem"/>
273
+ <zeroOrMore>
274
+ <ref name="amend">
275
+ <a:documentation>Description of changes specific to this document</a:documentation>
276
+ </ref>
277
+ </zeroOrMore>
278
+ </define>
279
+ <define name="StandardReducedBibliographicItem">
280
+ <ref name="ReducedBibliographicItem"/>
281
+ <zeroOrMore>
282
+ <ref name="amend">
283
+ <a:documentation>Description of changes specific to this document</a:documentation>
284
+ </ref>
285
+ </zeroOrMore>
286
+ </define>
287
+ </grammar>