relaton-3gpp 1.16.3 → 1.17.0
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 +18 -2
- data/grammars/biblio.rng +1 -0
- data/lib/relaton_3gpp/bibliographic_item.rb +2 -7
- data/lib/relaton_3gpp/document_type.rb +18 -0
- data/lib/relaton_3gpp/hash_converter.rb +20 -15
- data/lib/relaton_3gpp/parser.rb +2 -2
- data/lib/relaton_3gpp/version.rb +1 -1
- data/lib/relaton_3gpp.rb +1 -0
- data/relaton_3gpp.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4993aeee4498d1ebe35e27a116de70929533ee80ac2a9afeb783f9ed34cac737
|
4
|
+
data.tar.gz: cedbd3baeacbc31ca6546cb0effe01fe82bfd9e640f3904d184746169c76819e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68c6dc3d074bcc95b2e24d96179b23c3ade20d0a48f3af32bd3d7df4acc641d2aeb332b8057ff92249330ffd9f0cec72fd3ce1f270cb9f605407876e07e8b8c0
|
7
|
+
data.tar.gz: 13ca9ac5f8abd4e4bc5b2e10cb147eefd061a2be7de4a9c17bd56eda7c5a53df6783d1942b778cd6a5e760dc476c78f5743884f8aad7a73d2642812bc862e8cb
|
data/grammars/basicdoc.rng
CHANGED
@@ -346,6 +346,8 @@
|
|
346
346
|
<ref name="keyword"/>
|
347
347
|
<ref name="xref"/>
|
348
348
|
<ref name="hyperlink"/>
|
349
|
+
<ref name="index"/>
|
350
|
+
<ref name="index-xref"/>
|
349
351
|
</choice>
|
350
352
|
</oneOrMore>
|
351
353
|
</element>
|
@@ -623,6 +625,8 @@
|
|
623
625
|
<ref name="eref"/>
|
624
626
|
<ref name="xref"/>
|
625
627
|
<ref name="hyperlink"/>
|
628
|
+
<ref name="index"/>
|
629
|
+
<ref name="index-xref"/>
|
626
630
|
</choice>
|
627
631
|
</zeroOrMore>
|
628
632
|
</element>
|
@@ -636,6 +640,8 @@
|
|
636
640
|
<ref name="eref"/>
|
637
641
|
<ref name="xref"/>
|
638
642
|
<ref name="hyperlink"/>
|
643
|
+
<ref name="index"/>
|
644
|
+
<ref name="index-xref"/>
|
639
645
|
</choice>
|
640
646
|
</zeroOrMore>
|
641
647
|
</element>
|
@@ -648,6 +654,8 @@
|
|
648
654
|
<ref name="eref"/>
|
649
655
|
<ref name="xref"/>
|
650
656
|
<ref name="hyperlink"/>
|
657
|
+
<ref name="index"/>
|
658
|
+
<ref name="index-xref"/>
|
651
659
|
</choice>
|
652
660
|
</zeroOrMore>
|
653
661
|
</element>
|
@@ -655,7 +663,11 @@
|
|
655
663
|
<define name="keyword">
|
656
664
|
<element name="keyword">
|
657
665
|
<zeroOrMore>
|
658
|
-
<
|
666
|
+
<choice>
|
667
|
+
<ref name="PureTextElement"/>
|
668
|
+
<ref name="index"/>
|
669
|
+
<ref name="index-xref"/>
|
670
|
+
</choice>
|
659
671
|
</zeroOrMore>
|
660
672
|
</element>
|
661
673
|
</define>
|
@@ -676,7 +688,11 @@
|
|
676
688
|
<define name="strike">
|
677
689
|
<element name="strike">
|
678
690
|
<zeroOrMore>
|
679
|
-
<
|
691
|
+
<choice>
|
692
|
+
<ref name="PureTextElement"/>
|
693
|
+
<ref name="index"/>
|
694
|
+
<ref name="index-xref"/>
|
695
|
+
</choice>
|
680
696
|
</zeroOrMore>
|
681
697
|
</element>
|
682
698
|
</define>
|
data/grammars/biblio.rng
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Relaton3gpp
|
2
2
|
class BibliographicItem < RelatonBib::BibliographicItem
|
3
|
-
DOCTYPES = %w[TR TS].freeze
|
4
3
|
DOCSUBTYPES = %w[spec release].freeze
|
5
4
|
RADIOTECHNOLOGIES = %w[2G 3G LTE 5G].freeze
|
6
5
|
|
@@ -12,6 +11,7 @@ module Relaton3gpp
|
|
12
11
|
# @param [Relaton3gpp::Release] release
|
13
12
|
#
|
14
13
|
def initialize(**args) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
14
|
+
Util.warn "WARNING: Doctype is missing" if args[:type].nil?
|
15
15
|
@radiotechnology = args.delete(:radiotechnology)
|
16
16
|
if @radiotechnology && !RADIOTECHNOLOGIES.include?(@radiotechnology)
|
17
17
|
Util.warn "WARNING: Unknown radiotechnology type: `#{@radiotechnology}`"
|
@@ -19,11 +19,6 @@ module Relaton3gpp
|
|
19
19
|
end
|
20
20
|
@common_ims_spec = args.delete(:common_ims_spec)
|
21
21
|
@release = args.delete(:release)
|
22
|
-
if args[:doctype].nil? then Util.warn "WARNING: Doctype is missing"
|
23
|
-
elsif !DOCTYPES.include?(args[:doctype])
|
24
|
-
Util.warn "WARNING: Unknown doctype: `#{args[:doctype]}`"
|
25
|
-
Util.warn "WARNING: Possible doctypes: `#{DOCTYPES.join '`, `'}`"
|
26
|
-
end
|
27
22
|
if args[:docsubtype] && !DOCSUBTYPES.include?(args[:docsubtype])
|
28
23
|
Util.warn "WARNING: Unknown docsubtype: `#{args[:docsubtype]}`"
|
29
24
|
Util.warn "WARNING: Possible docsubtypes: `#{DOCSUBTYPES.join '`, `'}`"
|
@@ -62,7 +57,7 @@ module Relaton3gpp
|
|
62
57
|
if block_given? then yield b
|
63
58
|
elsif opts[:bibdata] && has_ext_attrs?
|
64
59
|
ext = b.ext do
|
65
|
-
|
60
|
+
doctype&.to_xml b
|
66
61
|
b.subdoctype subdoctype if subdoctype
|
67
62
|
editorialgroup&.to_xml b
|
68
63
|
ics.each { |i| i.to_xml b }
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Relaton3gpp
|
2
|
+
class DocumentType < RelatonBib::DocumentType
|
3
|
+
DOCTYPES = %w[TS TR].freeze
|
4
|
+
|
5
|
+
def initialize(type:, abbreviation: nil)
|
6
|
+
check type
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
10
|
+
# @param type [String]
|
11
|
+
def check(type)
|
12
|
+
unless DOCTYPES.include? type
|
13
|
+
Util.warn "WARNING: Unknown doctype: `#{type}`"
|
14
|
+
Util.warn "WARNING: Possible doctypes: `#{DOCTYPES.join '`, `'}`"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,21 +1,26 @@
|
|
1
1
|
module Relaton3gpp
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
hash = super
|
6
|
-
release_hash_to_bib(hash)
|
7
|
-
hash
|
8
|
-
end
|
2
|
+
module HashConverter
|
3
|
+
include RelatonBib::HashConverter
|
4
|
+
extend self
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
def hash_to_bib(args)
|
7
|
+
hash = super
|
8
|
+
release_hash_to_bib(hash)
|
9
|
+
hash
|
10
|
+
end
|
11
|
+
|
12
|
+
def release_hash_to_bib(hash)
|
13
|
+
hash[:release] &&= Release.new(**hash[:release])
|
14
|
+
end
|
15
|
+
|
16
|
+
# @param item_hash [Hash]
|
17
|
+
# @return [Relaton3gpp::BibliographicItem]
|
18
|
+
def bib_item(item_hash)
|
19
|
+
BibliographicItem.new(**item_hash)
|
20
|
+
end
|
13
21
|
|
14
|
-
|
15
|
-
|
16
|
-
def bib_item(item_hash)
|
17
|
-
BibliographicItem.new(**item_hash)
|
18
|
-
end
|
22
|
+
def create_doctype(**type)
|
23
|
+
DocumentType.new(**type)
|
19
24
|
end
|
20
25
|
end
|
21
26
|
end
|
data/lib/relaton_3gpp/parser.rb
CHANGED
@@ -54,7 +54,7 @@ module Relaton3gpp
|
|
54
54
|
docid: parse_docid,
|
55
55
|
docnumber: number,
|
56
56
|
date: parse_date,
|
57
|
-
doctype: @spec[:Type],
|
57
|
+
doctype: DocumentType.new(type: @spec[:Type]),
|
58
58
|
editorialgroup: parse_editorialgroup,
|
59
59
|
biblionote: parse_note,
|
60
60
|
docstatus: parse_status,
|
@@ -92,7 +92,7 @@ module Relaton3gpp
|
|
92
92
|
#
|
93
93
|
# Parse abstract
|
94
94
|
#
|
95
|
-
# @return [Array<RelatonBib::FormattedString>]
|
95
|
+
# @return [Array<RelatonBib::FormattedString>]
|
96
96
|
#
|
97
97
|
def parse_abstract
|
98
98
|
return [] unless @spec[:description]
|
data/lib/relaton_3gpp/version.rb
CHANGED
data/lib/relaton_3gpp.rb
CHANGED
@@ -6,6 +6,7 @@ require "relaton_bib"
|
|
6
6
|
require_relative "relaton_3gpp/version"
|
7
7
|
require_relative "relaton_3gpp/config"
|
8
8
|
require_relative "relaton_3gpp/util"
|
9
|
+
require_relative "relaton_3gpp/document_type"
|
9
10
|
require_relative "relaton_3gpp/release"
|
10
11
|
require_relative "relaton_3gpp/bibliographic_item"
|
11
12
|
require_relative "relaton_3gpp/hash_converter"
|
data/relaton_3gpp.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
|
39
39
|
spec.add_dependency "mdb", "~> 0.5.0"
|
40
40
|
spec.add_dependency "net-ftp", "~> 0.1.0"
|
41
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
41
|
+
spec.add_dependency "relaton-bib", "~> 1.17.0"
|
42
42
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
43
43
|
spec.add_dependency "rubyzip", "~> 2.3.0"
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-3gpp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
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-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mdb
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.17.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.17.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: relaton-index
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,6 +109,7 @@ files:
|
|
109
109
|
- lib/relaton_3gpp/bibliography.rb
|
110
110
|
- lib/relaton_3gpp/config.rb
|
111
111
|
- lib/relaton_3gpp/data_fetcher.rb
|
112
|
+
- lib/relaton_3gpp/document_type.rb
|
112
113
|
- lib/relaton_3gpp/hash_converter.rb
|
113
114
|
- lib/relaton_3gpp/parser.rb
|
114
115
|
- lib/relaton_3gpp/processor.rb
|