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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e44b045b9780f7d267cebd6a0bc57608209804ae1d00f1197e14a55a0f3f2cd2
4
- data.tar.gz: aec09dc2b94e3d7c8e5c6568c67b71f2480c104d2e7906870a896b123b388f85
3
+ metadata.gz: 3ed06601d36f6be9507f24c604ac0f4a5e6eeeacba416b51e83ecc8bd52602cd
4
+ data.tar.gz: 1e29ee227b6048fbc6ad76b310d22b98f5a77a505673f6d85c534ba7bbb1dd10
5
5
  SHA512:
6
- metadata.gz: 6c9dfba110bdd68ca546aba0ec498dec13b4e78287284e95080d2b3e3150d442cf38460d79b43d2355fd87c7cc3378e2bf6fbf43b4d26d0da238ac964590d9ea
7
- data.tar.gz: 55eb97d1f7ffab0c0d7735b94a8a335a7fb6a6a3c2e6b9835d3e515de5a44a154aea20280978f68e2b6a4f45da638a5f919d31a18531330dea5b6482ca44ec2b
6
+ metadata.gz: b74485ebe0b48a1165cbc5f9d3970e573eb4bdc4542e2b89a13f7dab16032d67fc4770ef0881b368d9fa82d70b34b8a976cd60ae6cdbf1e989d8957a5796f8bb
7
+ data.tar.gz: fa741427f8cb815d593124a31547903369b268c9fb41a89149c21f814eec4ba99738181874026ffe0608f56334bcf87c0bfb18f08647ef15e1de85adadab76f5
@@ -914,44 +914,47 @@
914
914
  -->
915
915
  <define name="image">
916
916
  <element name="image">
917
- <attribute name="id">
918
- <data type="ID"/>
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
- <attribute name="src">
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
- <attribute name="mimetype"/>
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>
@@ -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["URL"]),
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 url [String]
75
+ # @param hit [Hash]
76
76
  # @return [Array>RelatonBib::TypedUri>]
77
- def fetch_link(url)
78
- # type = url.end_with?("pdf") ? "pdf" : "src"
79
- [RelatonBib::TypedUri.new(type: "obp", content: url)]
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)
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.17.0".freeze
2
+ VERSION = "1.17.1".freeze
3
3
  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.17.0
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-27 00:00:00.000000000 Z
11
+ date: 2023-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday