relaton-itu 1.2.0 → 1.6.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +2 -0
- data/.github/workflows/ubuntu.yml +1 -0
- data/.rubocop.yml +2 -2
- data/README.adoc +9 -69
- data/grammars/isodoc.rng +136 -21
- data/grammars/itu.rng +67 -0
- data/lib/relaton_itu/editorial_group.rb +18 -1
- data/lib/relaton_itu/hash_converter.rb +1 -1
- data/lib/relaton_itu/hit_collection.rb +1 -1
- data/lib/relaton_itu/itu_bibliographic_item.rb +0 -2
- data/lib/relaton_itu/itu_bibliography.rb +0 -8
- data/lib/relaton_itu/itu_group.rb +21 -0
- data/lib/relaton_itu/structured_identifier.rb +10 -0
- data/lib/relaton_itu/version.rb +1 -1
- data/relaton-itu.gemspec +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58aad32533947d32d65def46311fbd861058969e52e40c57e5980f7f135b7f05
|
4
|
+
data.tar.gz: 16be516de75d4cafce79f5d5c865637a712f0ea47e710681e9a0f2b36084b624
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '069aec7fac43a05b079b406ae103ed9a5452639ca376bc7dd716ff5a72acd1ce630fe139dc7c53d45015a37ed8a35687c29b7e7daac6e2124c72995c02bb89c2'
|
7
|
+
data.tar.gz: e0945e7d9e5c6a26c54d834a3c15c115e872c3eb62f2d4e2ad1bac7b80760fc431051d6b612cffbd32bbef797b0271aa0e1c2018254897a4736bb7996c3097fc
|
data/.github/workflows/macos.yml
CHANGED
@@ -26,6 +26,8 @@ jobs:
|
|
26
26
|
- name: Update gems
|
27
27
|
run: |
|
28
28
|
sudo gem install bundler --force
|
29
|
+
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
30
|
+
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
29
31
|
bundle install --jobs 4 --retry 3
|
30
32
|
- name: Run specs
|
31
33
|
run: |
|
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -33,22 +33,13 @@ Or install it yourself as:
|
|
33
33
|
|
34
34
|
[source,ruby]
|
35
35
|
----
|
36
|
-
require '
|
36
|
+
require 'relaton_itu'
|
37
37
|
|
38
38
|
hit_collection = RelatonItu::ItuBibliography.search("ITU-T L.163")
|
39
|
-
=>
|
40
|
-
<RelatonItu::Hit:0x007fe50780a220 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (12/2007)">,
|
41
|
-
<RelatonItu::Hit:0x007fe50780a1d0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T F.163 (08/1992)">,
|
42
|
-
<RelatonItu::Hit:0x007fe50780a180 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (11/2005)">,
|
43
|
-
<RelatonItu::Hit:0x007fe50780a130 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (03/2004)">,
|
44
|
-
<RelatonItu::Hit:0x007fe50780a0e0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T Q.163 (11/1988)">,
|
45
|
-
<RelatonItu::Hit:0x007fe50780a090 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T J.163 (03/2001)">,
|
46
|
-
<RelatonItu::Hit:0x007fe50780a040 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T F.163 (07/1996)">,
|
47
|
-
<RelatonItu::Hit:0x007fe507809ff0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T X.163 (04/1995)">,
|
48
|
-
<RelatonItu::Hit:0x007fe507809fa0 @text="ITU-T L.163" @fetched="false" @fullIdentifier="" @title="ITU-T O.163 (11/1988)">]
|
39
|
+
=> <RelatonItu::HitCollection:0x007fbf5fb4ab60 @ref=ITU-T L.163 @fetched=false>
|
49
40
|
|
50
41
|
item = hit_collection[1].fetch
|
51
|
-
|
42
|
+
=> #<RelatonItu::ItuBibliographicItem:0x007fbf1fc89548
|
52
43
|
...
|
53
44
|
----
|
54
45
|
|
@@ -56,73 +47,21 @@ hit_collection = RelatonItu::ItuBibliography.search("ITU-T L.163")
|
|
56
47
|
[source,ruby]
|
57
48
|
----
|
58
49
|
item.to_xml
|
59
|
-
=> "<bibitem id="ITU-
|
50
|
+
=> "<bibitem id="ITU-TL.1470" type="standard">
|
60
51
|
<fetched>2019-06-07</fetched>
|
61
52
|
<title type="title-main" format="text/plain" language="en" script="Latn">ITU-T J.163 (12/2007): Dynamic quality of service for the provision of real-time services over cable television networks using cable modems</title>
|
62
53
|
<title type="main" format="text/plain" language="en" script="Latn">ITU-T J.163 (12/2007): Dynamic quality of service for the provision of real-time services over cable television networks using cable modems</title>
|
63
54
|
<uri type="src">https://www.itu.int/net4/ITU-T/search/api/redirection?dest=http%3A%2F%2Fhandle.itu.int%2F11.1002%2F1000%2F9306-en&position=9&page=1</uri>
|
64
55
|
<uri type="obp">https://www.itu.int/rec/T-REC-J.163-200712-I</uri>
|
65
56
|
<docidentifier type="ITU">ITU-T J.163 (12/2007)</docidentifier>
|
66
|
-
|
67
|
-
<on>2007</on>
|
68
|
-
</date>
|
69
|
-
<contributor>
|
70
|
-
<role type="publisher"/>
|
71
|
-
<organization>
|
72
|
-
<name>International Telecommunication Union</name>
|
73
|
-
<abbreviation>ITU</abbreviation>
|
74
|
-
<uri>www.itu.int</uri>
|
75
|
-
</organization>
|
76
|
-
</contributor>
|
77
|
-
<edition>4</edition>
|
78
|
-
<language>en</language>
|
79
|
-
<script>Latn</script>
|
80
|
-
<abstract format="text/plain" language="en" script="Latn">ITU-T Recommendation J.163 addresses requirements for a client device to obtain access to network resources. In particular, it specifies a comprehensive mechanism for a client device to request a specific quality of service from the DOCSIS network. Extensive examples illustrate the use of this Recommendation. The scope of this Recommendation is to define the QoS architecture for the "Access" portion of the IPCablecom network, provided to requesting applications on a per-flow basis. The access portion of the network is defined to be between the multimedia terminal adapter (MTA) and the cable modem termination system (CMTS), including the DOCSIS network. The method of QoS allocation over the backbone is unspecified in this Recommendation. Interface to the managed IP backbone and issues related to IP multicast are not within the scope of this Recommendation. This Recommendation also recognizes that per-flow reservations may be required within the customer premises, and the protocol developed addresses this potential need.</abstract>
|
81
|
-
<status>
|
82
|
-
<stage>Published</stage>
|
83
|
-
</status>
|
84
|
-
<copyright>
|
85
|
-
<from>2007</from>
|
86
|
-
<owner>
|
87
|
-
<organization>
|
88
|
-
<name>International Telecommunication Union</name>
|
89
|
-
<abbreviation>ITU</abbreviation>
|
90
|
-
<uri>www.itu.int</uri>
|
91
|
-
</organization>
|
92
|
-
</owner>
|
93
|
-
</copyright>
|
94
|
-
<relation type="published">
|
95
|
-
<bibitem id="JSuppl.1(11/1998)">
|
96
|
-
<formattedref format="text/plain" language="en" script="Latn">J Suppl. 1 (11/1998)</formattedref>
|
97
|
-
</bibitem>
|
98
|
-
</relation>
|
99
|
-
<relation type="published">
|
100
|
-
<bibitem id="JSuppl.2(11/1998)">
|
101
|
-
<formattedref format="text/plain" language="en" script="Latn">J Suppl. 2 (11/1998)</formattedref>
|
102
|
-
</bibitem>
|
103
|
-
</relation>
|
104
|
-
<relation type="published">
|
105
|
-
<bibitem id="JSuppl.3(11/1998)">
|
106
|
-
<formattedref format="text/plain" language="en" script="Latn">J Suppl. 3 (11/1998)</formattedref>
|
107
|
-
</bibitem>
|
108
|
-
</relation>
|
109
|
-
<relation type="published">
|
110
|
-
<bibitem id="JSuppl.5(09/1999)">
|
111
|
-
<formattedref format="text/plain" language="en" script="Latn">J Suppl. 5 (09/1999)</formattedref>
|
112
|
-
</bibitem>
|
113
|
-
</relation>
|
114
|
-
<relation type="published">
|
115
|
-
<bibitem id="JSuppl.6(09/2016)">
|
116
|
-
<formattedref format="text/plain" language="en" script="Latn">J Suppl. 6 (09/2016)</formattedref>
|
117
|
-
</bibitem>
|
118
|
-
</relation>
|
57
|
+
...
|
119
58
|
</bibitem>"
|
120
59
|
----
|
121
60
|
With `bibdata: true` option XML output wrapped with `bibdata` element and `ext` element added.
|
122
61
|
[source,ruby]
|
123
62
|
----
|
124
63
|
item.to_xml bibdata: true
|
125
|
-
=> "<bibdata>
|
64
|
+
=> "<bibdata type="standard">
|
126
65
|
<fetched>2019-06-07</fetched>
|
127
66
|
...
|
128
67
|
<ext>
|
@@ -142,8 +81,9 @@ item.to_xml bibdata: true
|
|
142
81
|
[source,ruby]
|
143
82
|
----
|
144
83
|
RelatonItu::ItuBibliography.get("ITU-T L.163", "2018", {})
|
145
|
-
|
146
|
-
|
84
|
+
[relaton-itu] ("ITU-T L.163") fetching...
|
85
|
+
[relaton-itu] ("ITU-T L.163") found ITU-T L.163
|
86
|
+
=> #<RelatonItu::ItuBibliographicItem:0x007fbf5f94b9b8
|
147
87
|
...
|
148
88
|
----
|
149
89
|
|
data/grammars/isodoc.rng
CHANGED
@@ -43,7 +43,9 @@
|
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
45
|
<attribute name="target">
|
46
|
-
<data type="
|
46
|
+
<data type="string">
|
47
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
48
|
+
</data>
|
47
49
|
</attribute>
|
48
50
|
<optional>
|
49
51
|
<attribute name="type">
|
@@ -61,6 +63,11 @@
|
|
61
63
|
</choice>
|
62
64
|
</attribute>
|
63
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
64
71
|
<text/>
|
65
72
|
</element>
|
66
73
|
</define>
|
@@ -578,6 +585,8 @@
|
|
578
585
|
<ref name="ol"/>
|
579
586
|
<ref name="dl"/>
|
580
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
581
590
|
</choice>
|
582
591
|
</oneOrMore>
|
583
592
|
</element>
|
@@ -661,6 +670,16 @@
|
|
661
670
|
</choice>
|
662
671
|
</attribute>
|
663
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
664
683
|
<choice>
|
665
684
|
<zeroOrMore>
|
666
685
|
<choice>
|
@@ -697,6 +716,16 @@
|
|
697
716
|
</choice>
|
698
717
|
</attribute>
|
699
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
700
729
|
<choice>
|
701
730
|
<zeroOrMore>
|
702
731
|
<choice>
|
@@ -834,6 +863,13 @@
|
|
834
863
|
</define>
|
835
864
|
<define name="standard-document">
|
836
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
837
873
|
<ref name="bibdata"/>
|
838
874
|
<optional>
|
839
875
|
<ref name="boilerplate"/>
|
@@ -855,7 +891,7 @@
|
|
855
891
|
<oneOrMore>
|
856
892
|
<choice>
|
857
893
|
<ref name="content"/>
|
858
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
859
895
|
<ref name="foreword"/>
|
860
896
|
<ref name="introduction"/>
|
861
897
|
<ref name="acknowledgements"/>
|
@@ -922,6 +958,9 @@
|
|
922
958
|
<optional>
|
923
959
|
<attribute name="script"/>
|
924
960
|
</optional>
|
961
|
+
<optional>
|
962
|
+
<attribute name="type"/>
|
963
|
+
</optional>
|
925
964
|
<optional>
|
926
965
|
<attribute name="obligation">
|
927
966
|
<choice>
|
@@ -961,9 +1000,6 @@
|
|
961
1000
|
</define>
|
962
1001
|
<define name="content-subsection">
|
963
1002
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
1003
|
<ref name="Content-Section"/>
|
968
1004
|
</element>
|
969
1005
|
</define>
|
@@ -992,6 +1028,9 @@
|
|
992
1028
|
</choice>
|
993
1029
|
</attribute>
|
994
1030
|
</optional>
|
1031
|
+
<optional>
|
1032
|
+
<attribute name="type"/>
|
1033
|
+
</optional>
|
995
1034
|
<optional>
|
996
1035
|
<ref name="section-title"/>
|
997
1036
|
</optional>
|
@@ -1011,9 +1050,6 @@
|
|
1011
1050
|
</define>
|
1012
1051
|
<define name="clause">
|
1013
1052
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1053
|
<ref name="Clause-Section"/>
|
1018
1054
|
</element>
|
1019
1055
|
</define>
|
@@ -1042,18 +1078,24 @@
|
|
1042
1078
|
</choice>
|
1043
1079
|
</attribute>
|
1044
1080
|
</optional>
|
1081
|
+
<optional>
|
1082
|
+
<attribute name="type"/>
|
1083
|
+
</optional>
|
1045
1084
|
<optional>
|
1046
1085
|
<ref name="section-title"/>
|
1047
1086
|
</optional>
|
1048
1087
|
<group>
|
1049
|
-
<
|
1050
|
-
<
|
1051
|
-
<
|
1052
|
-
|
1053
|
-
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1057
1099
|
<zeroOrMore>
|
1058
1100
|
<choice>
|
1059
1101
|
<ref name="clause-subsection"/>
|
@@ -1180,6 +1222,9 @@
|
|
1180
1222
|
<optional>
|
1181
1223
|
<attribute name="script"/>
|
1182
1224
|
</optional>
|
1225
|
+
<optional>
|
1226
|
+
<attribute name="type"/>
|
1227
|
+
</optional>
|
1183
1228
|
<optional>
|
1184
1229
|
<attribute name="obligation">
|
1185
1230
|
<choice>
|
@@ -1447,11 +1492,6 @@
|
|
1447
1492
|
</optional>
|
1448
1493
|
</element>
|
1449
1494
|
</define>
|
1450
|
-
<define name="preface_abstract">
|
1451
|
-
<element name="abstract">
|
1452
|
-
<ref name="Basic-Section"/>
|
1453
|
-
</element>
|
1454
|
-
</define>
|
1455
1495
|
<define name="term-clause">
|
1456
1496
|
<element name="clause">
|
1457
1497
|
<optional>
|
@@ -1501,4 +1541,79 @@
|
|
1501
1541
|
<ref name="CitationType"/>
|
1502
1542
|
</element>
|
1503
1543
|
</define>
|
1544
|
+
<define name="amend">
|
1545
|
+
<element name="amend">
|
1546
|
+
<optional>
|
1547
|
+
<attribute name="id">
|
1548
|
+
<data type="ID"/>
|
1549
|
+
</attribute>
|
1550
|
+
</optional>
|
1551
|
+
<attribute name="change">
|
1552
|
+
<choice>
|
1553
|
+
<value>add</value>
|
1554
|
+
<value>modify</value>
|
1555
|
+
<value>delete</value>
|
1556
|
+
</choice>
|
1557
|
+
</attribute>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="path"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<attribute name="path_end"/>
|
1563
|
+
</optional>
|
1564
|
+
<optional>
|
1565
|
+
<attribute name="title"/>
|
1566
|
+
</optional>
|
1567
|
+
<optional>
|
1568
|
+
<element name="location">
|
1569
|
+
<zeroOrMore>
|
1570
|
+
<ref name="locality"/>
|
1571
|
+
</zeroOrMore>
|
1572
|
+
</element>
|
1573
|
+
</optional>
|
1574
|
+
<zeroOrMore>
|
1575
|
+
<ref name="autonumber"/>
|
1576
|
+
</zeroOrMore>
|
1577
|
+
<optional>
|
1578
|
+
<element name="description">
|
1579
|
+
<zeroOrMore>
|
1580
|
+
<ref name="BasicBlock"/>
|
1581
|
+
</zeroOrMore>
|
1582
|
+
</element>
|
1583
|
+
</optional>
|
1584
|
+
<optional>
|
1585
|
+
<element name="newcontent">
|
1586
|
+
<zeroOrMore>
|
1587
|
+
<ref name="BasicBlock"/>
|
1588
|
+
</zeroOrMore>
|
1589
|
+
</element>
|
1590
|
+
</optional>
|
1591
|
+
<optional>
|
1592
|
+
<element name="description">
|
1593
|
+
<zeroOrMore>
|
1594
|
+
<ref name="BasicBlock"/>
|
1595
|
+
</zeroOrMore>
|
1596
|
+
</element>
|
1597
|
+
</optional>
|
1598
|
+
</element>
|
1599
|
+
</define>
|
1600
|
+
<define name="autonumber">
|
1601
|
+
<element name="autonumber">
|
1602
|
+
<attribute name="type">
|
1603
|
+
<choice>
|
1604
|
+
<value>requirement</value>
|
1605
|
+
<value>recommendation</value>
|
1606
|
+
<value>permission</value>
|
1607
|
+
<value>table</value>
|
1608
|
+
<value>figure</value>
|
1609
|
+
<value>admonition</value>
|
1610
|
+
<value>formula</value>
|
1611
|
+
<value>sourcecode</value>
|
1612
|
+
<value>example</value>
|
1613
|
+
<value>note</value>
|
1614
|
+
</choice>
|
1615
|
+
</attribute>
|
1616
|
+
<text/>
|
1617
|
+
</element>
|
1618
|
+
</define>
|
1504
1619
|
</grammar>
|
data/grammars/itu.rng
CHANGED
@@ -68,6 +68,16 @@
|
|
68
68
|
<text/>
|
69
69
|
</element>
|
70
70
|
</optional>
|
71
|
+
<optional>
|
72
|
+
<element name="amendment">
|
73
|
+
<data type="int"/>
|
74
|
+
</element>
|
75
|
+
</optional>
|
76
|
+
<optional>
|
77
|
+
<element name="corrigendum">
|
78
|
+
<data type="int"/>
|
79
|
+
</element>
|
80
|
+
</optional>
|
71
81
|
</element>
|
72
82
|
</define>
|
73
83
|
<define name="BibDataExtensionType">
|
@@ -84,6 +94,18 @@
|
|
84
94
|
<optional>
|
85
95
|
<ref name="ipnoticereceived"/>
|
86
96
|
</optional>
|
97
|
+
<optional>
|
98
|
+
<ref name="meeting"/>
|
99
|
+
</optional>
|
100
|
+
<optional>
|
101
|
+
<ref name="meeting-date"/>
|
102
|
+
</optional>
|
103
|
+
<optional>
|
104
|
+
<ref name="intended-type"/>
|
105
|
+
</optional>
|
106
|
+
<optional>
|
107
|
+
<ref name="ext_source"/>
|
108
|
+
</optional>
|
87
109
|
<optional>
|
88
110
|
<ref name="structuredidentifier"/>
|
89
111
|
</optional>
|
@@ -103,6 +125,44 @@
|
|
103
125
|
</element>
|
104
126
|
</define>
|
105
127
|
</include>
|
128
|
+
<define name="meeting">
|
129
|
+
<element name="meeting">
|
130
|
+
<text/>
|
131
|
+
</element>
|
132
|
+
</define>
|
133
|
+
<define name="meeting-date">
|
134
|
+
<element name="meeting-date">
|
135
|
+
<choice>
|
136
|
+
<group>
|
137
|
+
<element name="from">
|
138
|
+
<ref name="ISO8601Date"/>
|
139
|
+
</element>
|
140
|
+
<optional>
|
141
|
+
<element name="to">
|
142
|
+
<ref name="ISO8601Date"/>
|
143
|
+
</element>
|
144
|
+
</optional>
|
145
|
+
</group>
|
146
|
+
<element name="on">
|
147
|
+
<ref name="ISO8601Date"/>
|
148
|
+
</element>
|
149
|
+
</choice>
|
150
|
+
</element>
|
151
|
+
</define>
|
152
|
+
<define name="intended-type">
|
153
|
+
<element name="intended-type">
|
154
|
+
<choice>
|
155
|
+
<value>R</value>
|
156
|
+
<value>C</value>
|
157
|
+
<value>TD</value>
|
158
|
+
</choice>
|
159
|
+
</element>
|
160
|
+
</define>
|
161
|
+
<define name="ext_source">
|
162
|
+
<element name="source">
|
163
|
+
<text/>
|
164
|
+
</element>
|
165
|
+
</define>
|
106
166
|
<define name="TextElement" combine="choice">
|
107
167
|
<choice>
|
108
168
|
<ref name="add"/>
|
@@ -244,6 +304,13 @@
|
|
244
304
|
</define>
|
245
305
|
<define name="itu">
|
246
306
|
<element name="itu-standard">
|
307
|
+
<attribute name="version"/>
|
308
|
+
<attribute name="type">
|
309
|
+
<choice>
|
310
|
+
<value>semantic</value>
|
311
|
+
<value>presentation</value>
|
312
|
+
</choice>
|
313
|
+
</attribute>
|
247
314
|
<ref name="bibdata"/>
|
248
315
|
<zeroOrMore>
|
249
316
|
<ref name="termdocsource"/>
|
@@ -25,8 +25,13 @@ module RelatonItu
|
|
25
25
|
@workgroup = workgroup.is_a?(Hash) ? ItuGroup.new(workgroup) : workgroup
|
26
26
|
end
|
27
27
|
|
28
|
+
# @return [true]
|
29
|
+
def presence?
|
30
|
+
true
|
31
|
+
end
|
32
|
+
|
28
33
|
# @param builder [Nokogiri::XML::Builder]
|
29
|
-
def to_xml(builder)
|
34
|
+
def to_xml(builder) # rubocop:disable Metrics/AbcSize
|
30
35
|
builder.editorialgroup do
|
31
36
|
builder.bureau bureau
|
32
37
|
builder.group { |b| group.to_xml b } if group
|
@@ -43,5 +48,17 @@ module RelatonItu
|
|
43
48
|
hash["workgroup"] = workgroup.to_hash if workgroup
|
44
49
|
hash
|
45
50
|
end
|
51
|
+
|
52
|
+
# @param prefix [String]
|
53
|
+
# @return [String]
|
54
|
+
def to_asciibib(prefix) # rubocop:disable Metrics/AbcSize
|
55
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
56
|
+
pref += "editorialgroup"
|
57
|
+
out = "#{pref}.bureau:: #{bureau}\n"
|
58
|
+
out += group.to_asciibib "#{pref}.group" if group
|
59
|
+
out += subgroup.to_asciibib "#{pref}.subgroup" if subgroup
|
60
|
+
out += workgroup.to_asciibib "#{pref}.workgroup" if workgroup
|
61
|
+
out
|
62
|
+
end
|
46
63
|
end
|
47
64
|
end
|
@@ -9,12 +9,10 @@ module RelatonItu
|
|
9
9
|
|
10
10
|
# @params structuredidentifier [RelatonItu::StructuredIdentifier]
|
11
11
|
def initialize(**args)
|
12
|
-
# @doctype = args.delete :doctype
|
13
12
|
if args[:doctype] && !TYPES.include?(args[:doctype])
|
14
13
|
warn "[relaton-itu] WARNING: invalid doctype: #{args[:doctype]}"
|
15
14
|
end
|
16
15
|
super
|
17
|
-
# @doctype = args[:doctype]
|
18
16
|
end
|
19
17
|
end
|
20
18
|
end
|
@@ -67,14 +67,6 @@ module RelatonItu
|
|
67
67
|
nil
|
68
68
|
end
|
69
69
|
|
70
|
-
# def fetch_pages(hits, threads)
|
71
|
-
# workers = RelatonBib::WorkersPool.new threads
|
72
|
-
# workers.worker { |w| { i: w[:i], hit: w[:hit].fetch } }
|
73
|
-
# hits.each_with_index { |hit, i| workers << { i: i, hit: hit } }
|
74
|
-
# workers.end
|
75
|
-
# workers.result.sort_by { |a| a[:i] }.map { |x| x[:hit] }
|
76
|
-
# end
|
77
|
-
|
78
70
|
def search_filter(code)
|
79
71
|
docidrx = %r{\w+\.\d+|\w\sSuppl\.\s\d+} # %r{^ITU-T\s[^\s]+}
|
80
72
|
c = code.sub(/Imp\s?/, "").match(docidrx).to_s
|
@@ -28,6 +28,16 @@ module RelatonItu
|
|
28
28
|
hash["finish"] = finish if finish
|
29
29
|
hash
|
30
30
|
end
|
31
|
+
|
32
|
+
# @param prefix [String]
|
33
|
+
# @return [String]
|
34
|
+
def to_asciibib(prefix)
|
35
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
36
|
+
pref += "period"
|
37
|
+
out = "#{pref}.start:: #{start}\n"
|
38
|
+
out += "#{pref}.finish:: #{finish}\n" if finish
|
39
|
+
out
|
40
|
+
end
|
31
41
|
end
|
32
42
|
|
33
43
|
TYPES = %w[tsag study-group work-group].freeze
|
@@ -72,5 +82,16 @@ module RelatonItu
|
|
72
82
|
hash["period"] = period.to_hash if period
|
73
83
|
hash
|
74
84
|
end
|
85
|
+
|
86
|
+
# @param prefix [String]
|
87
|
+
# @return [String]
|
88
|
+
def to_asciibib(prefix)
|
89
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
90
|
+
out = "#{pref}name:: #{name}\n"
|
91
|
+
out += "#{pref}type:: #{type}\n" if type
|
92
|
+
out += "#{pref}acronym:: #{acronym}\n" if acronym
|
93
|
+
out += period.to_asciibib prefix if period
|
94
|
+
out
|
95
|
+
end
|
75
96
|
end
|
76
97
|
end
|
@@ -34,6 +34,16 @@ module RelatonItu
|
|
34
34
|
hash
|
35
35
|
end
|
36
36
|
|
37
|
+
# @param prefix [String]
|
38
|
+
# @return [String]
|
39
|
+
def to_asciibib(prefix)
|
40
|
+
pref = prefix.empty? ? prefix : prefix + "."
|
41
|
+
pref += "structuredidentifier"
|
42
|
+
out = "#{pref}.bureau:: #{bureau}\n#{pref}.docnumber:: #{docnumber}\n"
|
43
|
+
out += "#{pref}.annexid:: #{annexid}\n" if annexid
|
44
|
+
out
|
45
|
+
end
|
46
|
+
|
37
47
|
def presence?
|
38
48
|
true
|
39
49
|
end
|
data/lib/relaton_itu/version.rb
CHANGED
data/relaton-itu.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.6.pre
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.6.pre
|
167
167
|
description: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
|
168
168
|
model'
|
169
169
|
email:
|
@@ -207,7 +207,7 @@ homepage: https://github.com/metanorma/relaton-itu
|
|
207
207
|
licenses:
|
208
208
|
- MIT
|
209
209
|
metadata: {}
|
210
|
-
post_install_message:
|
210
|
+
post_install_message:
|
211
211
|
rdoc_options: []
|
212
212
|
require_paths:
|
213
213
|
- lib
|
@@ -218,12 +218,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: 2.4.0
|
219
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
220
|
requirements:
|
221
|
-
- - "
|
221
|
+
- - ">"
|
222
222
|
- !ruby/object:Gem::Version
|
223
|
-
version:
|
223
|
+
version: 1.3.1
|
224
224
|
requirements: []
|
225
225
|
rubygems_version: 3.0.6
|
226
|
-
signing_key:
|
226
|
+
signing_key:
|
227
227
|
specification_version: 4
|
228
228
|
summary: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
|
229
229
|
model'
|