relaton-calconnect 1.13.1 → 1.14.0

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: 472e2e5fa6688de1b2437d22f1ec7cbe720bbfa3f15020083b9667f5cf153863
4
- data.tar.gz: ee3ea9b65ba53b75aae4fb92b83b147869ea639eed7dddf6b95ddf97fb5bc1a8
3
+ metadata.gz: 60c471b75320c5b90d539508e6bec42475bd06929746a7bf1204c18c9621e754
4
+ data.tar.gz: 105bea1e116b5138d11c3fb37f6ecbcaf19ebfa2329cbd7ad1eb62c9fcfe005d
5
5
  SHA512:
6
- metadata.gz: fe3271ea3e47ee2d29b39961062c5c85a9604ed0e5af2ec66240abdeb18233e96d4facfea08ab94bcbae31acb015361b280286dfaf82bc4903efea8b023ef824
7
- data.tar.gz: 5c284c28bc437bcd77cdf26c1001e12b491e903c810806ac9c207c07093ea1498ca3fad08ba290c11cfc563babc357f46ae21254d985c898615a6a5f1eb43589
6
+ metadata.gz: 1e1b0cf6a665bcdad66c1f44d24ebc76b0ded5a15b54ac8d885e0f6efdafd761cbbd48904bcad5979884cdae1a07da6449db0fc43719b44847e0c7e748824149
7
+ data.tar.gz: c3b9a128734eab8de902a103146c43768e04e59811595717fd8d75b98e0d1ef0971722ce16aeec781b10bf8004be90f3b86f9c9212f24c7442c7a1063ddaebf3
@@ -5,7 +5,6 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master, main ]
8
- tags: [ v* ]
9
8
  pull_request:
10
9
 
11
10
  jobs:
data/README.adoc CHANGED
@@ -43,14 +43,10 @@ item = hits[0].fetch
43
43
  [source,ruby]
44
44
  ----
45
45
  item.to_xml
46
- => "<bibitem id="CC/DIR10005-2019" type="standard">
46
+ => "<bibitem id="CC-DIR10005-2019" type="standard" schema-version="v1.2.1">
47
47
  <title format="text/plain" language="en">Guidelines for the implementation of the CalConnect patent policy</title>
48
- <uri type="xml">csd/cc-10005.xml</uri>
49
- <uri type="pdf">csd/cc-10005.pdf</uri>
50
- <uri type="doc">csd/cc-10005.doc</uri>
51
- <uri type="html">csd/cc-10005.html</uri>
52
- <uri type="rxl">csd/cc-10005.rxl</uri>
53
- <docidentifier type="csd">CC/DIR 10005:2019</docidentifier>
48
+ <uri type="xml">https://standards.calconnect.org/csd/cc-10005.xml</uri>
49
+ <uri type="pdf">https://standards.calconnect.org/csd/cc-10005.pdf</uri>
54
50
  ...
55
51
  </bibitem>"
56
52
  ----
@@ -58,19 +54,14 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
58
54
  [source,ruby]
59
55
  ----
60
56
  item.to_xml bibdata: true
61
- => "<bibdata type="standard">
62
- <title format="text/plain" language=en>Guidelines for the implementation of the CalConnect patent policy</title>
63
- <uri type="xml">csd/cc-10005.xml</uri>
64
- <uri type="pdf">csd/cc-10005.pdf</uri>
65
- <uri type="doc">csd/cc-10005.doc</uri>
66
- <uri type="html">csd/cc-10005.html</uri>
67
- <uri type="rxl">csd/cc-10005.rxl</uri>
68
- <docidentifier type="csd">CC/DIR 10005:2019</docidentifier>
57
+ => "<bibdata type="standard" schema-version="v1.2.1">
58
+ <title format="text/plain" language="en">Guidelines for the implementation of the CalConnect patent policy</title>
59
+ <uri type="xml">https://standards.calconnect.org/csd/cc-10005.xml</uri>
69
60
  ...
70
- <ext>
61
+ <ext schema-version="v1.0.0">
71
62
  <doctype>directive</doctype>
72
63
  <editorialgroup>
73
- <technical-committee>PUBLISH</technical-committee>
64
+ <committee>PUBLISH</committee>
74
65
  </editorialgroup>
75
66
  </ext>
76
67
  </bibdata>"
