relaton-ecma 1.13.0 → 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: 18799ea91f7f0c3776f926708ec405382238a1696fbcca707a191b05711db099
4
- data.tar.gz: f6de50f201bddfe0153a5b14e756c329380b305d9f59fed2529493819ecd7161
3
+ metadata.gz: 2bfb56317935db58c7697daf05caf958a85995fa3d66533034a18cdeb671a178
4
+ data.tar.gz: 63d485105638a55c444ceecf185296b159308ca54981f8564cb755422177f79e
5
5
  SHA512:
6
- metadata.gz: 6af597bf9af8eab299102121196ee669068865a553d1ddf0da8b98524e2b91ebe307d013e8921491dd136c12440641e033ac0fef178d924d2ecbbd9ddfae42c3
7
- data.tar.gz: 9e7735cfe5fdcca1d1bd461c1fa9ffdd558b204f39604a3e742ee90ccb704fb1542c00bcfc93c3dee9435dec0cb1d42ae767015f0bca9167c5bb19311d74f07a
6
+ metadata.gz: 1b44febabc989d7c41f0561234c5715d83b0e393fa12f7b48ccfd749b20f39a8ffe334a27cef7eb875c4c14d08abe4807dfb098018b31cbb911c8f0b3a487e21
7
+ data.tar.gz: 878ee9903834c5d832f5a23ffd09a43c6343a990ab91756e7a874866d7a505374e6e922e3ba6c7fd007b848238c6d771072826191d8cb0e1f7c11eb02d3a934c
@@ -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:
@@ -0,0 +1,22 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ uses: relaton/support/.github/workflows/release.yml@master
19
+ with:
20
+ next_version: ${{ github.event.inputs.next_version }}
21
+ secrets:
22
+ rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
data/Gemfile CHANGED
@@ -3,5 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in relaton_ecma.gemspec
4
4
  gemspec
5
5
 
6
- gem "rake", "~> 12.0"
6
+ gem "rake", "~> 13.0"
7
7
  gem "rspec", "~> 3.0"
data/README.adoc CHANGED
@@ -8,7 +8,7 @@ image:https://codeclimate.com/github/relaton/relaton-ecma/badges/gpa.svg["Code C
8
8
  image:https://img.shields.io/github/issues-pr-raw/relaton/relaton-ecma.svg["Pull Requests", link="https://github.com/relaton/relaton-ecma/pulls"]
9
9
  image:https://img.shields.io/github/commits-since/relaton/relaton-ecma/latest.svg["Commits since latest",link="https://github.com/relaton/relaton-ecma/releases"]
10
10
 
11
- RelatonEcma is a Ruby gem that search and fetch standards from the https://www.ecma-international.org[European Computer Manufacturers Association].
11
+ RelatonEcma is a Ruby gem that searches and fetches standards from the https://www.ecma-international.org[European Computer Manufacturers Association].
12
12
 
13
13
  == Installation
14
14
 
@@ -34,26 +34,27 @@ Or install it yourself as:
34
34
  [source,ruby]
35
35
  ----
36
36
  require 'relaton_ecma'
37
+ => true
37
38
 
38
39
  item = RelatonEcma::EcmaBibliography.get 'ECMA-6'
39
40
  [relaton-ecma] ("ECMA-6") fetching...
40
41
  [relaton-ecma] ("ECMA-6") found ECMA-6
41
- => #<RelatonBib::BibliographicItem:0x007fe0c047e340
42
+ #<RelatonEcma::BibliographicItem:0x00007fc645b11c10
42
43
  ...
43
44
 
44
45
  RelatonEcma::EcmaBibliography.get 'ECMA TR/18'
45
46
  [relaton-ecma] ("ECMA TR/18") fetching...
46
47
  [relaton-ecma] ("ECMA TR/18") found ECMA TR/18
47
- => #<RelatonBib::BibliographicItem:0x007ff53d2011a8
48
+ => #<RelatonEcma::BibliographicItem:0x00007fc645c00cc0
48
49
  ...
49
50
 
50
51
  RelatonEcma::EcmaBibliography.get "ECMA MEM/2021"
51
52
  [relaton-ecma] ("ECMA MEM/2021") fetching...
52
53
  [relaton-ecma] ("ECMA MEM/2021") found ECMA MEM/2021
53
- => #<RelatonBib::BibliographicItem:0x007ff53d240150
54
+ => #<RelatonEcma::BibliographicItem:0x00007fc665b2f060
54
55
  ...
55
56
 
56
- # Return nil if document doesn't exist.
57
+ # Return nil if a document doesn't exist.
57
58
  RelatonEcma::EcmaBibliography.get '1111'
58
59
  [relaton-ecma] ("1111") fetching...
59
60
  [relaton-ecma] WARNING no match found online for 1111. The code must be exactly like it is on the standards website.
@@ -65,34 +66,28 @@ RelatonEcma::EcmaBibliography.get '1111'
65
66
  [source,ruby]
66
67
  ----
67
68
  item.to_xml
68
- "<bibitem id="ECMA-6" type="standard">
69
- <title format="text/plain" language="en" script="Latn">7-bit Coded Character Set</title>
70
- <uri type="src">https://www.ecma-international.org/publications/standards/Ecma-006.htm</uri>
71
- <uri type="doi">http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf</uri>
72
- <docidentifier type="ECMA">ECMA-6</docidentifier>
73
- <date type="published">
74
- <on>1991-12</on>
75
- </date>
76
- <edition>6</edition>
77
- ...
78
- </bibitem>"
69
+ => "<bibitem id="ECMA-6" type="standard" schema-version="v1.2.1">
70
+ <fetched>2022-12-03</fetched>
71
+ <title format="text/plain" language="en" script="Latn">7-bit coded character set</title>
72
+ <uri type="src">https://www.ecma-international.org/publications-and-standards/standards/ecma-6/</uri>
73
+ <uri type="doi">https://www.ecma-international.org/wp-content/uploads/ECMA-6_6th_edition_december_1991.pdf</uri>
74
+ <docidentifier type="ECMA" primary="true">ECMA-6</docidentifier>
75
+ ...
76
+ </bibitem>"
79
77
  ----
