relaton-bib 1.16.5 → 1.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/basicdoc.rng +38 -35
- data/grammars/biblio.rng +21 -0
- data/grammars/versions.json +5 -5
- data/lib/relaton_bib/bibliographic_item.rb +11 -12
- data/lib/relaton_bib/bibxml_parser.rb +6 -5
- data/lib/relaton_bib/document_type.rb +52 -0
- data/lib/relaton_bib/hash_converter.rb +415 -402
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +8 -1
- data/lib/relaton_bib.rb +1 -0
- data/relaton-bib.gemspec +1 -1
- metadata +5 -4
data/lib/relaton_bib/version.rb
CHANGED
@@ -63,7 +63,7 @@ module RelatonBib
|
|
63
63
|
keyword: bibitem.xpath("keyword").map(&:text),
|
64
64
|
license: bibitem.xpath("license").map(&:text),
|
65
65
|
validity: fetch_validity(bibitem),
|
66
|
-
doctype: ext
|
66
|
+
doctype: fetch_doctype(ext),
|
67
67
|
subdoctype: ext&.at("subdoctype")&.text,
|
68
68
|
editorialgroup: fetch_editorialgroup(ext),
|
69
69
|
ics: fetch_ics(ext),
|
@@ -274,6 +274,13 @@ module RelatonBib
|
|
274
274
|
Validity.new begins: begins, ends: ends, revision: revision
|
275
275
|
end
|
276
276
|
|
277
|
+
def fetch_doctype(ext)
|
278
|
+
dt = ext&.at("doctype")
|
279
|
+
return unless dt
|
280
|
+
|
281
|
+
DocumentType.new type: dt.text, abbreviation: dt[:abbreviation]
|
282
|
+
end
|
283
|
+
|
277
284
|
# @param item [Nokogiri::XML::Element]
|
278
285
|
# @return [Array<RelatonBib::DocumentIdentifier>]
|
279
286
|
def fetch_docid(item)
|
data/lib/relaton_bib.rb
CHANGED
@@ -9,6 +9,7 @@ require "relaton_bib/localized_string"
|
|
9
9
|
require "relaton_bib/forename"
|
10
10
|
require "relaton_bib/full_name"
|
11
11
|
require "relaton_bib/contributor"
|
12
|
+
require "relaton_bib/document_type"
|
12
13
|
require "relaton_bib/bibliographic_item"
|
13
14
|
require "relaton_bib/hit_collection"
|
14
15
|
require "relaton_bib/hit"
|
data/relaton-bib.gemspec
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: 1.
|
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
|
+
date: 2023-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
75
|
+
version: 1.15.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
82
|
+
version: 1.15.0
|
83
83
|
description: 'RelatonBib: Ruby XMLDOC impementation.'
|
84
84
|
email:
|
85
85
|
- open.source@ribose.com
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- lib/relaton_bib/document_relation.rb
|
128
128
|
- lib/relaton_bib/document_relation_collection.rb
|
129
129
|
- lib/relaton_bib/document_status.rb
|
130
|
+
- lib/relaton_bib/document_type.rb
|
130
131
|
- lib/relaton_bib/edition.rb
|
131
132
|
- lib/relaton_bib/editorial_group.rb
|
132
133
|
- lib/relaton_bib/forename.rb
|