@@ -1,10 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <include href="biblio.rng">
4
- <start>
5
- <ref name="document"/>
6
- </start>
7
- </include>
8
3
  <define name="document">
9
4
  <element name="document">
10
5
  <optional>
@@ -688,6 +683,9 @@
688
683
  </define>
689
684
  <define name="underline">
690
685
  <element name="underline">
686
+ <optional>
687
+ <attribute name="style"/>
688
+ </optional>
691
689
  <zeroOrMore>
692
690
  <ref name="PureTextElement"/>
693
691
  </zeroOrMore>
@@ -1125,26 +1123,4 @@
1125
1123
  </zeroOrMore>
1126
1124
  </element>
1127
1125
  </define>
1128
- <define name="ext">
1129
- <element name="ext">
1130
- <ref name="BibDataExtensionType"/>
1131
- </element>
1132
- </define>
1133
- <define name="BibDataExtensionType">
1134
- <ref name="doctype"/>
1135
- </define>
1136
- <define name="doctype">
1137
- <element name="doctype">
1138
- <ref name="DocumentType"/>
1139
- </element>
1140
- </define>
1141
- <define name="DocumentType">
1142
- <value>document</value>
1143
- </define>
1144
- <define name="BibData">
1145
- <ref name="BibliographicItem"/>
1146
- <optional>
1147
- <ref name="ext"/>
1148
- </optional>
1149
- </define>
1150
1126
  </grammar>
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar 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
+ <ref name="BibliographicItem"/>
13
+ <optional>
14
+ <ref name="ext"/>
15
+ </optional>
16
+ </define>
17
+ </include>
18
+ <define name="ext">
19
+ <element name="ext">
20
+ <ref name="BibDataExtensionType"/>
21
+ </element>
22
+ </define>
23
+ <define name="BibDataExtensionType">
24
+ <optional>
25
+ <attribute name="schema-version"/>
26
+ </optional>
27
+ <ref name="doctype"/>
28
+ <optional>
29
+ <ref name="docsubtype"/>
30
+ </optional>
31
+ <optional>
32
+ <ref name="editorialgroup"/>
33
+ </optional>
34
+ <zeroOrMore>
35
+ <ref name="ics"/>
36
+ </zeroOrMore>
37
+ <zeroOrMore>
38
+ <ref name="structuredidentifier"/>
39
+ </zeroOrMore>
40
+ </define>
41
+ <define name="doctype">
42
+ <element name="doctype">
43
+ <optional>
44
+ <attribute name="abbreviation"/>
45
+ </optional>
46
+ <ref name="DocumentType"/>
47
+ </element>
48
+ </define>
49
+ <define name="DocumentType">
50
+ <text/>
51
+ </define>
52
+ <define name="docsubtype">
53
+ <element name="subdoctype">
54
+ <ref name="DocumentSubtype"/>
55
+ </element>
56
+ </define>
57
+ <define name="DocumentSubtype">
58
+ <text/>
59
+ </define>
60
+ <define name="editorialgroup">
61
+ <element name="editorialgroup">
62
+ <oneOrMore>
63
+ <ref name="technical-committee"/>
64
+ </oneOrMore>
65
+ </element>
66
+ </define>
67
+ <define name="technical-committee">
68
+ <element name="technical-committee">
69
+ <ref name="IsoWorkgroup"/>
70
+ </element>
71
+ </define>
72
+ <define name="IsoWorkgroup">
73
+ <optional>
74
+ <attribute name="number"/>
75
+ </optional>
76
+ <optional>
77
+ <attribute name="type"/>
78
+ </optional>
79
+ <optional>
80
+ <attribute name="identifier"/>
81
+ </optional>
82
+ <optional>
83
+ <attribute name="prefix"/>
84
+ </optional>
85
+ <text/>
86
+ </define>
87
+ <define name="ics">
88
+ <element name="ics">
89
+ <element name="code">
90
+ <text/>
91
+ </element>
92
+ <optional>
93
+ <element name="text">
94
+ <text/>
95
+ </element>
96
+ </optional>
97
+ </element>
98
+ </define>
99
+ <define name="structuredidentifier">
100
+ <element name="structuredidentifier">
101
+ <optional>
102
+ <attribute name="type"/>
103
+ </optional>
104
+ <oneOrMore>
105
+ <element name="agency">
106
+ <text/>
107
+ </element>
108
+ </oneOrMore>
109
+ <optional>
110
+ <element name="class">
111
+ <text/>
112
+ </element>
113
+ </optional>
114
+ <element name="docnumber">
115
+ <text/>
116
+ </element>
117
+ <optional>
118
+ <element name="partnumber">
119
+ <text/>
120
+ </element>
121
+ </optional>
122
+ <optional>
123
+ <element name="edition">
124
+ <text/>
125
+ </element>
126
+ </optional>
127
+ <optional>
128
+ <element name="version">
129
+ <text/>
130
+ </element>
131
+ </optional>
132
+ <optional>
133
+ <element name="supplementtype">
134
+ <text/>
135
+ </element>
136
+ </optional>
137
+ <optional>
138
+ <element name="supplementnumber">
139
+ <text/>
140
+ </element>
141
+ </optional>
142
+ <optional>
143
+ <element name="amendment">
144
+ <text/>
145
+ </element>
146
+ </optional>
147
+ <optional>
148
+ <element name="corrigendum">
149
+ <text/>
150
+ </element>
151
+ </optional>
152
+ <optional>
153
+ <element name="language">
154
+ <text/>
155
+ </element>
156
+ </optional>
157
+ <optional>
158
+ <element name="year">
159
+ <text/>
160
+ </element>
161
+ </optional>
162
+ </element>
163
+ </define>
164
+ </grammar>
data/grammars/biblio.rng CHANGED
@@ -33,9 +33,10 @@
33
33
  <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
