relaton-bsi 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/grammars/biblio.rng +4 -8
- data/lib/relaton/bsi/item_data.rb +0 -36
- data/lib/relaton/bsi/model/bibdata.rb +1 -0
- data/lib/relaton/bsi/model/bibitem.rb +1 -0
- data/lib/relaton/bsi/model/ext.rb +4 -16
- data/lib/relaton/bsi/model/item_base.rb +15 -12
- data/lib/relaton/bsi/version.rb +1 -1
- data/{relaton_bsi.gemspec → relaton-bsi.gemspec} +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3da9e7c45bcfab248b2c756822372254a3942b3003ae575167e6e89b05d4e2a
|
|
4
|
+
data.tar.gz: 736245ec9107245d16fb752e41958237c0f9e793968bf05f1789226197966654
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82317ae24b84302fc86d68891eea1bfc001dcf8c654ab7a5b6060b6f2cadf30866754d7f2ce39dd4297262821f493442f8134f72589fef11ce888004ef07331d
|
|
7
|
+
data.tar.gz: 077ff061529b15d8bf38842cbade1416f322b606d2308bec005db45574f62cb67b88b3057740682f191aa457e4c8d406debd52e9429a15c7801e4fc144c0bbbb
|
data/Gemfile
CHANGED
data/grammars/biblio.rng
CHANGED
|
@@ -2015,15 +2015,11 @@ provided that it is not the entire bibliographic item that is so related</a:docu
|
|
|
2015
2015
|
<a:documentation>A version of the bibliographic item (within an edition). Can be used for drafts</a:documentation>
|
|
2016
2016
|
<element name="version">
|
|
2017
2017
|
<optional>
|
|
2018
|
-
<
|
|
2019
|
-
<a:documentation>
|
|
2020
|
-
</
|
|
2021
|
-
</optional>
|
|
2022
|
-
<optional>
|
|
2023
|
-
<ref name="draft">
|
|
2024
|
-
<a:documentation>The identifier for the current draft of the bibliographic item</a:documentation>
|
|
2025
|
-
</ref>
|
|
2018
|
+
<attribute name="type">
|
|
2019
|
+
<a:documentation>Versioning scheme, in case of multiple versioning schemes</a:documentation>
|
|
2020
|
+
</attribute>
|
|
2026
2021
|
</optional>
|
|
2022
|
+
<text/>
|
|
2027
2023
|
</element>
|
|
2028
2024
|
</define>
|
|
2029
2025
|
<define name="vedition">
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
module Relaton
|
|
2
2
|
module Bsi
|
|
3
3
|
class ItemData < Iso::ItemData
|
|
4
|
-
def deep_clone
|
|
5
|
-
Item.from_yaml Item.to_yaml(self)
|
|
6
|
-
end
|
|
7
|
-
|
|
8
4
|
def create_id(without_date: false)
|
|
9
5
|
docid = docidentifier.find(&:primary) || docidentifier.first
|
|
10
6
|
return unless docid
|
|
@@ -12,38 +8,6 @@ module Relaton
|
|
|
12
8
|
id_content = without_date ? docid.content.sub(/:\d{4}$/, "") : docid.content
|
|
13
9
|
self.id = id_content.gsub(/\W+/, "")
|
|
14
10
|
end
|
|
15
|
-
|
|
16
|
-
def create_relation(**args)
|
|
17
|
-
Relation.new(**args)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def to_xml(bibdata: false, **opts)
|
|
21
|
-
add_notes opts[:note] do
|
|
22
|
-
bibdata ? Bibdata.to_xml(self) : Bibitem.to_xml(self)
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def to_yaml(**opts)
|
|
27
|
-
add_notes opts[:note] do
|
|
28
|
-
Item.to_yaml(self)
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def to_json(**opts)
|
|
33
|
-
add_notes opts[:note] do
|
|
34
|
-
Item.to_json(self)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# private
|
|
39
|
-
|
|
40
|
-
# def add_notes(notes)
|
|
41
|
-
# self.note ||= []
|
|
42
|
-
# Relaton.array(notes).each { |nt| note << Bib::Note.new(**nt) }
|
|
43
|
-
# result = yield
|
|
44
|
-
# Relaton.array(notes).each { note.pop }
|
|
45
|
-
# result
|
|
46
|
-
# end
|
|
47
11
|
end
|
|
48
12
|
end
|
|
49
13
|
end
|
|
@@ -2,28 +2,16 @@ require_relative "doctype"
|
|
|
2
2
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Bsi
|
|
5
|
-
class Ext <
|
|
6
|
-
attribute :schema_version, method: :get_schema_version
|
|
5
|
+
class Ext < Bib::Ext
|
|
7
6
|
attribute :doctype, Doctype
|
|
8
|
-
attribute :subdoctype, :string
|
|
9
|
-
attribute :flavor, :string
|
|
10
7
|
attribute :ics, Bib::ICS, collection: true
|
|
11
8
|
attribute :structuredidentifier, Iso::StructuredIdentifier, collection: true, initialize_empty: true
|
|
12
9
|
attribute :stagename, Iso::Stagename
|
|
13
10
|
|
|
14
|
-
xml
|
|
15
|
-
|
|
16
|
-
map_element "doctype", to: :doctype
|
|
17
|
-
map_element "subdoctype", to: :subdoctype
|
|
18
|
-
map_element "flavor", to: :flavor
|
|
19
|
-
map_element "ics", to: :ics
|
|
20
|
-
map_element "stagename", to: :stagename
|
|
21
|
-
map_element "structuredidentifier", to: :structuredidentifier
|
|
22
|
-
end
|
|
11
|
+
xml { map_element "stagename", to: :stagename }
|
|
12
|
+
key_value { map_element "stagename", to: :stagename }
|
|
23
13
|
|
|
24
|
-
def get_schema_version
|
|
25
|
-
Relaton.schema_versions["relaton-model-bsi"]
|
|
26
|
-
end
|
|
14
|
+
def get_schema_version = Relaton.schema_versions["relaton-model-bsi"]
|
|
27
15
|
end
|
|
28
16
|
end
|
|
29
17
|
end
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
+
require_relative "docidentifier"
|
|
2
|
+
|
|
1
3
|
module Relaton
|
|
2
4
|
module Bsi
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
class ItemBase < Lutaml::Model::Serializable
|
|
6
|
+
include Bib::NamespaceHelper
|
|
7
|
+
|
|
8
|
+
attr_accessor :type
|
|
9
|
+
|
|
6
10
|
model ItemData
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
attributes.delete :ext
|
|
12
|
+
instance_exec(&Bib::ItemShared::ATTRIBUTES)
|
|
13
|
+
attribute :docidentifier, Docidentifier, collection: true, initialize_empty: true
|
|
14
|
+
attribute :relation, Relation, collection: true, initialize_empty: true
|
|
15
|
+
|
|
16
|
+
xml do
|
|
17
|
+
map_attribute "type", to: :type
|
|
18
|
+
instance_exec(&Bib::ItemShared::XML_BODY)
|
|
19
|
+
end
|
|
17
20
|
end
|
|
18
21
|
end
|
|
19
22
|
end
|
data/lib/relaton/bsi/version.rb
CHANGED
|
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.add_dependency "graphql", "~> 2.3"
|
|
35
35
|
spec.add_dependency "graphql-client", "~> 0.23"
|
|
36
36
|
spec.add_dependency "relaton-core", "~> 0.0.9"
|
|
37
|
-
spec.add_dependency "relaton-iso", "~> 2.
|
|
37
|
+
spec.add_dependency "relaton-iso", "~> 2.1.0"
|
|
38
38
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-bsi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-05-04 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: algolia
|
|
@@ -85,14 +86,14 @@ dependencies:
|
|
|
85
86
|
requirements:
|
|
86
87
|
- - "~>"
|
|
87
88
|
- !ruby/object:Gem::Version
|
|
88
|
-
version: 2.
|
|
89
|
+
version: 2.1.0
|
|
89
90
|
type: :runtime
|
|
90
91
|
prerelease: false
|
|
91
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
92
93
|
requirements:
|
|
93
94
|
- - "~>"
|
|
94
95
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 2.
|
|
96
|
+
version: 2.1.0
|
|
96
97
|
description: 'Relaton::Bsi: retrieve BSI Standards for bibliographic use using the
|
|
97
98
|
BibliographicItem model'
|
|
98
99
|
email:
|
|
@@ -136,13 +137,14 @@ files:
|
|
|
136
137
|
- lib/relaton/bsi/scraper.rb
|
|
137
138
|
- lib/relaton/bsi/util.rb
|
|
138
139
|
- lib/relaton/bsi/version.rb
|
|
139
|
-
-
|
|
140
|
+
- relaton-bsi.gemspec
|
|
140
141
|
homepage: https://github.com/metanorma/relaton-bsi
|
|
141
142
|
licenses:
|
|
142
143
|
- BSD-2-Clause
|
|
143
144
|
metadata:
|
|
144
145
|
homepage_uri: https://github.com/metanorma/relaton-bsi
|
|
145
146
|
source_code_uri: https://github.com/metanorma/relaton-bsi
|
|
147
|
+
post_install_message:
|
|
146
148
|
rdoc_options: []
|
|
147
149
|
require_paths:
|
|
148
150
|
- lib
|
|
@@ -157,7 +159,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
157
159
|
- !ruby/object:Gem::Version
|
|
158
160
|
version: '0'
|
|
159
161
|
requirements: []
|
|
160
|
-
rubygems_version: 3.
|
|
162
|
+
rubygems_version: 3.5.22
|
|
163
|
+
signing_key:
|
|
161
164
|
specification_version: 4
|
|
162
165
|
summary: 'Relaton::Bsi: retrieve BSI Standards for bibliographic use using the BibliographicItem
|
|
163
166
|
model'
|