relaton-ogc 1.17.0 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/basicdoc.rng +38 -35
- data/grammars/biblio.rng +21 -0
- data/lib/relaton_ogc/scrapper.rb +9 -5
- data/lib/relaton_ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ed06601d36f6be9507f24c604ac0f4a5e6eeeacba416b51e83ecc8bd52602cd
|
4
|
+
data.tar.gz: 1e29ee227b6048fbc6ad76b310d22b98f5a77a505673f6d85c534ba7bbb1dd10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b74485ebe0b48a1165cbc5f9d3970e573eb4bdc4542e2b89a13f7dab16032d67fc4770ef0881b368d9fa82d70b34b8a976cd60ae6cdbf1e989d8957a5796f8bb
|
7
|
+
data.tar.gz: fa741427f8cb815d593124a31547903369b268c9fb41a89149c21f814eec4ba99738181874026ffe0608f56334bcf87c0bfb18f08647ef15e1de85adadab76f5
|
data/grammars/basicdoc.rng
CHANGED
@@ -914,44 +914,47 @@
|
|
914
914
|
-->
|
915
915
|
<define name="image">
|
916
916
|
<element name="image">
|
917
|
-
<
|
918
|
-
|
917
|
+
<ref name="Image"/>
|
918
|
+
</element>
|
919
|
+
</define>
|
920
|
+
<define name="Image">
|
921
|
+
<attribute name="id">
|
922
|
+
<data type="ID"/>
|
923
|
+
</attribute>
|
924
|
+
<attribute name="src">
|
925
|
+
<data type="anyURI"/>
|
926
|
+
</attribute>
|
927
|
+
<attribute name="mimetype"/>
|
928
|
+
<optional>
|
929
|
+
<attribute name="filename"/>
|
930
|
+
</optional>
|
931
|
+
<optional>
|
932
|
+
<attribute name="width">
|
933
|
+
<choice>
|
934
|
+
<data type="int"/>
|
935
|
+
<value>auto</value>
|
936
|
+
</choice>
|
919
937
|
</attribute>
|
920
|
-
|
938
|
+
</optional>
|
939
|
+
<optional>
|
940
|
+
<attribute name="height">
|
941
|
+
<choice>
|
942
|
+
<data type="int"/>
|
943
|
+
<value>auto</value>
|
944
|
+
</choice>
|
945
|
+
</attribute>
|
946
|
+
</optional>
|
947
|
+
<optional>
|
948
|
+
<attribute name="alt"/>
|
949
|
+
</optional>
|
950
|
+
<optional>
|
951
|
+
<attribute name="title"/>
|
952
|
+
</optional>
|
953
|
+
<optional>
|
954
|
+
<attribute name="longdesc">
|
921
955
|
<data type="anyURI"/>
|
922
956
|
</attribute>
|
923
|
-
|
924
|
-
<optional>
|
925
|
-
<attribute name="filename"/>
|
926
|
-
</optional>
|
927
|
-
<optional>
|
928
|
-
<attribute name="width">
|
929
|
-
<choice>
|
930
|
-
<data type="int"/>
|
931
|
-
<value>auto</value>
|
932
|
-
</choice>
|
933
|
-
</attribute>
|
934
|
-
</optional>
|
935
|
-
<optional>
|
936
|
-
<attribute name="height">
|
937
|
-
<choice>
|
938
|
-
<data type="int"/>
|
939
|
-
<value>auto</value>
|
940
|
-
</choice>
|
941
|
-
</attribute>
|
942
|
-
</optional>
|
943
|
-
<optional>
|
944
|
-
<attribute name="alt"/>
|
945
|
-
</optional>
|
946
|
-
<optional>
|
947
|
-
<attribute name="title"/>
|
948
|
-
</optional>
|
949
|
-
<optional>
|
950
|
-
<attribute name="longdesc">
|
951
|
-
<data type="anyURI"/>
|
952
|
-
</attribute>
|
953
|
-
</optional>
|
954
|
-
</element>
|
957
|
+
</optional>
|
955
958
|
</define>
|
956
959
|
<define name="video">
|
957
960
|
<element name="video">
|
data/grammars/biblio.rng
CHANGED
@@ -348,6 +348,9 @@
|
|
348
348
|
<zeroOrMore>
|
349
349
|
<ref name="contact"/>
|
350
350
|
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="logo"/>
|
353
|
+
</optional>
|
351
354
|
</element>
|
352
355
|
</define>
|
353
356
|
<define name="orgname">
|
@@ -366,6 +369,21 @@
|
|
366
369
|
</choice>
|
367
370
|
</element>
|
368
371
|
</define>
|
372
|
+
<define name="logo">
|
373
|
+
<element name="logo">
|
374
|
+
<ref name="image"/>
|
375
|
+
</element>
|
376
|
+
</define>
|
377
|
+
<define name="depiction">
|
378
|
+
<element name="depiction">
|
379
|
+
<optional>
|
380
|
+
<attribute name="scope"/>
|
381
|
+
</optional>
|
382
|
+
<zeroOrMore>
|
383
|
+
<ref name="image"/>
|
384
|
+
</zeroOrMore>
|
385
|
+
</element>
|
386
|
+
</define>
|
369
387
|
<define name="NameWithVariants">
|
370
388
|
<element name="primary">
|
371
389
|
<ref name="LocalizedString"/>
|
@@ -752,6 +770,9 @@
|
|
752
770
|
<optional>
|
753
771
|
<ref name="validity"/>
|
754
772
|
</optional>
|
773
|
+
<optional>
|
774
|
+
<ref name="depiction"/>
|
775
|
+
</optional>
|
755
776
|
</define>
|
756
777
|
<define name="ReducedBibliographicItem">
|
757
778
|
<optional>
|
data/lib/relaton_ogc/scrapper.rb
CHANGED
@@ -40,7 +40,7 @@ module RelatonOgc
|
|
40
40
|
type: "standard",
|
41
41
|
title: fetch_title(hit["title"]),
|
42
42
|
docid: fetch_docid(hit["identifier"]),
|
43
|
-
link: fetch_link(hit
|
43
|
+
link: fetch_link(hit),
|
44
44
|
doctype: fetch_doctype(type[:type]),
|
45
45
|
subdoctype: type[:subtype],
|
46
46
|
docstatus: fetch_status(type[:stage]),
|
@@ -72,11 +72,15 @@ module RelatonOgc
|
|
72
72
|
[RelatonBib::DocumentIdentifier.new(id: identifier, type: "OGC", primary: true)]
|
73
73
|
end
|
74
74
|
|
75
|
-
# @param
|
75
|
+
# @param hit [Hash]
|
76
76
|
# @return [Array>RelatonBib::TypedUri>]
|
77
|
-
def fetch_link(
|
78
|
-
|
79
|
-
|
77
|
+
def fetch_link(hit)
|
78
|
+
link = []
|
79
|
+
link << RelatonBib::TypedUri.new(type: "src", content: hit["URI"]) if hit["URI"]
|
80
|
+
return link unless hit["URL"]
|
81
|
+
|
82
|
+
type = hit["URL"].end_with?("pdf") ? "pdf" : "obp"
|
83
|
+
link << RelatonBib::TypedUri.new(type: type, content: hit["URL"])
|
80
84
|
end
|
81
85
|
|
82
86
|
def fetch_doctype(type)
|
data/lib/relaton_ogc/version.rb
CHANGED
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.17.
|
4
|
+
version: 1.17.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: 2023-
|
11
|
+
date: 2023-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|