34
34
  </data>
35
35
  </define>
36
- <start>
37
- <ref name="bibitem"/>
38
- </start>
36
+ <!-- start = bibitem -->
37
+ <define name="BibData">
38
+ <ref name="BibliographicItem"/>
39
+ </define>
39
40
  <define name="status">
40
41
  <element name="status">
41
42
  <ref name="stage"/>
@@ -73,8 +74,14 @@
73
74
  <text/>
74
75
  </element>
75
76
  </define>
76
- <define name="script">
77
+ <define name="locale">
77
78
  <a:documentation>ISO-639</a:documentation>
79
+ <element name="locale">
80
+ <text/>
81
+ </element>
82
+ </define>
83
+ <define name="script">
84
+ <a:documentation>ISO-3166</a:documentation>
78
85
  <element name="script">
79
86
  <text/>
80
87
  </element>
@@ -93,6 +100,9 @@
93
100
  <!-- multiple languages and scripts possible: comma delimit them if so -->
94
101
  <attribute name="language"/>
95
102
  </optional>
103
+ <optional>
104
+ <attribute name="locale"/>
105
+ </optional>
96
106
  <optional>
97
107
  <attribute name="script"/>
98
108
  </optional>
@@ -136,6 +146,9 @@
136
146
  <!-- multiple languages and scripts possible: comma delimit them if so -->
137
147
  <attribute name="language"/>
138
148
  </optional>
149
+ <optional>
150
+ <attribute name="locale"/>
151
+ </optional>
139
152
  <optional>
140
153
  <attribute name="script"/>
141
154
  </optional>
@@ -158,27 +171,30 @@
158
171
  </define>
159
172
  <define name="contributor">
160
173
  <element name="contributor">
161
- <zeroOrMore>
174
+ <oneOrMore>
162
175
  <ref name="role"/>
163
- </zeroOrMore>
176
+ </oneOrMore>
164
177
  <ref name="ContributorInfo"/>
165
178
  </element>
166
179
  </define>
167
180
  <define name="role">
168
181
  <element name="role">
169
- <optional>
170
- <attribute name="type">
171
- <choice>
172
- <value>author</value>
173
- <value>performer</value>
174
- <value>publisher</value>
175
- <value>editor</value>
176
- <value>adapter</value>
177
- <value>translator</value>
178
- <value>distributor</value>
179
- </choice>
180
- </attribute>
181
- </optional>
182
+ <attribute name="type">
183
+ <choice>
184
+ <value>author</value>
185
+ <value>performer</value>
186
+ <value>publisher</value>
187
+ <value>editor</value>
188
+ <value>adapter</value>
189
+ <value>translator</value>
190
+ <value>distributor</value>
191
+ <value>realizer</value>
192
+ <value>owner</value>
193
+ <value>authorizer</value>
194
+ <value>enabler</value>
195
+ <value>subject</value>
196
+ </choice>
197
+ </attribute>
182
198
  <zeroOrMore>
183
199
  <ref name="roledescription"/>
