relaton-ogc 1.0.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +1 -0
- data/.rubocop.yml +2 -2
- data/README.adoc +12 -5
- data/grammars/biblio.rng +89 -32
- data/grammars/isodoc.rng +580 -25
- data/grammars/ogc.rng +1 -1
- data/lib/relaton_ogc/editorial_group.rb +16 -0
- data/lib/relaton_ogc/hash_converter.rb +2 -2
- data/lib/relaton_ogc/ogc_bibliographic_item.rb +27 -2
- data/lib/relaton_ogc/ogc_bibliography.rb +2 -2
- data/lib/relaton_ogc/scrapper.rb +3 -11
- data/lib/relaton_ogc/version.rb +1 -1
- data/lib/relaton_ogc/xml_parser.rb +7 -13
- data/relaton_ogc.gemspec +3 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61e0fa8b5d0b490c0f9202c6810b4e14b86d159d8f1597117585a1483abaf017
|
4
|
+
data.tar.gz: 89ec958bb6e7a8fcdc7d396f3acbf50c42c6cdf6ca1162368796450412c659a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e73e39acf5542e32647ad6a37a3dde030303a9b1a53c771c611a31fb825ddfdda5cc9c3ceb80e4f8ed51649c2d061c9dfaa0cba704609499ef8da29823f045b
|
7
|
+
data.tar.gz: 750aa6c94fffa2f464cccc6e6cd00fc1f4e26dd81c86351877bac886188a9f69566e95764df814ba918f6922b02cf29289699e29175d3ea8f35ff0e1cfc342d9
|
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -18,7 +18,7 @@ Add this line to your application's Gemfile:
|
|
18
18
|
|
19
19
|
[source,ruby]
|
20
20
|
----
|
21
|
-
gem '
|
21
|
+
gem 'relaton-ogc'
|
22
22
|
----
|
23
23
|
|
24
24
|
And then execute:
|
@@ -27,7 +27,7 @@ And then execute:
|
|
27
27
|
|
28
28
|
Or install it yourself as:
|
29
29
|
|
30
|
-
$ gem install
|
30
|
+
$ gem install relaton-ogc
|
31
31
|
|
32
32
|
== Usage
|
33
33
|
|
@@ -35,8 +35,11 @@ Or install it yourself as:
|
|
35
35
|
|
36
36
|
[source,ruby]
|
37
37
|
----
|
38
|
+
require 'relaton_ogc'
|
39
|
+
=> true
|
40
|
+
|
38
41
|
hits = RelatonOgc::OgcBibliography.search("OGC 19-025r1")
|
39
|
-
=>
|
42
|
+
=> <RelatonOgc::HitCollection:0x007fcc8e085ba8 @ref=OGC 19-025r1 @fetched=false>
|
40
43
|
|
41
44
|
tem = hits[0].fetch
|
42
45
|
=> #<RelatonOgc::OgcBibliographicItem:0x007fcab3cb4758
|
@@ -72,7 +75,10 @@ item.to_xml bibdata: true
|
|
72
75
|
</date>
|
73
76
|
...
|
74
77
|
<ext>
|
75
|
-
<doctype>
|
78
|
+
<doctype>engineering-report</doctype>
|
79
|
+
<editorialgroup>
|
80
|
+
<committee>technical</committee>
|
81
|
+
</editorialgroup>
|
76
82
|
</ext>
|
77
83
|
</bibdata>"
|
78
84
|
----
|
@@ -81,7 +87,8 @@ item.to_xml bibdata: true
|
|
81
87
|
[source,ruby]
|
82
88
|
----
|
83
89
|
RelatonOgc::OgcBibliography.get "OGC 19-025r1", "2019", {}
|
84
|
-
|
90
|
+
[relaton-ogc] ("OGC 19-025r1") fetching...
|
91
|
+
[relaton-ogc] ("OGC 19-025r1") found 19-025r1
|
85
92
|
=> #<RelatonOgc::OgcBibliographicItem:0x007fc322e9aba0
|
86
93
|
...
|
87
94
|
----
|
data/grammars/biblio.rng
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
<text/>
|
89
89
|
</element>
|
90
90
|
</define>
|
91
|
-
<define name="
|
91
|
+
<define name="LocalizedString1">
|
92
92
|
<optional>
|
93
93
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
94
94
|
<attribute name="language"/>
|
@@ -98,6 +98,16 @@
|
|
98
98
|
</optional>
|
99
99
|
<text/>
|
100
100
|
</define>
|
101
|
+
<define name="LocalizedString">
|
102
|
+
<choice>
|
103
|
+
<ref name="LocalizedString1"/>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="variant">
|
106
|
+
<ref name="LocalizedString1"/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
</choice>
|
110
|
+
</define>
|
101
111
|
<!--
|
102
112
|
Unlike UML, change type to format: type is overloaded
|
103
113
|
Would be need if plain were default value and could omit the attribute
|
@@ -121,7 +131,7 @@
|
|
121
131
|
</optional>
|
122
132
|
<ref name="LocalizedStringOrXsAny"/>
|
123
133
|
</define>
|
124
|
-
<define name="
|
134
|
+
<define name="LocalizedStringOrXsAny1">
|
125
135
|
<optional>
|
126
136
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
127
137
|
<attribute name="language"/>
|
@@ -136,6 +146,16 @@
|
|
136
146
|
</choice>
|
137
147
|
</oneOrMore>
|
138
148
|
</define>
|
149
|
+
<define name="LocalizedStringOrXsAny">
|
150
|
+
<choice>
|
151
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
152
|
+
<oneOrMore>
|
153
|
+
<element name="variant">
|
154
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
155
|
+
</element>
|
156
|
+
</oneOrMore>
|
157
|
+
</choice>
|
158
|
+
</define>
|
139
159
|
<define name="contributor">
|
140
160
|
<element name="contributor">
|
141
161
|
<zeroOrMore>
|
@@ -512,7 +532,7 @@
|
|
512
532
|
</define>
|
513
533
|
<define name="LocalityType">
|
514
534
|
<data type="string">
|
515
|
-
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|locality:[a-zA-Z0-9_]+</param>
|
535
|
+
<param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
|
516
536
|
</data>
|
517
537
|
</define>
|
518
538
|
<define name="referenceFrom">
|
@@ -641,9 +661,9 @@
|
|
641
661
|
<optional>
|
642
662
|
<ref name="status"/>
|
643
663
|
</optional>
|
644
|
-
<
|
664
|
+
<zeroOrMore>
|
645
665
|
<ref name="copyright"/>
|
646
|
-
</
|
666
|
+
</zeroOrMore>
|
647
667
|
<zeroOrMore>
|
648
668
|
<ref name="docrelation"/>
|
649
669
|
</zeroOrMore>
|
@@ -767,6 +787,8 @@
|
|
767
787
|
<value>unchanged</value>
|
768
788
|
<value>circulated</value>
|
769
789
|
<value>adapted</value>
|
790
|
+
<value>vote-started</value>
|
791
|
+
<value>vote-ended</value>
|
770
792
|
</choice>
|
771
793
|
</define>
|
772
794
|
<define name="bdate">
|
@@ -999,7 +1021,17 @@
|
|
999
1021
|
<optional>
|
1000
1022
|
<ref name="to"/>
|
1001
1023
|
</optional>
|
1002
|
-
<
|
1024
|
+
<oneOrMore>
|
1025
|
+
<ref name="owner"/>
|
1026
|
+
</oneOrMore>
|
1027
|
+
<optional>
|
1028
|
+
<ref name="copyright_scope"/>
|
1029
|
+
</optional>
|
1030
|
+
</element>
|
1031
|
+
</define>
|
1032
|
+
<define name="copyright_scope">
|
1033
|
+
<element name="scope">
|
1034
|
+
<text/>
|
1003
1035
|
</element>
|
1004
1036
|
</define>
|
1005
1037
|
<define name="from">
|
@@ -1019,38 +1051,63 @@
|
|
1019
1051
|
</define>
|
1020
1052
|
<define name="DocRelationType">
|
1021
1053
|
<choice>
|
1022
|
-
<value>obsoletes</value>
|
1023
|
-
<value>obsoletedBy</value>
|
1024
|
-
<value>supersedes</value>
|
1025
|
-
<value>supersededBy</value>
|
1026
|
-
<value>updates</value>
|
1027
|
-
<value>updatedBy</value>
|
1028
|
-
<value>complements</value>
|
1029
|
-
<value>derivedFrom</value>
|
1030
|
-
<value>translatedFrom</value>
|
1031
|
-
<value>hasTranslation</value>
|
1032
|
-
<value>adoptedFrom</value>
|
1033
|
-
<value>equivalent</value>
|
1034
|
-
<value>identical</value>
|
1035
|
-
<value>nonequivalent</value>
|
1036
|
-
<value>includedIn</value>
|
1037
1054
|
<value>includes</value>
|
1038
|
-
<value>
|
1039
|
-
<value>instanceOf</value>
|
1040
|
-
<value>partOf</value>
|
1055
|
+
<value>includedIn</value>
|
1041
1056
|
<value>hasPart</value>
|
1042
|
-
<value>
|
1043
|
-
<value>draftOf</value>
|
1057
|
+
<value>partOf</value>
|
1044
1058
|
<value>merges</value>
|
1059
|
+
<value>mergedInto</value>
|
1045
1060
|
<value>splits</value>
|
1046
|
-
<value>
|
1047
|
-
<value>
|
1048
|
-
<value>
|
1049
|
-
<value>
|
1050
|
-
<value>
|
1051
|
-
<value>
|
1061
|
+
<value>splitInto</value>
|
1062
|
+
<value>instance</value>
|
1063
|
+
<value>hasInstance</value>
|
1064
|
+
<value>exemplarOf</value>
|
1065
|
+
<value>hasExemplar</value>
|
1066
|
+
<value>manifestationOf</value>
|
1067
|
+
<value>hasManifestation</value>
|
1068
|
+
<value>reproductionOf</value>
|
1069
|
+
<value>hasReproduction</value>
|
1070
|
+
<value>reprintOf</value>
|
1071
|
+
<value>hasReprint</value>
|
1072
|
+
<value>expressionOf</value>
|
1073
|
+
<value>hasExpression</value>
|
1074
|
+
<value>translatedFrom</value>
|
1075
|
+
<value>hasTranslation</value>
|
1076
|
+
<value>arrangementOf</value>
|
1077
|
+
<value>hasArrangement</value>
|
1078
|
+
<value>abridgementOf</value>
|
1079
|
+
<value>hasAbridgement</value>
|
1080
|
+
<value>annotationOf</value>
|
1081
|
+
<value>hasAnnotation</value>
|
1082
|
+
<value>draftOf</value>
|
1083
|
+
<value>hasDraft</value>
|
1084
|
+
<value>editionOf</value>
|
1085
|
+
<value>hasEdition</value>
|
1086
|
+
<value>updates</value>
|
1087
|
+
<value>updatedBy</value>
|
1088
|
+
<value>derivedFrom</value>
|
1089
|
+
<value>derives</value>
|
1052
1090
|
<value>describes</value>
|
1053
1091
|
<value>describedBy</value>
|
1092
|
+
<value>catalogues</value>
|
1093
|
+
<value>cataloguedBy</value>
|
1094
|
+
<value>hasSuccessor</value>
|
1095
|
+
<value>successorOf</value>
|
1096
|
+
<value>adaptedFrom</value>
|
1097
|
+
<value>hasAdaptation</value>
|
1098
|
+
<value>adoptedFrom</value>
|
1099
|
+
<value>adoptedAs</value>
|
1100
|
+
<value>reviewOf</value>
|
1101
|
+
<value>hasReview</value>
|
1102
|
+
<value>commentaryOf</value>
|
1103
|
+
<value>hasCommentary</value>
|
1104
|
+
<value>related</value>
|
1105
|
+
<value>complements</value>
|
1106
|
+
<value>complementOf</value>
|
1107
|
+
<value>obsoletes</value>
|
1108
|
+
<value>obsoletedBy</value>
|
1109
|
+
<value>cited</value>
|
1110
|
+
<value>isCitedIn</value>
|
1054
1111
|
</choice>
|
1055
1112
|
</define>
|
1056
1113
|
<define name="docrelation">
|
data/grammars/isodoc.rng
CHANGED
@@ -42,8 +42,11 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
+
<!-- attribute target { xsd:IDREF }, -->
|
45
46
|
<attribute name="target">
|
46
|
-
<data type="
|
47
|
+
<data type="string">
|
48
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
49
|
+
</data>
|
47
50
|
</attribute>
|
48
51
|
<optional>
|
49
52
|
<attribute name="type">
|
@@ -53,9 +56,101 @@
|
|
53
56
|
<optional>
|
54
57
|
<attribute name="alt"/>
|
55
58
|
</optional>
|
59
|
+
<optional>
|
60
|
+
<attribute name="case">
|
61
|
+
<choice>
|
62
|
+
<value>capital</value>
|
63
|
+
<value>lowercase</value>
|
64
|
+
</choice>
|
65
|
+
</attribute>
|
66
|
+
</optional>
|
67
|
+
<optional>
|
68
|
+
<attribute name="droploc">
|
69
|
+
<data type="boolean"/>
|
70
|
+
</attribute>
|
71
|
+
</optional>
|
56
72
|
<text/>
|
57
73
|
</element>
|
58
74
|
</define>
|
75
|
+
<define name="ul">
|
76
|
+
<element name="ul">
|
77
|
+
<attribute name="id">
|
78
|
+
<data type="ID"/>
|
79
|
+
</attribute>
|
80
|
+
<optional>
|
81
|
+
<attribute name="keep-with-next">
|
82
|
+
<data type="boolean"/>
|
83
|
+
</attribute>
|
84
|
+
</optional>
|
85
|
+
<optional>
|
86
|
+
<attribute name="keep-lines-together">
|
87
|
+
<data type="boolean"/>
|
88
|
+
</attribute>
|
89
|
+
</optional>
|
90
|
+
<oneOrMore>
|
91
|
+
<ref name="li"/>
|
92
|
+
</oneOrMore>
|
93
|
+
<zeroOrMore>
|
94
|
+
<ref name="note"/>
|
95
|
+
</zeroOrMore>
|
96
|
+
</element>
|
97
|
+
</define>
|
98
|
+
<define name="ol">
|
99
|
+
<element name="ol">
|
100
|
+
<attribute name="id">
|
101
|
+
<data type="ID"/>
|
102
|
+
</attribute>
|
103
|
+
<optional>
|
104
|
+
<attribute name="keep-with-next">
|
105
|
+
<data type="boolean"/>
|
106
|
+
</attribute>
|
107
|
+
</optional>
|
108
|
+
<optional>
|
109
|
+
<attribute name="keep-lines-together">
|
110
|
+
<data type="boolean"/>
|
111
|
+
</attribute>
|
112
|
+
</optional>
|
113
|
+
<attribute name="type">
|
114
|
+
<choice>
|
115
|
+
<value>roman</value>
|
116
|
+
<value>alphabet</value>
|
117
|
+
<value>arabic</value>
|
118
|
+
<value>roman_upper</value>
|
119
|
+
<value>alphabet_upper</value>
|
120
|
+
</choice>
|
121
|
+
</attribute>
|
122
|
+
<oneOrMore>
|
123
|
+
<ref name="li"/>
|
124
|
+
</oneOrMore>
|
125
|
+
<zeroOrMore>
|
126
|
+
<ref name="note"/>
|
127
|
+
</zeroOrMore>
|
128
|
+
</element>
|
129
|
+
</define>
|
130
|
+
<define name="dl">
|
131
|
+
<element name="dl">
|
132
|
+
<attribute name="id">
|
133
|
+
<data type="ID"/>
|
134
|
+
</attribute>
|
135
|
+
<optional>
|
136
|
+
<attribute name="keep-with-next">
|
137
|
+
<data type="boolean"/>
|
138
|
+
</attribute>
|
139
|
+
</optional>
|
140
|
+
<optional>
|
141
|
+
<attribute name="keep-lines-together">
|
142
|
+
<data type="boolean"/>
|
143
|
+
</attribute>
|
144
|
+
</optional>
|
145
|
+
<oneOrMore>
|
146
|
+
<ref name="dt"/>
|
147
|
+
<ref name="dd"/>
|
148
|
+
</oneOrMore>
|
149
|
+
<zeroOrMore>
|
150
|
+
<ref name="note"/>
|
151
|
+
</zeroOrMore>
|
152
|
+
</element>
|
153
|
+
</define>
|
59
154
|
<define name="example">
|
60
155
|
<element name="example">
|
61
156
|
<attribute name="id">
|
@@ -69,6 +164,19 @@
|
|
69
164
|
<optional>
|
70
165
|
<attribute name="subsequence"/>
|
71
166
|
</optional>
|
167
|
+
<optional>
|
168
|
+
<attribute name="number"/>
|
169
|
+
</optional>
|
170
|
+
<optional>
|
171
|
+
<attribute name="keep-with-next">
|
172
|
+
<data type="boolean"/>
|
173
|
+
</attribute>
|
174
|
+
</optional>
|
175
|
+
<optional>
|
176
|
+
<attribute name="keep-lines-together">
|
177
|
+
<data type="boolean"/>
|
178
|
+
</attribute>
|
179
|
+
</optional>
|
72
180
|
<optional>
|
73
181
|
<ref name="tname"/>
|
74
182
|
</optional>
|
@@ -89,6 +197,296 @@
|
|
89
197
|
</zeroOrMore>
|
90
198
|
</element>
|
91
199
|
</define>
|
200
|
+
<define name="table">
|
201
|
+
<element name="table">
|
202
|
+
<attribute name="id">
|
203
|
+
<data type="ID"/>
|
204
|
+
</attribute>
|
205
|
+
<optional>
|
206
|
+
<attribute name="unnumbered">
|
207
|
+
<data type="boolean"/>
|
208
|
+
</attribute>
|
209
|
+
</optional>
|
210
|
+
<optional>
|
211
|
+
<attribute name="number"/>
|
212
|
+
</optional>
|
213
|
+
<optional>
|
214
|
+
<attribute name="subsequence"/>
|
215
|
+
</optional>
|
216
|
+
<optional>
|
217
|
+
<attribute name="alt"/>
|
218
|
+
</optional>
|
219
|
+
<optional>
|
220
|
+
<attribute name="summary"/>
|
221
|
+
</optional>
|
222
|
+
<optional>
|
223
|
+
<attribute name="uri">
|
224
|
+
<data type="anyURI"/>
|
225
|
+
</attribute>
|
226
|
+
</optional>
|
227
|
+
<optional>
|
228
|
+
<attribute name="keep-with-next">
|
229
|
+
<data type="boolean"/>
|
230
|
+
</attribute>
|
231
|
+
</optional>
|
232
|
+
<optional>
|
233
|
+
<attribute name="keep-lines-together">
|
234
|
+
<data type="boolean"/>
|
235
|
+
</attribute>
|
236
|
+
</optional>
|
237
|
+
<optional>
|
238
|
+
<ref name="tname"/>
|
239
|
+
</optional>
|
240
|
+
<optional>
|
241
|
+
<ref name="thead"/>
|
242
|
+
</optional>
|
243
|
+
<ref name="tbody"/>
|
244
|
+
<optional>
|
245
|
+
<ref name="tfoot"/>
|
246
|
+
</optional>
|
247
|
+
<zeroOrMore>
|
248
|
+
<ref name="table-note"/>
|
249
|
+
</zeroOrMore>
|
250
|
+
<optional>
|
251
|
+
<ref name="dl"/>
|
252
|
+
</optional>
|
253
|
+
</element>
|
254
|
+
</define>
|
255
|
+
<define name="figure">
|
256
|
+
<element name="figure">
|
257
|
+
<attribute name="id">
|
258
|
+
<data type="ID"/>
|
259
|
+
</attribute>
|
260
|
+
<optional>
|
261
|
+
<attribute name="unnumbered">
|
262
|
+
<data type="boolean"/>
|
263
|
+
</attribute>
|
264
|
+
</optional>
|
265
|
+
<optional>
|
266
|
+
<attribute name="number"/>
|
267
|
+
</optional>
|
268
|
+
<optional>
|
269
|
+
<attribute name="subsequence"/>
|
270
|
+
</optional>
|
271
|
+
<optional>
|
272
|
+
<attribute name="keep-with-next">
|
273
|
+
<data type="boolean"/>
|
274
|
+
</attribute>
|
275
|
+
</optional>
|
276
|
+
<optional>
|
277
|
+
<attribute name="keep-lines-together">
|
278
|
+
<data type="boolean"/>
|
279
|
+
</attribute>
|
280
|
+
</optional>
|
281
|
+
<optional>
|
282
|
+
<attribute name="class"/>
|
283
|
+
</optional>
|
284
|
+
<optional>
|
285
|
+
<ref name="source"/>
|
286
|
+
</optional>
|
287
|
+
<optional>
|
288
|
+
<ref name="tname"/>
|
289
|
+
</optional>
|
290
|
+
<choice>
|
291
|
+
<ref name="image"/>
|
292
|
+
<ref name="video"/>
|
293
|
+
<ref name="audio"/>
|
294
|
+
<ref name="pre"/>
|
295
|
+
<oneOrMore>
|
296
|
+
<ref name="paragraph-with-footnote"/>
|
297
|
+
</oneOrMore>
|
298
|
+
<zeroOrMore>
|
299
|
+
<ref name="figure"/>
|
300
|
+
</zeroOrMore>
|
301
|
+
</choice>
|
302
|
+
<zeroOrMore>
|
303
|
+
<ref name="fn"/>
|
304
|
+
</zeroOrMore>
|
305
|
+
<optional>
|
306
|
+
<ref name="dl"/>
|
307
|
+
</optional>
|
308
|
+
<zeroOrMore>
|
309
|
+
<ref name="note"/>
|
310
|
+
</zeroOrMore>
|
311
|
+
</element>
|
312
|
+
</define>
|
313
|
+
<define name="sourcecode">
|
314
|
+
<element name="sourcecode">
|
315
|
+
<attribute name="id">
|
316
|
+
<data type="ID"/>
|
317
|
+
</attribute>
|
318
|
+
<optional>
|
319
|
+
<attribute name="unnumbered">
|
320
|
+
<data type="boolean"/>
|
321
|
+
</attribute>
|
322
|
+
</optional>
|
323
|
+
<optional>
|
324
|
+
<attribute name="number"/>
|
325
|
+
</optional>
|
326
|
+
<optional>
|
327
|
+
<attribute name="subsequence"/>
|
328
|
+
</optional>
|
329
|
+
<optional>
|
330
|
+
<attribute name="keep-with-next">
|
331
|
+
<data type="boolean"/>
|
332
|
+
</attribute>
|
333
|
+
</optional>
|
334
|
+
<optional>
|
335
|
+
<attribute name="keep-lines-together">
|
336
|
+
<data type="boolean"/>
|
337
|
+
</attribute>
|
338
|
+
</optional>
|
339
|
+
<optional>
|
340
|
+
<attribute name="lang"/>
|
341
|
+
</optional>
|
342
|
+
<optional>
|
343
|
+
<ref name="tname"/>
|
344
|
+
</optional>
|
345
|
+
<oneOrMore>
|
346
|
+
<choice>
|
347
|
+
<text/>
|
348
|
+
<ref name="callout"/>
|
349
|
+
</choice>
|
350
|
+
</oneOrMore>
|
351
|
+
<zeroOrMore>
|
352
|
+
<ref name="annotation"/>
|
353
|
+
</zeroOrMore>
|
354
|
+
<zeroOrMore>
|
355
|
+
<ref name="note"/>
|
356
|
+
</zeroOrMore>
|
357
|
+
</element>
|
358
|
+
</define>
|
359
|
+
<define name="formula">
|
360
|
+
<element name="formula">
|
361
|
+
<attribute name="id">
|
362
|
+
<data type="ID"/>
|
363
|
+
</attribute>
|
364
|
+
<optional>
|
365
|
+
<attribute name="unnumbered">
|
366
|
+
<data type="boolean"/>
|
367
|
+
</attribute>
|
368
|
+
</optional>
|
369
|
+
<optional>
|
370
|
+
<attribute name="number"/>
|
371
|
+
</optional>
|
372
|
+
<optional>
|
373
|
+
<attribute name="subsequence"/>
|
374
|
+
</optional>
|
375
|
+
<optional>
|
376
|
+
<attribute name="keep-with-next">
|
377
|
+
<data type="boolean"/>
|
378
|
+
</attribute>
|
379
|
+
</optional>
|
380
|
+
<optional>
|
381
|
+
<attribute name="keep-lines-together">
|
382
|
+
<data type="boolean"/>
|
383
|
+
</attribute>
|
384
|
+
</optional>
|
385
|
+
<optional>
|
386
|
+
<attribute name="inequality">
|
387
|
+
<data type="boolean"/>
|
388
|
+
</attribute>
|
389
|
+
</optional>
|
390
|
+
<ref name="stem"/>
|
391
|
+
<optional>
|
392
|
+
<ref name="dl"/>
|
393
|
+
</optional>
|
394
|
+
<zeroOrMore>
|
395
|
+
<ref name="note"/>
|
396
|
+
</zeroOrMore>
|
397
|
+
</element>
|
398
|
+
</define>
|
399
|
+
<define name="ParagraphType">
|
400
|
+
<attribute name="id">
|
401
|
+
<data type="ID"/>
|
402
|
+
</attribute>
|
403
|
+
<optional>
|
404
|
+
<attribute name="align">
|
405
|
+
<ref name="Alignments"/>
|
406
|
+
</attribute>
|
407
|
+
</optional>
|
408
|
+
<optional>
|
409
|
+
<attribute name="keep-with-next">
|
410
|
+
<data type="boolean"/>
|
411
|
+
</attribute>
|
412
|
+
</optional>
|
413
|
+
<optional>
|
414
|
+
<attribute name="keep-lines-together">
|
415
|
+
<data type="boolean"/>
|
416
|
+
</attribute>
|
417
|
+
</optional>
|
418
|
+
<zeroOrMore>
|
419
|
+
<ref name="TextElement"/>
|
420
|
+
</zeroOrMore>
|
421
|
+
<zeroOrMore>
|
422
|
+
<ref name="note"/>
|
423
|
+
</zeroOrMore>
|
424
|
+
</define>
|
425
|
+
<define name="paragraph-with-footnote">
|
426
|
+
<element name="p">
|
427
|
+
<attribute name="id">
|
428
|
+
<data type="ID"/>
|
429
|
+
</attribute>
|
430
|
+
<optional>
|
431
|
+
<attribute name="align">
|
432
|
+
<ref name="Alignments"/>
|
433
|
+
</attribute>
|
434
|
+
</optional>
|
435
|
+
<optional>
|
436
|
+
<attribute name="keep-with-next">
|
437
|
+
<data type="boolean"/>
|
438
|
+
</attribute>
|
439
|
+
</optional>
|
440
|
+
<optional>
|
441
|
+
<attribute name="keep-lines-together">
|
442
|
+
<data type="boolean"/>
|
443
|
+
</attribute>
|
444
|
+
</optional>
|
445
|
+
<zeroOrMore>
|
446
|
+
<choice>
|
447
|
+
<ref name="TextElement"/>
|
448
|
+
<ref name="fn"/>
|
449
|
+
</choice>
|
450
|
+
</zeroOrMore>
|
451
|
+
<zeroOrMore>
|
452
|
+
<ref name="note"/>
|
453
|
+
</zeroOrMore>
|
454
|
+
</element>
|
455
|
+
</define>
|
456
|
+
<define name="quote">
|
457
|
+
<element name="quote">
|
458
|
+
<attribute name="id">
|
459
|
+
<data type="ID"/>
|
460
|
+
</attribute>
|
461
|
+
<optional>
|
462
|
+
<attribute name="alignment">
|
463
|
+
<ref name="Alignments"/>
|
464
|
+
</attribute>
|
465
|
+
</optional>
|
466
|
+
<optional>
|
467
|
+
<attribute name="keep-with-next">
|
468
|
+
<data type="boolean"/>
|
469
|
+
</attribute>
|
470
|
+
</optional>
|
471
|
+
<optional>
|
472
|
+
<attribute name="keep-lines-together">
|
473
|
+
<data type="boolean"/>
|
474
|
+
</attribute>
|
475
|
+
</optional>
|
476
|
+
<optional>
|
477
|
+
<ref name="quote-source"/>
|
478
|
+
</optional>
|
479
|
+
<optional>
|
480
|
+
<ref name="quote-author"/>
|
481
|
+
</optional>
|
482
|
+
<oneOrMore>
|
483
|
+
<ref name="paragraph-with-footnote"/>
|
484
|
+
</oneOrMore>
|
485
|
+
<zeroOrMore>
|
486
|
+
<ref name="note"/>
|
487
|
+
</zeroOrMore>
|
488
|
+
</element>
|
489
|
+
</define>
|
92
490
|
<define name="BibDataExtensionType">
|
93
491
|
<ref name="doctype"/>
|
94
492
|
<optional>
|
@@ -129,6 +527,9 @@
|
|
129
527
|
</choice>
|
130
528
|
</attribute>
|
131
529
|
</optional>
|
530
|
+
<attribute name="normative">
|
531
|
+
<data type="boolean"/>
|
532
|
+
</attribute>
|
132
533
|
<optional>
|
133
534
|
<ref name="section-title"/>
|
134
535
|
</optional>
|
@@ -154,6 +555,30 @@
|
|
154
555
|
<attribute name="id">
|
155
556
|
<data type="ID"/>
|
156
557
|
</attribute>
|
558
|
+
<optional>
|
559
|
+
<attribute name="unnumbered">
|
560
|
+
<data type="boolean"/>
|
561
|
+
</attribute>
|
562
|
+
</optional>
|
563
|
+
<optional>
|
564
|
+
<attribute name="number"/>
|
565
|
+
</optional>
|
566
|
+
<optional>
|
567
|
+
<attribute name="subsequence"/>
|
568
|
+
</optional>
|
569
|
+
<optional>
|
570
|
+
<attribute name="keep-with-next">
|
571
|
+
<data type="boolean"/>
|
572
|
+
</attribute>
|
573
|
+
</optional>
|
574
|
+
<optional>
|
575
|
+
<attribute name="keep-lines-together">
|
576
|
+
<data type="boolean"/>
|
577
|
+
</attribute>
|
578
|
+
</optional>
|
579
|
+
<optional>
|
580
|
+
<attribute name="type"/>
|
581
|
+
</optional>
|
157
582
|
<oneOrMore>
|
158
583
|
<choice>
|
159
584
|
<ref name="paragraph"/>
|
@@ -161,6 +586,8 @@
|
|
161
586
|
<ref name="ol"/>
|
162
587
|
<ref name="dl"/>
|
163
588
|
<ref name="formula"/>
|
589
|
+
<ref name="quote"/>
|
590
|
+
<ref name="sourcecode"/>
|
164
591
|
</choice>
|
165
592
|
</oneOrMore>
|
166
593
|
</element>
|
@@ -244,6 +671,16 @@
|
|
244
671
|
</choice>
|
245
672
|
</attribute>
|
246
673
|
</optional>
|
674
|
+
<optional>
|
675
|
+
<attribute name="valign">
|
676
|
+
<choice>
|
677
|
+
<value>top</value>
|
678
|
+
<value>middle</value>
|
679
|
+
<value>bottom</value>
|
680
|
+
<value>baseline</value>
|
681
|
+
</choice>
|
682
|
+
</attribute>
|
683
|
+
</optional>
|
247
684
|
<choice>
|
248
685
|
<zeroOrMore>
|
249
686
|
<choice>
|
@@ -280,6 +717,16 @@
|
|
280
717
|
</choice>
|
281
718
|
</attribute>
|
282
719
|
</optional>
|
720
|
+
<optional>
|
721
|
+
<attribute name="valign">
|
722
|
+
<choice>
|
723
|
+
<value>top</value>
|
724
|
+
<value>middle</value>
|
725
|
+
<value>bottom</value>
|
726
|
+
<value>baseline</value>
|
727
|
+
</choice>
|
728
|
+
</attribute>
|
729
|
+
</optional>
|
283
730
|
<choice>
|
284
731
|
<zeroOrMore>
|
285
732
|
<choice>
|
@@ -303,11 +750,11 @@
|
|
303
750
|
<ref name="paragraph"/>
|
304
751
|
</element>
|
305
752
|
</define>
|
306
|
-
<define name="TextElement" combine="choice">
|
307
|
-
<ref name="concept"/>
|
308
|
-
</define>
|
309
753
|
</include>
|
310
754
|
<!-- end overrides -->
|
755
|
+
<define name="TextElement" combine="choice">
|
756
|
+
<ref name="concept"/>
|
757
|
+
</define>
|
311
758
|
<define name="concept">
|
312
759
|
<element name="concept">
|
313
760
|
<optional>
|
@@ -438,7 +885,7 @@
|
|
438
885
|
<oneOrMore>
|
439
886
|
<choice>
|
440
887
|
<ref name="content"/>
|
441
|
-
<ref name="
|
888
|
+
<ref name="abstract"/>
|
442
889
|
<ref name="foreword"/>
|
443
890
|
<ref name="introduction"/>
|
444
891
|
<ref name="acknowledgements"/>
|
@@ -505,6 +952,9 @@
|
|
505
952
|
<optional>
|
506
953
|
<attribute name="script"/>
|
507
954
|
</optional>
|
955
|
+
<optional>
|
956
|
+
<attribute name="type"/>
|
957
|
+
</optional>
|
508
958
|
<optional>
|
509
959
|
<attribute name="obligation">
|
510
960
|
<choice>
|
@@ -544,9 +994,6 @@
|
|
544
994
|
</define>
|
545
995
|
<define name="content-subsection">
|
546
996
|
<element name="clause">
|
547
|
-
<optional>
|
548
|
-
<attribute name="type"/>
|
549
|
-
</optional>
|
550
997
|
<ref name="Content-Section"/>
|
551
998
|
</element>
|
552
999
|
</define>
|
@@ -575,6 +1022,9 @@
|
|
575
1022
|
</choice>
|
576
1023
|
</attribute>
|
577
1024
|
</optional>
|
1025
|
+
<optional>
|
1026
|
+
<attribute name="type"/>
|
1027
|
+
</optional>
|
578
1028
|
<optional>
|
579
1029
|
<ref name="section-title"/>
|
580
1030
|
</optional>
|
@@ -594,9 +1044,6 @@
|
|
594
1044
|
</define>
|
595
1045
|
<define name="clause">
|
596
1046
|
<element name="clause">
|
597
|
-
<optional>
|
598
|
-
<attribute name="type"/>
|
599
|
-
</optional>
|
600
1047
|
<ref name="Clause-Section"/>
|
601
1048
|
</element>
|
602
1049
|
</define>
|
@@ -625,18 +1072,24 @@
|
|
625
1072
|
</choice>
|
626
1073
|
</attribute>
|
627
1074
|
</optional>
|
1075
|
+
<optional>
|
1076
|
+
<attribute name="type"/>
|
1077
|
+
</optional>
|
628
1078
|
<optional>
|
629
1079
|
<ref name="section-title"/>
|
630
1080
|
</optional>
|
631
1081
|
<group>
|
632
|
-
<
|
633
|
-
<
|
634
|
-
<
|
635
|
-
|
636
|
-
|
637
|
-
<
|
638
|
-
|
639
|
-
|
1082
|
+
<choice>
|
1083
|
+
<group>
|
1084
|
+
<zeroOrMore>
|
1085
|
+
<ref name="BasicBlock"/>
|
1086
|
+
</zeroOrMore>
|
1087
|
+
<zeroOrMore>
|
1088
|
+
<ref name="note"/>
|
1089
|
+
</zeroOrMore>
|
1090
|
+
</group>
|
1091
|
+
<ref name="amend"/>
|
1092
|
+
</choice>
|
640
1093
|
<zeroOrMore>
|
641
1094
|
<choice>
|
642
1095
|
<ref name="clause-subsection"/>
|
@@ -763,6 +1216,9 @@
|
|
763
1216
|
<optional>
|
764
1217
|
<attribute name="script"/>
|
765
1218
|
</optional>
|
1219
|
+
<optional>
|
1220
|
+
<attribute name="type"/>
|
1221
|
+
</optional>
|
766
1222
|
<optional>
|
767
1223
|
<attribute name="obligation">
|
768
1224
|
<choice>
|
@@ -899,7 +1355,36 @@
|
|
899
1355
|
<attribute name="id">
|
900
1356
|
<data type="ID"/>
|
901
1357
|
</attribute>
|
902
|
-
<
|
1358
|
+
<optional>
|
1359
|
+
<attribute name="unnumbered">
|
1360
|
+
<data type="boolean"/>
|
1361
|
+
</attribute>
|
1362
|
+
</optional>
|
1363
|
+
<optional>
|
1364
|
+
<attribute name="number"/>
|
1365
|
+
</optional>
|
1366
|
+
<optional>
|
1367
|
+
<attribute name="subsequence"/>
|
1368
|
+
</optional>
|
1369
|
+
<optional>
|
1370
|
+
<attribute name="keep-with-next">
|
1371
|
+
<data type="boolean"/>
|
1372
|
+
</attribute>
|
1373
|
+
</optional>
|
1374
|
+
<optional>
|
1375
|
+
<attribute name="keep-lines-together">
|
1376
|
+
<data type="boolean"/>
|
1377
|
+
</attribute>
|
1378
|
+
</optional>
|
1379
|
+
<oneOrMore>
|
1380
|
+
<choice>
|
1381
|
+
<ref name="paragraph"/>
|
1382
|
+
<ref name="ul"/>
|
1383
|
+
<ref name="ol"/>
|
1384
|
+
<ref name="dl"/>
|
1385
|
+
<ref name="formula"/>
|
1386
|
+
</choice>
|
1387
|
+
</oneOrMore>
|
903
1388
|
</element>
|
904
1389
|
</define>
|
905
1390
|
<define name="termexample">
|
@@ -1001,11 +1486,6 @@
|
|
1001
1486
|
</optional>
|
1002
1487
|
</element>
|
1003
1488
|
</define>
|
1004
|
-
<define name="preface_abstract">
|
1005
|
-
<element name="abstract">
|
1006
|
-
<ref name="Basic-Section"/>
|
1007
|
-
</element>
|
1008
|
-
</define>
|
1009
1489
|
<define name="term-clause">
|
1010
1490
|
<element name="clause">
|
1011
1491
|
<optional>
|
@@ -1055,4 +1535,79 @@
|
|
1055
1535
|
<ref name="CitationType"/>
|
1056
1536
|
</element>
|
1057
1537
|
</define>
|
1538
|
+
<define name="amend">
|
1539
|
+
<element name="amend">
|
1540
|
+
<optional>
|
1541
|
+
<attribute name="id">
|
1542
|
+
<data type="ID"/>
|
1543
|
+
</attribute>
|
1544
|
+
</optional>
|
1545
|
+
<attribute name="change">
|
1546
|
+
<choice>
|
1547
|
+
<value>add</value>
|
1548
|
+
<value>modify</value>
|
1549
|
+
<value>delete</value>
|
1550
|
+
</choice>
|
1551
|
+
</attribute>
|
1552
|
+
<optional>
|
1553
|
+
<attribute name="path"/>
|
1554
|
+
</optional>
|
1555
|
+
<optional>
|
1556
|
+
<attribute name="path_end"/>
|
1557
|
+
</optional>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="title"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<element name="location">
|
1563
|
+
<zeroOrMore>
|
1564
|
+
<ref name="locality"/>
|
1565
|
+
</zeroOrMore>
|
1566
|
+
</element>
|
1567
|
+
</optional>
|
1568
|
+
<zeroOrMore>
|
1569
|
+
<ref name="autonumber"/>
|
1570
|
+
</zeroOrMore>
|
1571
|
+
<optional>
|
1572
|
+
<element name="description">
|
1573
|
+
<zeroOrMore>
|
1574
|
+
<ref name="BasicBlock"/>
|
1575
|
+
</zeroOrMore>
|
1576
|
+
</element>
|
1577
|
+
</optional>
|
1578
|
+
<optional>
|
1579
|
+
<element name="newcontent">
|
1580
|
+
<zeroOrMore>
|
1581
|
+
<ref name="BasicBlock"/>
|
1582
|
+
</zeroOrMore>
|
1583
|
+
</element>
|
1584
|
+
</optional>
|
1585
|
+
<optional>
|
1586
|
+
<element name="description">
|
1587
|
+
<zeroOrMore>
|
1588
|
+
<ref name="BasicBlock"/>
|
1589
|
+
</zeroOrMore>
|
1590
|
+
</element>
|
1591
|
+
</optional>
|
1592
|
+
</element>
|
1593
|
+
</define>
|
1594
|
+
<define name="autonumber">
|
1595
|
+
<element name="autonumber">
|
1596
|
+
<attribute name="type">
|
1597
|
+
<choice>
|
1598
|
+
<value>requirement</value>
|
1599
|
+
<value>recommendation</value>
|
1600
|
+
<value>permission</value>
|
1601
|
+
<value>table</value>
|
1602
|
+
<value>figure</value>
|
1603
|
+
<value>admonition</value>
|
1604
|
+
<value>formula</value>
|
1605
|
+
<value>sourcecode</value>
|
1606
|
+
<value>example</value>
|
1607
|
+
<value>note</value>
|
1608
|
+
</choice>
|
1609
|
+
</attribute>
|
1610
|
+
<text/>
|
1611
|
+
</element>
|
1612
|
+
</define>
|
1058
1613
|
</grammar>
|
data/grammars/ogc.rng
CHANGED
@@ -35,6 +35,11 @@ module RelatonOgc
|
|
35
35
|
@workgroup = subgroup args[:workgroup]
|
36
36
|
end
|
37
37
|
|
38
|
+
# @return [true]
|
39
|
+
def presence?
|
40
|
+
true
|
41
|
+
end
|
42
|
+
|
38
43
|
# @param builder [Nokogiri::XML::Builder]
|
39
44
|
def to_xml(builder)
|
40
45
|
builder.editorialgroup do
|
@@ -52,6 +57,17 @@ module RelatonOgc
|
|
52
57
|
hash
|
53
58
|
end
|
54
59
|
|
60
|
+
# @param prefix [String]
|
61
|
+
# @return [String]
|
62
|
+
def to_asciibib(prefix)
|
63
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
64
|
+
pref += "editorialgroup"
|
65
|
+
out = "#{pref}.committee:: #{committee}\n"
|
66
|
+
out += subcommittee.to_asciibib "#{pref}.subcommittee" if subcommittee
|
67
|
+
out += workgroup.to_asciibib "#{pref}.workgroup" if workgroup
|
68
|
+
out
|
69
|
+
end
|
70
|
+
|
55
71
|
private
|
56
72
|
|
57
73
|
# @param group [Hash, RelatonIsoBib::IsoSubgroup]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RelatonOgc
|
2
|
-
class HashConverter <
|
2
|
+
class HashConverter < RelatonBib::HashConverter
|
3
3
|
class << self
|
4
4
|
private
|
5
5
|
|
@@ -12,7 +12,7 @@ module RelatonOgc
|
|
12
12
|
committee: eg[:committee],
|
13
13
|
subcommittee: eg[:subcommittee],
|
14
14
|
workgroup: eg[:workgroup],
|
15
|
-
secretariat: eg[:secretariat]
|
15
|
+
secretariat: eg[:secretariat]
|
16
16
|
)
|
17
17
|
end
|
18
18
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module RelatonOgc
|
2
|
-
class OgcBibliographicItem <
|
2
|
+
class OgcBibliographicItem < RelatonBib::BibliographicItem
|
3
3
|
TYPES = %w[
|
4
4
|
abstract-specification-topic best-practice
|
5
5
|
change-request-supporting-document
|
@@ -20,10 +20,12 @@ module RelatonOgc
|
|
20
20
|
# @param docsubtype [String]
|
21
21
|
def initialize(**args)
|
22
22
|
if args[:docsubtype] && !SUBTYPES.include?(args[:docsubtype])
|
23
|
-
warn "[relaton-ogc] invalid document
|
23
|
+
warn "[relaton-ogc] WARNING: invalid document "\
|
24
|
+
"subtype: #{args[:docsubtype]}"
|
24
25
|
end
|
25
26
|
|
26
27
|
@docsubtype = args.delete :docsubtype
|
28
|
+
# @doctype = args.delete :doctype
|
27
29
|
super
|
28
30
|
end
|
29
31
|
|
@@ -33,5 +35,28 @@ module RelatonOgc
|
|
33
35
|
hash["docsubtype"] = docsubtype if docsubtype
|
34
36
|
hash
|
35
37
|
end
|
38
|
+
|
39
|
+
# @param builder [Nokogiri::XML::Builder]
|
40
|
+
# @param opts [Hash]
|
41
|
+
# @option opts [Boolean] :bibdata
|
42
|
+
def to_xml(builder = nil, **opts)
|
43
|
+
super do |b|
|
44
|
+
b.ext do
|
45
|
+
b.doctype doctype if doctype
|
46
|
+
b.docsubtype docsubtype if docsubtype
|
47
|
+
editorialgroup&.to_xml b
|
48
|
+
ics.each { |i| i.to_xml b }
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# @param prefix [String]
|
54
|
+
# @return [String]
|
55
|
+
def to_asciibib(prefix = "")
|
56
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
57
|
+
out = super
|
58
|
+
out += "#{pref}docsubtype:: #{docsubtype}\n" if docsubtype
|
59
|
+
out
|
60
|
+
end
|
36
61
|
end
|
37
62
|
end
|
@@ -3,10 +3,10 @@ module RelatonOgc
|
|
3
3
|
class << self
|
4
4
|
# @param text [String]
|
5
5
|
# @return [RelatonOgc::HitCollection]
|
6
|
-
def search(text, year = nil,
|
6
|
+
def search(text, year = nil, _opts = {})
|
7
7
|
HitCollection.new text, year
|
8
8
|
rescue Faraday::ConnectionFailed
|
9
|
-
raise RelatonBib::RequestError,
|
9
|
+
raise RelatonBib::RequestError, HitCollection::ENDPOINT
|
10
10
|
end
|
11
11
|
|
12
12
|
# @param code [String] the OGC standard Code to look up (e..g "8200")
|
data/lib/relaton_ogc/scrapper.rb
CHANGED
@@ -38,6 +38,7 @@ module RelatonOgc
|
|
38
38
|
type = fetch_type(hit["type"])
|
39
39
|
OgcBibliographicItem.new(
|
40
40
|
fetched: Date.today.to_s,
|
41
|
+
type: "standard",
|
41
42
|
title: fetch_title(hit["title"]),
|
42
43
|
docid: fetch_docid(hit["identifier"]),
|
43
44
|
link: fetch_link(hit["URL"]),
|
@@ -61,18 +62,9 @@ module RelatonOgc
|
|
61
62
|
end
|
62
63
|
|
63
64
|
# @param title [String]
|
64
|
-
# @return [Array<
|
65
|
+
# @return [Array<RelatonBib::TypedTitleString>]
|
65
66
|
def fetch_title(title)
|
66
|
-
|
67
|
-
RelatonIsoBib::TypedTitleString.new(
|
68
|
-
type: "title-main", content: title, language: "en", script: "Latn",
|
69
|
-
format: "text/plain"
|
70
|
-
),
|
71
|
-
RelatonIsoBib::TypedTitleString.new(
|
72
|
-
type: "main", content: title, language: "en", script: "Latn",
|
73
|
-
format: "text/plain"
|
74
|
-
),
|
75
|
-
]
|
67
|
+
RelatonBib::TypedTitleString.from_string title, "en", "Latn"
|
76
68
|
end
|
77
69
|
|
78
70
|
# @param identifier [String]
|
data/lib/relaton_ogc/version.rb
CHANGED
@@ -3,21 +3,15 @@ require "nokogiri"
|
|
3
3
|
module RelatonOgc
|
4
4
|
class XMLParser < RelatonIsoBib::XMLParser
|
5
5
|
class << self
|
6
|
-
|
7
|
-
|
6
|
+
private
|
7
|
+
|
8
|
+
# override RelatonIsoBib::IsoBibliographicItem.bib_item method
|
9
|
+
# @param item_hash [Hash]
|
8
10
|
# @return [RelatonOgc::OgcBibliographicItem]
|
9
|
-
def
|
10
|
-
|
11
|
-
item = doc.at "/bibitem|/bibdata"
|
12
|
-
if item
|
13
|
-
OgcBibliographicItem.new item_data(item)
|
14
|
-
else
|
15
|
-
warn "[relaton-ogc] can't find bibitem or bibdata element in the XML"
|
16
|
-
end
|
11
|
+
def bib_item(item_hash)
|
12
|
+
OgcBibliographicItem.new item_hash
|
17
13
|
end
|
18
14
|
|
19
|
-
private
|
20
|
-
|
21
15
|
# Override RelatonIsoBib::XMLParser.item_data method.
|
22
16
|
# @param item [Nokogiri::XML::Element]
|
23
17
|
# @returtn [Hash]
|
@@ -41,7 +35,7 @@ module RelatonOgc
|
|
41
35
|
sc = iso_subgroup eg&.at("subcommittee")
|
42
36
|
wg = iso_subgroup eg&.at("workgroup")
|
43
37
|
EditorialGroup.new(
|
44
|
-
committee: committe, subcommittee: sc, workgroup: wg
|
38
|
+
committee: committe, subcommittee: sc, workgroup: wg
|
45
39
|
)
|
46
40
|
end
|
47
41
|
end
|
data/relaton_ogc.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "RelatonOgc: retrieve OGC Standards for bibliographic "\
|
12
12
|
"use using the OgcBibliographicItem model"
|
13
|
-
spec.description = "
|
14
|
-
"use using the
|
13
|
+
spec.description = "RelatonOgc: retrieve OGC Standards for bibliographic "\
|
14
|
+
"use using the OgcBibliographicItem model"
|
15
15
|
spec.homepage = "https://github.com/relaton/relaton-ogc"
|
16
16
|
spec.license = "BSD-2-Clause"
|
17
17
|
|
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency "webmock"
|
37
37
|
|
38
38
|
spec.add_dependency "faraday", "~> 1.0.0"
|
39
|
-
spec.add_dependency "relaton-iso-bib", "~> 1.
|
39
|
+
spec.add_dependency "relaton-iso-bib", "~> 1.4.0"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
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-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -170,15 +170,15 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.4.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
181
|
-
description: '
|
180
|
+
version: 1.4.0
|
181
|
+
description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
182
182
|
model'
|
183
183
|
email:
|
184
184
|
- open.source@ribose.com
|
@@ -219,7 +219,7 @@ homepage: https://github.com/relaton/relaton-ogc
|
|
219
219
|
licenses:
|
220
220
|
- BSD-2-Clause
|
221
221
|
metadata: {}
|
222
|
-
post_install_message:
|
222
|
+
post_install_message:
|
223
223
|
rdoc_options: []
|
224
224
|
require_paths:
|
225
225
|
- lib
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
version: '0'
|
236
236
|
requirements: []
|
237
237
|
rubygems_version: 3.0.6
|
238
|
-
signing_key:
|
238
|
+
signing_key:
|
239
239
|
specification_version: 4
|
240
240
|
summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
|
241
241
|
model'
|