relaton-bib 2.0.0.pre.alpha.1 → 2.0.0.pre.alpha.2
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/lib/relaton/bib/item_data.rb +20 -10
- data/lib/relaton/bib/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: e3703439e0f575f526e99aa9076d7587bd9720061061877cb7c44565d8e510da
|
4
|
+
data.tar.gz: bd0a42331c2548e5ecfd8be6bc7d30e732cedccdeebbd96f9a6a33dfe80402b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c6cbf18b5fcd8885f86a7cfd24d9c18aea1e56b1a80f0fa81da943194742f859063f73aa76ceda2e96bcc75c9a621dbf7e9c192cb7278b0f1b0a6a3416d9822
|
7
|
+
data.tar.gz: 803e613dd74b00447c9aa04b643a3584b2b9132ef1af4e01dc311cf8627b8ddbd5ec591f8dd790e9c33c56aef24e69520455dfb7afbb0be5cd0638b7a6f31764
|
@@ -4,18 +4,28 @@ module Relaton
|
|
4
4
|
# It needed to keep data fot different types of representations (bibitem, bibdata ...).
|
5
5
|
# @TODO: remove this class when Lutaml Model will support transformation between different types of models.
|
6
6
|
class ItemData
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
ATTRIBUTES = %i[
|
8
|
+
id type schema_version fetched formattedref docnumber edition status
|
9
|
+
medium size validity depiction ext
|
10
|
+
].freeze
|
11
|
+
COLLECTION_ATTRBUTES = %i[
|
12
|
+
docidentifier date contributor version note language locale script
|
13
|
+
copyright series place price extent accesslocation license
|
14
|
+
classification keyword
|
15
|
+
].freeze
|
16
|
+
WRITE_ATTRIBUTES = %i[title abstract source relation].freeze
|
17
|
+
|
18
|
+
ATTRIBUTES.each { |attr| attr_accessor attr }
|
19
|
+
COLLECTION_ATTRBUTES.each { |attr| attr_accessor attr }
|
20
|
+
WRITE_ATTRIBUTES.each { |attr| attr_writer attr }
|
15
21
|
|
16
22
|
def initialize(**args)
|
17
|
-
|
18
|
-
instance_variable_set("@#{
|
23
|
+
ATTRIBUTES.each do |attr|
|
24
|
+
instance_variable_set("@#{attr}", args[attr])
|
25
|
+
end
|
26
|
+
|
27
|
+
(COLLECTION_ATTRBUTES + WRITE_ATTRIBUTES).each do |attr|
|
28
|
+
instance_variable_set("@#{attr}", args[attr] || [])
|
19
29
|
end
|
20
30
|
self.schema_version = schema
|
21
31
|
end
|
data/lib/relaton/bib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.pre.alpha.
|
4
|
+
version: 2.0.0.pre.alpha.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bibtex-ruby
|