relaton-nist 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_nist/version.rb +1 -1
- data/lib/relaton_nist/xml_parser.rb +14 -0
- 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: e37bb40effbc27c40ce57904429d2f12d7aac6dfa50bc5acfab0e5f98bebf526
|
4
|
+
data.tar.gz: '095ce08a137c804dc88df5d465fbf2a43180dc8b195c8db50ebe5168ce23d025'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f69913864ef1c4331a952430cefb2bf8eeebab49e60bb75bbd2a3fc1d44df33bb12ed4096c73e2a39eece18708067adc1ac3b0a6ec44db68bce6966d8e1301f9
|
7
|
+
data.tar.gz: a5a254e8bc1d9ba8c78a1174b3e89641a937235cce439a2a488be86604229bf38022c8b809629f10437e38b88a7039bd83f2072c2cbf8dd9120aa3800ea98ce1
|
data/lib/relaton_nist/version.rb
CHANGED
@@ -43,6 +43,20 @@ module RelatonNist
|
|
43
43
|
extended: cp.at("extended")&.text
|
44
44
|
)
|
45
45
|
end
|
46
|
+
|
47
|
+
# @param item [Nokogiri::XML::Element]
|
48
|
+
# @return [Array<RelatonBib::DocumentRelation>]
|
49
|
+
def fetch_relations(item)
|
50
|
+
item.xpath("./relation").map do |rel|
|
51
|
+
DocumentRelation.new(
|
52
|
+
type: rel[:type]&.empty? ? nil : rel[:type],
|
53
|
+
description: relation_description(rel),
|
54
|
+
bibitem: bib_item(item_data(rel.at("./bibitem"))),
|
55
|
+
locality: localities(rel),
|
56
|
+
source_locality: source_localities(rel),
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
46
60
|
end
|
47
61
|
end
|
48
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.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: 2020-06-
|
11
|
+
date: 2020-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|