184
200
  </zeroOrMore>
@@ -500,6 +516,17 @@
500
516
  </define>
501
517
  <define name="localityStack">
502
518
  <element name="localityStack">
519
+ <optional>
520
+ <attribute name="connective">
521
+ <choice>
522
+ <value>and</value>
523
+ <value>or</value>
524
+ <value>from</value>
525
+ <value>to</value>
526
+ <value/>
527
+ </choice>
528
+ </attribute>
529
+ </optional>
503
530
  <zeroOrMore>
504
531
  <ref name="locality"/>
505
532
  </zeroOrMore>
@@ -512,6 +539,17 @@
512
539
  </define>
513
540
  <define name="sourceLocalityStack">
514
541
  <element name="sourceLocalityStack">
542
+ <optional>
543
+ <attribute name="connective">
544
+ <choice>
545
+ <value>and</value>
546
+ <value>or</value>
547
+ <value>from</value>
548
+ <value>to</value>
549
+ <value/>
550
+ </choice>
551
+ </attribute>
552
+ </optional>
515
553
  <zeroOrMore>
516
554
  <ref name="sourceLocality"/>
517
555
  </zeroOrMore>
@@ -614,6 +652,9 @@
614
652
  <ref name="BibItemType"/>
615
653
  </attribute>
616
654
  </optional>
655
+ <optional>
656
+ <attribute name="schema-version"/>
657
+ </optional>
617
658
  <optional>
618
659
  <ref name="fetched"/>
619
660
  </optional>
@@ -650,6 +691,9 @@
650
691
  <zeroOrMore>
651
692
  <ref name="language"/>
652
693
  </zeroOrMore>
694
+ <zeroOrMore>
695
+ <ref name="locale"/>
696
+ </zeroOrMore>
653
697
  <zeroOrMore>
654
698
  <ref name="script"/>
655
699
  </zeroOrMore>
@@ -705,6 +749,9 @@
705
749
  <ref name="BibItemType"/>
706
750
  </attribute>
707
751
  </optional>
752
+ <optional>
753
+ <attribute name="schema-version"/>
754
+ </optional>
708
755
  <optional>
709
756
  <ref name="fetched"/>
710
757
  </optional>
@@ -741,6 +788,9 @@
741
788
  <zeroOrMore>
742
789
  <ref name="language"/>
743
790
  </zeroOrMore>
791
+ <zeroOrMore>
792
+ <ref name="locale"/>
793
+ </zeroOrMore>
744
794
  <zeroOrMore>
745
795
  <ref name="script"/>
746
796
  </zeroOrMore>
@@ -854,6 +904,15 @@
854
904
  <optional>
855
905
  <attribute name="type"/>
856
906
  </optional>
907
+ <optional>
908
+ <attribute name="language"/>
909
+ </optional>
910
+ <optional>
911
+ <attribute name="locale"/>
912
+ </optional>
913
+ <optional>
914
+ <attribute name="script"/>
915
+ </optional>
857
916
  <data type="anyURI"/>
858
917
  </define>
859
918
  <define name="DateType">
@@ -882,6 +941,7 @@
882
941
  <value>vote-started</value>
883
942
  <value>vote-ended</value>
884
943
  <value>announced</value>
944
+ <value>stable-until</value>
885
945
  </choice>
886
946
  </define>
887
947
  <define name="bdate">
@@ -930,6 +990,9 @@
930
990
  <optional>
931
991
  <attribute name="language"/>
932
992
  </optional>
993
+ <optional>
994
+ <attribute name="locale"/>
995
+ </optional>
933
996
  <optional>
934
997
  <attribute name="script"/>
935
998
  </optional>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <include href="basicdoc.rng"/>
