relaton-w3c 1.11.2 → 1.11.5
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/.github/workflows/rake.yml +1 -5
- data/.rubocop.yml +1 -1
- data/data/reference.W3C.DSig-label.xml +32 -32
- data/data/reference.W3C.P3P-rdfschema.xml +26 -26
- data/data/reference.W3C.PICS-labels.xml +43 -43
- data/data/reference.W3C.PICS-rules.xml +38 -38
- data/data/reference.W3C.PICS-services.xml +37 -37
- data/data/reference.W3C.daml-oil-reference.xml +39 -39
- data/data/reference.W3C.soap11.xml +56 -56
- data/data/reference.W3C.soap12-part1.xml +38 -38
- data/data/reference.W3C.soap12-part2.xml +38 -38
- data/data/reference.W3C.xkms.xml +50 -50
- data/data/reference.W3C.xml-c14n.xml +15 -15
- data/data/reference.W3C.xmldsig-core.xml +26 -26
- data/data/reference.W3C.xmlenc-core.xml +20 -20
- data/data/reference.W3C.xpath.xml +22 -22
- data/lib/relaton_w3c/data_fetcher.rb +0 -53
- data/lib/relaton_w3c/data_index.rb +52 -44
- data/lib/relaton_w3c/data_parser.rb +1 -1
- data/lib/relaton_w3c/version.rb +1 -1
- data/lib/relaton_w3c/w3c_bibliography.rb +3 -3
- data/lib/relaton_w3c.rb +0 -3
- data/relaton_w3c.gemspec +4 -4
- metadata +22 -11
- data/lib/relaton_w3c/hit.rb +0 -15
- data/lib/relaton_w3c/hit_collection.rb +0 -172
- data/lib/relaton_w3c/scrapper.rb +0 -218
@@ -1,38 +1,38 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.soap12-part1" target="http://www.w3.org/TR/soap12-part1">
|
3
|
-
<front>
|
4
|
-
<title>SOAP Version 1.2 Part 1: Messaging Framework</title>
|
5
|
-
<author initials="M." surname="Gudgin" fullname="Martin Gudgin">
|
6
|
-
<organization>Developmentor</organization>
|
7
|
-
<address>
|
8
|
-
<email>marting@develop.com</email>
|
9
|
-
</address>
|
10
|
-
</author>
|
11
|
-
<author initials="M." surname="Hadley" fullname="Marc Hadley">
|
12
|
-
<organization>Sun Microsystems</organization>
|
13
|
-
<address>
|
14
|
-
<email>marc.hadley@sun.com</email>
|
15
|
-
</address>
|
16
|
-
</author>
|
17
|
-
<author initials="N." surname="Mendelsohn" fullname="Noah Mendelsohn">
|
18
|
-
<organization>IBM</organization>
|
19
|
-
<address>
|
20
|
-
<email>Noah_Mendelsohn@us.ibm.com</email>
|
21
|
-
</address>
|
22
|
-
</author>
|
23
|
-
<author initials="J." surname="Moreau" fullname="Jean-Jacques Moreau">
|
24
|
-
<organization>Canon</organization>
|
25
|
-
<address>
|
26
|
-
<email>moreau@crf.canon.fr</email>
|
27
|
-
</address>
|
28
|
-
</author>
|
29
|
-
<author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
|
30
|
-
<organization>Microsoft</organization>
|
31
|
-
<address>
|
32
|
-
<email>henrikn@microsoft.com</email>
|
33
|
-
</address>
|
34
|
-
</author>
|
35
|
-
<date day="26" month="June" year="2002"/>
|
36
|
-
</front>
|
37
|
-
<seriesInfo value="soap12-part1" name="W3C Working Draft"/>
|
38
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.soap12-part1" target="http://www.w3.org/TR/soap12-part1">
|
3
|
+
<front>
|
4
|
+
<title>SOAP Version 1.2 Part 1: Messaging Framework</title>
|
5
|
+
<author initials="M." surname="Gudgin" fullname="Martin Gudgin">
|
6
|
+
<organization>Developmentor</organization>
|
7
|
+
<address>
|
8
|
+
<email>marting@develop.com</email>
|
9
|
+
</address>
|
10
|
+
</author>
|
11
|
+
<author initials="M." surname="Hadley" fullname="Marc Hadley">
|
12
|
+
<organization>Sun Microsystems</organization>
|
13
|
+
<address>
|
14
|
+
<email>marc.hadley@sun.com</email>
|
15
|
+
</address>
|
16
|
+
</author>
|
17
|
+
<author initials="N." surname="Mendelsohn" fullname="Noah Mendelsohn">
|
18
|
+
<organization>IBM</organization>
|
19
|
+
<address>
|
20
|
+
<email>Noah_Mendelsohn@us.ibm.com</email>
|
21
|
+
</address>
|
22
|
+
</author>
|
23
|
+
<author initials="J." surname="Moreau" fullname="Jean-Jacques Moreau">
|
24
|
+
<organization>Canon</organization>
|
25
|
+
<address>
|
26
|
+
<email>moreau@crf.canon.fr</email>
|
27
|
+
</address>
|
28
|
+
</author>
|
29
|
+
<author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
|
30
|
+
<organization>Microsoft</organization>
|
31
|
+
<address>
|
32
|
+
<email>henrikn@microsoft.com</email>
|
33
|
+
</address>
|
34
|
+
</author>
|
35
|
+
<date day="26" month="June" year="2002"/>
|
36
|
+
</front>
|
37
|
+
<seriesInfo value="soap12-part1" name="W3C Working Draft"/>
|
38
|
+
</reference>
|
@@ -1,38 +1,38 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.soap12-part2" target="http://www.w3.org/TR/soap12-part2">
|
3
|
-
<front>
|
4
|
-
<title>SOAP Version 1.2 Part 2: Adjuncts</title>
|
5
|
-
<author initials="M." surname="Gudgin" fullname="Martin Gudgin">
|
6
|
-
<organization>Developmentor</organization>
|
7
|
-
<address>
|
8
|
-
<email>marting@develop.com</email>
|
9
|
-
</address>
|
10
|
-
</author>
|
11
|
-
<author initials="M." surname="Hadley" fullname="Marc Hadley">
|
12
|
-
<organization>Sun Microsystems</organization>
|
13
|
-
<address>
|
14
|
-
<email>marc.hadley@sun.com</email>
|
15
|
-
</address>
|
16
|
-
</author>
|
17
|
-
<author initials="N." surname="Mendelsohn" fullname="Noah Mendelsohn">
|
18
|
-
<organization>IBM</organization>
|
19
|
-
<address>
|
20
|
-
<email>Noah_Mendelsohn@us.ibm.com</email>
|
21
|
-
</address>
|
22
|
-
</author>
|
23
|
-
<author initials="J." surname="Moreau" fullname="Jean-Jacques Moreau">
|
24
|
-
<organization>Canon</organization>
|
25
|
-
<address>
|
26
|
-
<email>moreau@crf.canon.fr</email>
|
27
|
-
</address>
|
28
|
-
</author>
|
29
|
-
<author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
|
30
|
-
<organization>Microsoft</organization>
|
31
|
-
<address>
|
32
|
-
<email>henrikn@microsoft.com</email>
|
33
|
-
</address>
|
34
|
-
</author>
|
35
|
-
<date day="26" month="June" year="2002"/>
|
36
|
-
</front>
|
37
|
-
<seriesInfo value="soap12-part2" name="W3C Working Draft"/>
|
38
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.soap12-part2" target="http://www.w3.org/TR/soap12-part2">
|
3
|
+
<front>
|
4
|
+
<title>SOAP Version 1.2 Part 2: Adjuncts</title>
|
5
|
+
<author initials="M." surname="Gudgin" fullname="Martin Gudgin">
|
6
|
+
<organization>Developmentor</organization>
|
7
|
+
<address>
|
8
|
+
<email>marting@develop.com</email>
|
9
|
+
</address>
|
10
|
+
</author>
|
11
|
+
<author initials="M." surname="Hadley" fullname="Marc Hadley">
|
12
|
+
<organization>Sun Microsystems</organization>
|
13
|
+
<address>
|
14
|
+
<email>marc.hadley@sun.com</email>
|
15
|
+
</address>
|
16
|
+
</author>
|
17
|
+
<author initials="N." surname="Mendelsohn" fullname="Noah Mendelsohn">
|
18
|
+
<organization>IBM</organization>
|
19
|
+
<address>
|
20
|
+
<email>Noah_Mendelsohn@us.ibm.com</email>
|
21
|
+
</address>
|
22
|
+
</author>
|
23
|
+
<author initials="J." surname="Moreau" fullname="Jean-Jacques Moreau">
|
24
|
+
<organization>Canon</organization>
|
25
|
+
<address>
|
26
|
+
<email>moreau@crf.canon.fr</email>
|
27
|
+
</address>
|
28
|
+
</author>
|
29
|
+
<author initials="H." surname="Nielsen" fullname="Henrik Frystyk Nielsen">
|
30
|
+
<organization>Microsoft</organization>
|
31
|
+
<address>
|
32
|
+
<email>henrikn@microsoft.com</email>
|
33
|
+
</address>
|
34
|
+
</author>
|
35
|
+
<date day="26" month="June" year="2002"/>
|
36
|
+
</front>
|
37
|
+
<seriesInfo value="soap12-part2" name="W3C Working Draft"/>
|
38
|
+
</reference>
|
data/data/reference.W3C.xkms.xml
CHANGED
@@ -1,50 +1,50 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.xkms" target="http://www.w3.org/TR/xkms/">
|
3
|
-
<front>
|
4
|
-
<title>XML Key Management Specification (XKMS)</title>
|
5
|
-
<author initials="W." surname="Ford" fullname="Warwick Ford">
|
6
|
-
<organization>VeriSign</organization>
|
7
|
-
<address>
|
8
|
-
<email>wford@verisign.com</email>
|
9
|
-
</address>
|
10
|
-
</author>
|
11
|
-
<author initials="P." surname="Hallam-Baker" fullname="Phillip Hallam-Baker">
|
12
|
-
<organization>VeriSign</organization>
|
13
|
-
<address>
|
14
|
-
<email>pbaker@verisign.com</email>
|
15
|
-
</address>
|
16
|
-
</author>
|
17
|
-
<author initials="B." surname="Fox" fullname="Barbara Fox">
|
18
|
-
<organization>Microsoft</organization>
|
19
|
-
<address>
|
20
|
-
<email>bfox@EXCHANGE.MICROSOFT.com</email>
|
21
|
-
</address>
|
22
|
-
</author>
|
23
|
-
<author initials="B." surname="Dillaway" fullname="Blair Dillaway">
|
24
|
-
<organization>Microsoft</organization>
|
25
|
-
<address>
|
26
|
-
<email>blaird@microsoft.com</email>
|
27
|
-
</address>
|
28
|
-
</author>
|
29
|
-
<author initials="B." surname="LaMacchia" fullname="Brian LaMacchia">
|
30
|
-
<organization>Microsoft</organization>
|
31
|
-
<address>
|
32
|
-
<email>bal@microsoft.com</email>
|
33
|
-
</address>
|
34
|
-
</author>
|
35
|
-
<author initials="J." surname="Epstein" fullname="Jeremy Epstein">
|
36
|
-
<organization>webMethods</organization>
|
37
|
-
<address>
|
38
|
-
<email>jepstein@webmethods.com</email>
|
39
|
-
</address>
|
40
|
-
</author>
|
41
|
-
<author initials="J." surname="Lapp" fullname="Joe Lapp">
|
42
|
-
<organization>webMethods</organization>
|
43
|
-
<address>
|
44
|
-
<email>jlapp@webmethods.com</email>
|
45
|
-
</address>
|
46
|
-
</author>
|
47
|
-
<date day="30" month="March" year="2001"/>
|
48
|
-
</front>
|
49
|
-
<seriesInfo value="xkms" name="W3C Note"/>
|
50
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.xkms" target="http://www.w3.org/TR/xkms/">
|
3
|
+
<front>
|
4
|
+
<title>XML Key Management Specification (XKMS)</title>
|
5
|
+
<author initials="W." surname="Ford" fullname="Warwick Ford">
|
6
|
+
<organization>VeriSign</organization>
|
7
|
+
<address>
|
8
|
+
<email>wford@verisign.com</email>
|
9
|
+
</address>
|
10
|
+
</author>
|
11
|
+
<author initials="P." surname="Hallam-Baker" fullname="Phillip Hallam-Baker">
|
12
|
+
<organization>VeriSign</organization>
|
13
|
+
<address>
|
14
|
+
<email>pbaker@verisign.com</email>
|
15
|
+
</address>
|
16
|
+
</author>
|
17
|
+
<author initials="B." surname="Fox" fullname="Barbara Fox">
|
18
|
+
<organization>Microsoft</organization>
|
19
|
+
<address>
|
20
|
+
<email>bfox@EXCHANGE.MICROSOFT.com</email>
|
21
|
+
</address>
|
22
|
+
</author>
|
23
|
+
<author initials="B." surname="Dillaway" fullname="Blair Dillaway">
|
24
|
+
<organization>Microsoft</organization>
|
25
|
+
<address>
|
26
|
+
<email>blaird@microsoft.com</email>
|
27
|
+
</address>
|
28
|
+
</author>
|
29
|
+
<author initials="B." surname="LaMacchia" fullname="Brian LaMacchia">
|
30
|
+
<organization>Microsoft</organization>
|
31
|
+
<address>
|
32
|
+
<email>bal@microsoft.com</email>
|
33
|
+
</address>
|
34
|
+
</author>
|
35
|
+
<author initials="J." surname="Epstein" fullname="Jeremy Epstein">
|
36
|
+
<organization>webMethods</organization>
|
37
|
+
<address>
|
38
|
+
<email>jepstein@webmethods.com</email>
|
39
|
+
</address>
|
40
|
+
</author>
|
41
|
+
<author initials="J." surname="Lapp" fullname="Joe Lapp">
|
42
|
+
<organization>webMethods</organization>
|
43
|
+
<address>
|
44
|
+
<email>jlapp@webmethods.com</email>
|
45
|
+
</address>
|
46
|
+
</author>
|
47
|
+
<date day="30" month="March" year="2001"/>
|
48
|
+
</front>
|
49
|
+
<seriesInfo value="xkms" name="W3C Note"/>
|
50
|
+
</reference>
|
@@ -1,15 +1,15 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.xml-c14n" target="http://www.w3.org/TR/xml-c14n">
|
3
|
-
<front>
|
4
|
-
<title>Canonical XML Version 1.0</title>
|
5
|
-
<author initials="J." surname="Boyer" fullname="John Boyer">
|
6
|
-
<organization>
|
7
|
-
</organization>
|
8
|
-
<address>
|
9
|
-
<email>jboyer@PureEdge.com</email>
|
10
|
-
</address>
|
11
|
-
</author>
|
12
|
-
<date day="15" month="March" year="2001"/>
|
13
|
-
</front>
|
14
|
-
<seriesInfo name="W3C Recommendation" value="xpath"/>
|
15
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.xml-c14n" target="http://www.w3.org/TR/xml-c14n">
|
3
|
+
<front>
|
4
|
+
<title>Canonical XML Version 1.0</title>
|
5
|
+
<author initials="J." surname="Boyer" fullname="John Boyer">
|
6
|
+
<organization>
|
7
|
+
</organization>
|
8
|
+
<address>
|
9
|
+
<email>jboyer@PureEdge.com</email>
|
10
|
+
</address>
|
11
|
+
</author>
|
12
|
+
<date day="15" month="March" year="2001"/>
|
13
|
+
</front>
|
14
|
+
<seriesInfo name="W3C Recommendation" value="xpath"/>
|
15
|
+
</reference>
|
@@ -1,26 +1,26 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.xmldsig-core" target="http://www.w3.org/TR/xmldsig-core/">
|
3
|
-
<front>
|
4
|
-
<title>XML-Signature Syntax and Processing</title>
|
5
|
-
<author initials="D." surname="Eastlake" fullname="Donald Eastlake">
|
6
|
-
<organization>Motorola</organization>
|
7
|
-
<address>
|
8
|
-
<email>dee3@torque.pothole.com</email>
|
9
|
-
</address>
|
10
|
-
</author>
|
11
|
-
<author initials="J." surname="Reagle " fullname="Joseph Reagle ">
|
12
|
-
<organization>W3C</organization>
|
13
|
-
<address>
|
14
|
-
<email>reagle@w3.org</email>
|
15
|
-
</address>
|
16
|
-
</author>
|
17
|
-
<author initials="D." surname="Solo" fullname="David Solo">
|
18
|
-
<organization>Citigroup</organization>
|
19
|
-
<address>
|
20
|
-
<email>dsolo@alum.mit.edu</email>
|
21
|
-
</address>
|
22
|
-
</author>
|
23
|
-
<date day="6" month="October" year="2000"/>
|
24
|
-
</front>
|
25
|
-
<seriesInfo value="xmldsig-core" name="W3C Recommendation"/>
|
26
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.xmldsig-core" target="http://www.w3.org/TR/xmldsig-core/">
|
3
|
+
<front>
|
4
|
+
<title>XML-Signature Syntax and Processing</title>
|
5
|
+
<author initials="D." surname="Eastlake" fullname="Donald Eastlake">
|
6
|
+
<organization>Motorola</organization>
|
7
|
+
<address>
|
8
|
+
<email>dee3@torque.pothole.com</email>
|
9
|
+
</address>
|
10
|
+
</author>
|
11
|
+
<author initials="J." surname="Reagle " fullname="Joseph Reagle ">
|
12
|
+
<organization>W3C</organization>
|
13
|
+
<address>
|
14
|
+
<email>reagle@w3.org</email>
|
15
|
+
</address>
|
16
|
+
</author>
|
17
|
+
<author initials="D." surname="Solo" fullname="David Solo">
|
18
|
+
<organization>Citigroup</organization>
|
19
|
+
<address>
|
20
|
+
<email>dsolo@alum.mit.edu</email>
|
21
|
+
</address>
|
22
|
+
</author>
|
23
|
+
<date day="6" month="October" year="2000"/>
|
24
|
+
</front>
|
25
|
+
<seriesInfo value="xmldsig-core" name="W3C Recommendation"/>
|
26
|
+
</reference>
|
@@ -1,20 +1,20 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.xmlenc-core" target="http://www.w3.org/TR/xmlenc-core/">
|
3
|
-
<front>
|
4
|
-
<title>XML Encryption Syntax and Processing</title>
|
5
|
-
<author initials="D." surname="Eastlake" fullname="Donald Eastlake">
|
6
|
-
<organization>Motorola</organization>
|
7
|
-
<address>
|
8
|
-
<email>dee3@torque.pothole.com</email>
|
9
|
-
</address>
|
10
|
-
</author>
|
11
|
-
<author initials="J." surname="Reagle " fullname="Joseph Reagle ">
|
12
|
-
<organization>W3C</organization>
|
13
|
-
<address>
|
14
|
-
<email>reagle@w3.org</email>
|
15
|
-
</address>
|
16
|
-
</author>
|
17
|
-
<date day="2" month="August" year="2002"/>
|
18
|
-
</front>
|
19
|
-
<seriesInfo value="xmlenc-core" name="W3C Candidate Recommendation"/>
|
20
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.xmlenc-core" target="http://www.w3.org/TR/xmlenc-core/">
|
3
|
+
<front>
|
4
|
+
<title>XML Encryption Syntax and Processing</title>
|
5
|
+
<author initials="D." surname="Eastlake" fullname="Donald Eastlake">
|
6
|
+
<organization>Motorola</organization>
|
7
|
+
<address>
|
8
|
+
<email>dee3@torque.pothole.com</email>
|
9
|
+
</address>
|
10
|
+
</author>
|
11
|
+
<author initials="J." surname="Reagle " fullname="Joseph Reagle ">
|
12
|
+
<organization>W3C</organization>
|
13
|
+
<address>
|
14
|
+
<email>reagle@w3.org</email>
|
15
|
+
</address>
|
16
|
+
</author>
|
17
|
+
<date day="2" month="August" year="2002"/>
|
18
|
+
</front>
|
19
|
+
<seriesInfo value="xmlenc-core" name="W3C Candidate Recommendation"/>
|
20
|
+
</reference>
|
@@ -1,22 +1,22 @@
|
|
1
|
-
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
-
<reference anchor="W3C.xpath" target="http://www.w3.org/TR/xpath">
|
3
|
-
<front>
|
4
|
-
<title>XML Path Language (XPath) Version 1.0</title>
|
5
|
-
<author initials="J." surname="Clark" fullname="James Clark">
|
6
|
-
<organization>
|
7
|
-
</organization>
|
8
|
-
<address>
|
9
|
-
<email>jjc@jclark.com</email>
|
10
|
-
</address>
|
11
|
-
</author>
|
12
|
-
<author initials="S." surname="DeRose" fullname="Steve DeRose">
|
13
|
-
<organization>
|
14
|
-
</organization>
|
15
|
-
<address>
|
16
|
-
<email>Steven_DeRose@Brown.edu</email>
|
17
|
-
</address>
|
18
|
-
</author>
|
19
|
-
<date day="16" month="November" year="1999"/>
|
20
|
-
</front>
|
21
|
-
<seriesInfo name="W3C Recommendation" value="xpath"/>
|
22
|
-
</reference>
|
1
|
+
<?xml version="1.0" encoding='UTF-8'?>
|
2
|
+
<reference anchor="W3C.xpath" target="http://www.w3.org/TR/xpath">
|
3
|
+
<front>
|
4
|
+
<title>XML Path Language (XPath) Version 1.0</title>
|
5
|
+
<author initials="J." surname="Clark" fullname="James Clark">
|
6
|
+
<organization>
|
7
|
+
</organization>
|
8
|
+
<address>
|
9
|
+
<email>jjc@jclark.com</email>
|
10
|
+
</address>
|
11
|
+
</author>
|
12
|
+
<author initials="S." surname="DeRose" fullname="Steve DeRose">
|
13
|
+
<organization>
|
14
|
+
</organization>
|
15
|
+
<address>
|
16
|
+
<email>Steven_DeRose@Brown.edu</email>
|
17
|
+
</address>
|
18
|
+
</author>
|
19
|
+
<date day="16" month="November" year="1999"/>
|
20
|
+
</front>
|
21
|
+
<seriesInfo name="W3C Recommendation" value="xpath"/>
|
22
|
+
</reference>
|
@@ -67,59 +67,6 @@ module RelatonW3c
|
|
67
67
|
@index.sort!.save
|
68
68
|
end
|
69
69
|
|
70
|
-
#
|
71
|
-
# Create index file
|
72
|
-
#
|
73
|
-
# def create_index
|
74
|
-
# index_file = "index-w3c.yaml"
|
75
|
-
# index_yaml = @index.sort do |a, b|
|
76
|
-
# compare_index_items a, b
|
77
|
-
# end.to_yaml
|
78
|
-
# File.write index_file, index_yaml, encoding: "UTF-8"
|
79
|
-
# end
|
80
|
-
|
81
|
-
#
|
82
|
-
# Compare index items
|
83
|
-
#
|
84
|
-
# @param [Hash] aid first item
|
85
|
-
# @param [Hash] bid second item
|
86
|
-
#
|
87
|
-
# @return [Integer] comparison result
|
88
|
-
#
|
89
|
-
# def compare_index_items(aid, bid) # rubocop:disable Metrics/AbcSize
|
90
|
-
# ret = aid[:code] <=> bid[:code]
|
91
|
-
# ret = stage_weight(bid[:stage]) <=> stage_weight(aid[:stage]) if ret.zero?
|
92
|
-
# ret = date_weight(bid[:date]) <=> date_weight(aid[:date]) if ret.zero?
|
93
|
-
# # ret = aid[:type] <=> bid[:type] if ret.zero?
|
94
|
-
# ret
|
95
|
-
# end
|
96
|
-
|
97
|
-
#
|
98
|
-
# Weight of stage
|
99
|
-
#
|
100
|
-
# @param [String, nil] stage stage
|
101
|
-
#
|
102
|
-
# @return [Integer] weight
|
103
|
-
#
|
104
|
-
# def stage_weight(stage)
|
105
|
-
# return DataParser::STAGES.size if stage.nil?
|
106
|
-
|
107
|
-
# DataParser::STAGES.keys.index(stage)
|
108
|
-
# end
|
109
|
-
|
110
|
-
#
|
111
|
-
# Weight of date
|
112
|
-
#
|
113
|
-
# @param [String] date date
|
114
|
-
#
|
115
|
-
# @return [String] weight
|
116
|
-
#
|
117
|
-
# def date_weight(date)
|
118
|
-
# return "99999999" if date.nil?
|
119
|
-
|
120
|
-
# date
|
121
|
-
# end
|
122
|
-
|
123
70
|
#
|
124
71
|
# Query RDF source for documents
|
125
72
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "zip"
|
2
|
+
|
1
3
|
module RelatonW3c
|
2
4
|
class DataIndex
|
3
5
|
#
|
@@ -11,24 +13,6 @@ module RelatonW3c
|
|
11
13
|
@index = index
|
12
14
|
end
|
13
15
|
|
14
|
-
#
|
15
|
-
# Create index from a GitHub repository
|
16
|
-
#
|
17
|
-
# @return [RelatonW3c::DataIndex] data index
|
18
|
-
#
|
19
|
-
def self.create_from_repo
|
20
|
-
resp_index = Net::HTTP.get(URI("#{W3cBibliography::SOURCE}index-w3c.yaml"))
|
21
|
-
|
22
|
-
# Newer versions of Psych uses the `permitted_classes:` parameter
|
23
|
-
index = if YAML.method(:safe_load).parameters.collect(&:last).index(:permitted_classes)
|
24
|
-
YAML.safe_load(resp_index, permitted_classes: [Symbol])
|
25
|
-
else
|
26
|
-
YAML.safe_load(resp_index, [Symbol])
|
27
|
-
end
|
28
|
-
|
29
|
-
DataIndex.new index: index
|
30
|
-
end
|
31
|
-
|
32
16
|
#
|
33
17
|
# Add document to index
|
34
18
|
#
|
@@ -36,7 +20,9 @@ module RelatonW3c
|
|
36
20
|
# @param [String] file path to document file
|
37
21
|
#
|
38
22
|
def add(docnumber, file)
|
39
|
-
|
23
|
+
dnparts = self.class.docnumber_to_parts docnumber
|
24
|
+
dnparts[:file] = file
|
25
|
+
@index << dnparts
|
40
26
|
end
|
41
27
|
|
42
28
|
#
|
@@ -64,11 +50,14 @@ module RelatonW3c
|
|
64
50
|
# @return [String] document's filename
|
65
51
|
#
|
66
52
|
def search(ref) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
67
|
-
dparts = docnumber_to_parts(ref)
|
53
|
+
dparts = self.class.docnumber_to_parts(ref)
|
54
|
+
return if dparts[:code].nil?
|
55
|
+
|
68
56
|
@index.detect do |parts|
|
69
57
|
parts[:code].match?(/^#{Regexp.escape dparts[:code]}/i) &&
|
70
58
|
(dparts[:stage].nil? || dparts[:stage].casecmp?(parts[:stage])) &&
|
71
|
-
(dparts[:type].nil? || dparts[:type].casecmp?(parts[:type])
|
59
|
+
(dparts[:type].nil? || dparts[:type].casecmp?(parts[:type]) ||
|
60
|
+
(parts[:type].nil? && dparts[:type] == "TR")) &&
|
72
61
|
(dparts[:date].nil? || dparts[:date] == parts[:date]) &&
|
73
62
|
(dparts[:suff].nil? || dparts[:suff].casecmp?(parts[:suff]))
|
74
63
|
end&.fetch(:file)
|
@@ -83,7 +72,7 @@ module RelatonW3c
|
|
83
72
|
# @return [Integer] comparison result
|
84
73
|
#
|
85
74
|
def compare_index_items(aid, bid) # rubocop:disable Metrics/AbcSize
|
86
|
-
ret = aid[:code] <=> bid[:code]
|
75
|
+
ret = aid[:code].downcase <=> bid[:code].downcase
|
87
76
|
ret = stage_weight(bid[:stage]) <=> stage_weight(aid[:stage]) if ret.zero?
|
88
77
|
ret = date_weight(bid[:date]) <=> date_weight(aid[:date]) if ret.zero?
|
89
78
|
# ret = aid[:type] <=> bid[:type] if ret.zero?
|
@@ -116,28 +105,47 @@ module RelatonW3c
|
|
116
105
|
date
|
117
106
|
end
|
118
107
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
(
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
108
|
+
class << self
|
109
|
+
#
|
110
|
+
# Create index from a GitHub repository
|
111
|
+
#
|
112
|
+
# @return [RelatonW3c::DataIndex] data index
|
113
|
+
#
|
114
|
+
def create_from_repo # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
115
|
+
resp = Zip::InputStream.new URI("#{W3cBibliography::SOURCE}index-w3c.zip").open
|
116
|
+
zip = resp.get_next_entry
|
117
|
+
|
118
|
+
# Newer versions of Psych uses the `permitted_classes:` parameter
|
119
|
+
index = if YAML.method(:safe_load).parameters.collect(&:last).index(:permitted_classes)
|
120
|
+
YAML.safe_load(zip.get_input_stream.read, permitted_classes: [Symbol])
|
121
|
+
else
|
122
|
+
YAML.safe_load(zip.get_input_stream.read, [Symbol])
|
123
|
+
end
|
124
|
+
|
125
|
+
DataIndex.new index: index
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Parse document number to parts
|
130
|
+
#
|
131
|
+
# @param [String] docnumber document number
|
132
|
+
#
|
133
|
+
# @return [Hash{Symbol=>String}] document parts
|
134
|
+
#
|
135
|
+
def docnumber_to_parts(docnumber) # rubocop:disable Metrics/MethodLength
|
136
|
+
%r{
|
137
|
+
^(?:(?:(?<stage>WD|CRD|CR|PR|PER|REC|SPSD|OBSL|RET)|(?<type>D?NOTE|TR))-)?
|
138
|
+
(?<code>\w+(?:[+-][\w.]+)*?)
|
139
|
+
(?:-(?<date>\d{8}|\d{6}|\d{4}))?
|
140
|
+
(?:/(?<suff>\w+))?$
|
141
|
+
}xi =~ docnumber
|
142
|
+
entry = { code: code }
|
143
|
+
entry[:stage] = stage if stage
|
144
|
+
entry[:type] = type if type
|
145
|
+
entry[:date] = date if date
|
146
|
+
entry[:suff] = suff if suff
|
147
|
+
entry
|
148
|
+
end
|
141
149
|
end
|
142
150
|
end
|
143
151
|
end
|
@@ -169,7 +169,7 @@ module RelatonW3c
|
|
169
169
|
#
|
170
170
|
def type
|
171
171
|
# thre are many types, we need to find the right one
|
172
|
-
@type ||= types_stages&.detect { |t| USED_TYPES.include?(t) }
|
172
|
+
@type ||= types_stages&.detect { |t| USED_TYPES.include?(t) } || "technicalReport"
|
173
173
|
end
|
174
174
|
|
175
175
|
#
|
data/lib/relaton_w3c/version.rb
CHANGED