80
78
 
81
79
  With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
82
80
  [source,ruby]
83
81
  ----
84
82
  item.to_xml bibdata: true
85
- "<bibdata type="standard">
86
- <title format="text/plain" language="en" script="Latn">7-bit Coded Character Set</title>
87
- <uri type="src">https://www.ecma-international.org/publications/standards/Ecma-006.htm</uri>
88
- <uri type="doi">http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf</uri>
89
- <docidentifier type="ECMA">ECMA-6</docidentifier>
90
- <date type="published">
91
- <on>1991-12</on>
92
- </date>
93
- <edition>6</edition>
83
+ "<bibdata type="standard" schema-version="v1.2.1">
84
+ <fetched>2022-12-03</fetched>
85
+ <title format="text/plain" language="en" script="Latn">7-bit coded character set</title>
86
+ <uri type="src">https://www.ecma-international.org/publications-and-standards/standards/ecma-6/</uri>
87
+ <uri type="doi">https://www.ecma-international.org/wp-content/uploads/ECMA-6_6th_edition_december_1991.pdf</uri>
88
+ <docidentifier type="ECMA" primary="true">ECMA-6</docidentifier>
94
89
  ...
95
- <ext>
90
+ <ext schema-version="v1.0.0">
96
91
  <doctype>document</doctype>
97
92
  </ext>
98
93
  </bibdata>"
@@ -113,18 +108,9 @@ item.link
113
108
 
114
109
  [source,ruby]
115
110
  ----
116
- item = RelatonBib::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml")
117
- => #<RelatonBib::BibliographicItem:0x007f847dbe2f18
111
+ item = RelatonEcma::XMLParser.from_xml File.read("spec/fixtures/bibdata.xml")
112
+ => #<RelatonEcma::BibliographicItem:0x00007fc645b3bf10
118
113
  ...
119
-
120
- item.to_xml bibdata: true
121
- "<bibdata type="standard">
122
- <title format="text/plain" language="en" script="Latn">7-bit Coded Character Set</title>
123
- <uri type="src">https://www.ecma-international.org/publications/standards/Ecma-006.htm</uri>
124
- <uri type="doi">http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-006.pdf</uri>
125
- <docidentifier type="ECMA">ECMA-6</docidentifier>
126
- ...
127
- </bibdata>"
128
114
  ----
129
115
 
130
116
  == Development
@@ -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-ecma.rng"/>
5
+ <start>
6
+ <choice>
7
+ <ref name="bibitem"/>
8
+ <ref name="bibdata"/>
9
+ </choice>
10
+ </start>
11
+ </grammar>
@@ -0,0 +1,4 @@
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
+ </grammar>
@@ -0,0 +1,12 @@
1
+ module RelatonEcma
2
+ class BibliographicItem < RelatonBib::BibliographicItem
3
+ #
4
+ # Fetch flavor ext schema version
5
+ #
6
+ # @return [String] schema version
7
+ #
8
+ def ext_schema
9
+ @ext_schema ||= schema_versions["relaton-model-ecma"]
10
+ end
11
+ end
12
+ end
@@ -13,7 +13,7 @@ module RelatonEcma
13
13
  # @param code [String] the ECMA standard Code to look up (e..g "ECMA-6")
14
14
  # @param year [String] not used
15
15
  # @param opts [Hash] not used
16
- # @return [RelatonBib::BibliographicItem] Relaton of reference
16
+ # @return [RelatonEcma::BibliographicItem] Relaton of reference
17
17
  def get(code, _year = nil, _opts = {})
18
18
  warn "[relaton-ecma] (\"#{code}\") fetching..."
19
19
  result = search code
@@ -0,0 +1,11 @@
1
+ module RelatonEcma
2
+ class HashConverter < RelatonBib::HashConverter
3
+ class << self
4
+ # @param item_hash [Hash]
5
+ # @return [RelatonEcma::BibliographicItem]
6
+ def bib_item(item_hash)
7
+ BibliographicItem.new(**item_hash)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -12,21 +12,21 @@ module RelatonEcma
12
12
  # @param code [String]
13
13
  # @param date [String, NilClass] year
14
14
  # @param opts [Hash]
15
- # @return [RelatonBib::BibliographicItem]
15
+ # @return [RelatonEcma::BibliographicItem]
16
16
  def get(code, date, opts)
17
17
  ::RelatonEcma::EcmaBibliography.get(code, date, opts)
18
18
  end
19
19
 
20
20
  # @param xml [String]
21
- # @return [RelatonBib::BibliographicItem]
21
+ # @return [RelatonEcma::BibliographicItem]
22
22
  def from_xml(xml)
23
- ::RelatonBib::XMLParser.from_xml xml
23
+ ::RelatonEcma::XMLParser.from_xml xml
24
24
  end
25
25
 
26
26
  # @param hash [Hash]
27
- # @return [RelatonBib::BibliographicItem]
27
+ # @return [RelatonEcma::BibliographicItem]
28
28
  def hash_to_bib(hash)
29
- ::RelatonBib::BibliographicItem.new hash
29
+ ::RelatonEcma::BibliographicItem.new hash
30
30
  end
31
31
 
32
32
  # Returns hash of XML grammar