4
+ <include href="relaton-cc.rng"/>
5
+ <start>
6
+ <choice>
7
+ <ref name="bibitem"/>
8
+ <ref name="bibdata"/>
9
+ </choice>
10
+ </start>
11
+ </grammar>
@@ -0,0 +1,48 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <include href="biblio-standoc.rng">
4
+ <define name="DocumentType">
5
+ <choice>
6
+ <value>directive</value>
7
+ <value>guide</value>
8
+ <value>specification</value>
9
+ <value>standard</value>
10
+ <value>report</value>
11
+ <value>administrative</value>
12
+ <value>amendment</value>
13
+ <value>technical corrigendum</value>
14
+ <value>advisory</value>
15
+ </choice>
16
+ </define>
17
+ <define name="BibDataExtensionType">
18
+ <optional>
19
+ <attribute name="schema-version"/>
20
+ </optional>
21
+ <optional>
22
+ <ref name="doctype"/>
23
+ </optional>
24
+ <optional>
25
+ <ref name="docsubtype"/>
26
+ </optional>
27
+ <ref name="editorialgroup"/>
28
+ <zeroOrMore>
29
+ <ref name="ics"/>
30
+ </zeroOrMore>
31
+ </define>
32
+ <define name="editorialgroup">
33
+ <element name="editorialgroup">
34
+ <oneOrMore>
35
+ <ref name="technical-committee"/>
36
+ </oneOrMore>
37
+ </element>
38
+ </define>
39
+ <define name="technical-committee">
40
+ <element name="committee">
41
+ <optional>
42
+ <attribute name="type"/>
43
+ </optional>
44
+ <text/>
45
+ </element>
46
+ </define>
47
+ </include>
48
+ </grammar>
@@ -5,6 +5,15 @@ module RelatonCalconnect
5
5
  technical\ corrigendum advisory
6
6
  ].freeze
7
7
 
8
+ #
9
+ # Fetch flavor schema version
10
+ #
11
+ # @return [String] flavor schema version
12
+ #
13
+ def ext_schema
14
+ @ext_schema ||= schema_versions["relaton-model-cc"]
15
+ end
16
+
8
17
  # @param hash [Hash]
9
18
  # @return [RelatonIsoBib::CcBibliographicItem]
10
19
  def self.from_hash(hash)
@@ -57,6 +57,7 @@ module RelatonCalconnect
57
57
  missed_years = []
58
58
  result.each do |r|
59
59
  item = r.fetch
60
+ item.fetched = Date.today.to_s
60
61
  return { ret: item } if !year
61
62
 
62
63
  item.date.select { |d| d.type == "published" }.each do |d|
@@ -26,6 +26,9 @@ module RelatonCalconnect
26
26
  # Fetch data from yaml
27
27
  #
28
28
  # @param docid [String]
29
+ #
30
+ # @return [Array<RelatonBib::Hit>]
31
+ #
29
32
  def from_yaml(docid, **_opts)
30
33
  data["root"]["items"].select do |doc|
31
34
  doc["docid"] && doc["docid"]["id"].include?(docid)
@@ -1,3 +1,3 @@
1
1
  module RelatonCalconnect
2
- VERSION = "1.13.1".freeze
2
+ VERSION = "1.14.0".freeze
3
3
  end
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "webmock"
36
36
 
37
37
  spec.add_dependency "faraday", "~> 1.0"
38
- spec.add_dependency "relaton-bib", "~> 1.13.0"
38
+ spec.add_dependency "relaton-bib", "~> 1.14.0"
39
39
  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.13.1
4
+ version: 1.14.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: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2022-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 1.13.0
131
+ version: 1.14.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 1.13.0
138
+ version: 1.14.0
139
139
  description: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
140
140
  model'
141
141
  email:
@@ -157,10 +157,10 @@ files:
157
157
  - bin/rspec
158
158
  - bin/setup
159
159
  - grammars/basicdoc.rng
160
+ - grammars/biblio-standoc.rng
160
161
  - grammars/biblio.rng
161
- - grammars/csd.rng
162
- - grammars/isodoc.rng
163
- - grammars/reqt.rng
162
+ - grammars/relaton-cc-compile.rng
163
+ - grammars/relaton-cc.rng
164
164
  - lib/relaton_calconnect.rb
165
165
  - lib/relaton_calconnect/cc_bibliographic_item.rb
166
166
  - lib/relaton_calconnect/cc_bibliography.rb
@@ -178,7 +178,7 @@ homepage: https://github.com/relaton/relaton-calconnect
178
178
  licenses:
179
179
  - BSD-2-Clause
180
180
  metadata: {}
181
- post_install_message:
181
+ post_install_message:
182
182
  rdoc_options: []
183
183
  require_paths:
184
184
  - lib
@@ -193,8 +193,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.2.3
197
- signing_key:
196
+ rubygems_version: 3.1.6
197
+ signing_key:
198
198
  specification_version: 4
199
199
  summary: 'RelatonIso: retrieve CC Standards for bibliographic use using the IsoBibliographicItem
200
200
  model'