rdf-tabular 1.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/spec/data/countries-minimal.json +38 -0
  4. data/spec/data/countries-minimal.ttl +36 -0
  5. data/spec/data/countries-standard.json +86 -0
  6. data/spec/data/countries-standard.ttl +75 -0
  7. data/spec/data/countries.csv +4 -0
  8. data/spec/data/countries.csv-minimal.json +16 -0
  9. data/spec/data/countries.csv-minimal.ttl +19 -0
  10. data/spec/data/countries.csv-standard.json +33 -0
  11. data/spec/data/countries.csv-standard.ttl +44 -0
  12. data/spec/data/countries.html +88 -0
  13. data/spec/data/countries.json +53 -0
  14. data/spec/data/countries_embed-minimal.json +38 -0
  15. data/spec/data/countries_embed-minimal.ttl +36 -0
  16. data/spec/data/countries_embed-standard.json +86 -0
  17. data/spec/data/countries_embed-standard.ttl +75 -0
  18. data/spec/data/countries_embed.html +88 -0
  19. data/spec/data/countries_html-minimal.json +38 -0
  20. data/spec/data/countries_html-minimal.ttl +36 -0
  21. data/spec/data/countries_html-standard.json +86 -0
  22. data/spec/data/countries_html-standard.ttl +75 -0
  23. data/spec/data/country-codes-and-names-minimal.json +19 -0
  24. data/spec/data/country-codes-and-names-minimal.ttl +22 -0
  25. data/spec/data/country-codes-and-names-standard.json +47 -0
  26. data/spec/data/country-codes-and-names-standard.ttl +45 -0
  27. data/spec/data/country-codes-and-names.csv +5 -0
  28. data/spec/data/country_slice.csv +4 -0
  29. data/spec/data/junior-roles.csv +3 -0
  30. data/spec/data/junior-roles.json +54 -0
  31. data/spec/data/roles-minimal.json +32 -0
  32. data/spec/data/roles-minimal.ttl +36 -0
  33. data/spec/data/roles-standard.json +56 -0
  34. data/spec/data/roles-standard.ttl +66 -0
  35. data/spec/data/roles.json +23 -0
  36. data/spec/data/senior-roles.csv +3 -0
  37. data/spec/data/senior-roles.json +52 -0
  38. data/spec/data/test232-metadata.json +10 -0
  39. data/spec/data/test232.csv +3 -0
  40. data/spec/data/tree-ops-atd.json +1 -0
  41. data/spec/data/tree-ops-ext-minimal.json +42 -0
  42. data/spec/data/tree-ops-ext-minimal.ttl +34 -0
  43. data/spec/data/tree-ops-ext-standard.json +93 -0
  44. data/spec/data/tree-ops-ext-standard.ttl +82 -0
  45. data/spec/data/tree-ops-ext.csv +4 -0
  46. data/spec/data/tree-ops-ext.json +81 -0
  47. data/spec/data/tree-ops-minimal.json +18 -0
  48. data/spec/data/tree-ops-minimal.ttl +14 -0
  49. data/spec/data/tree-ops-standard.json +44 -0
  50. data/spec/data/tree-ops-standard.ttl +44 -0
  51. data/spec/data/tree-ops-virtual-minimal.json +32 -0
  52. data/spec/data/tree-ops-virtual-minimal.ttl +25 -0
  53. data/spec/data/tree-ops-virtual-standard.json +49 -0
  54. data/spec/data/tree-ops-virtual-standard.ttl +49 -0
  55. data/spec/data/tree-ops-virtual.json +48 -0
  56. data/spec/data/tree-ops.csv +3 -0
  57. data/spec/data/tree-ops.csv-metadata.json +43 -0
  58. data/spec/data/tree-ops.html +54 -0
  59. data/spec/data/tree-ops.tsv +3 -0
  60. data/spec/format_spec.rb +1 -1
  61. metadata +116 -4
  62. data/spec/w3c-csvw +0 -1
@@ -0,0 +1,86 @@
1
+ {
2
+ "tables": [
3
+ {
4
+ "url": "http://example.org/countries.csv",
5
+ "row": [
6
+ {
7
+ "url": "http://example.org/countries.csv#row=2",
8
+ "rownum": 1,
9
+ "describes": [
10
+ {
11
+ "@id": "http://example.org/countries.csv#AD",
12
+ "http://www.geonames.org/ontology#countryCode": "AD",
13
+ "schema:latitude": 42.546245,
14
+ "schema:longitude": 1.601554,
15
+ "schema:name": "Andorra"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "url": "http://example.org/countries.csv#row=3",
21
+ "rownum": 2,
22
+ "describes": [
23
+ {
24
+ "@id": "http://example.org/countries.csv#AE",
25
+ "http://www.geonames.org/ontology#countryCode": "AE",
26
+ "schema:latitude": 23.424076,
27
+ "schema:longitude": 53.847818,
28
+ "schema:name": "United Arab Emirates"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "url": "http://example.org/countries.csv#row=4",
34
+ "rownum": 3,
35
+ "describes": [
36
+ {
37
+ "@id": "http://example.org/countries.csv#AF",
38
+ "http://www.geonames.org/ontology#countryCode": "AF",
39
+ "schema:latitude": 33.93911,
40
+ "schema:longitude": 67.709953,
41
+ "schema:name": "Afghanistan"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "url": "http://example.org/country_slice.csv",
49
+ "row": [
50
+ {
51
+ "url": "http://example.org/country_slice.csv#row=2",
52
+ "rownum": 1,
53
+ "describes": [
54
+ {
55
+ "countryRef": "http://example.org/countries.csv#AF",
56
+ "year": "1960",
57
+ "population": 9616353
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "url": "http://example.org/country_slice.csv#row=3",
63
+ "rownum": 2,
64
+ "describes": [
65
+ {
66
+ "countryRef": "http://example.org/countries.csv#AF",
67
+ "year": "1961",
68
+ "population": 9799379
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "url": "http://example.org/country_slice.csv#row=4",
74
+ "rownum": 3,
75
+ "describes": [
76
+ {
77
+ "countryRef": "http://example.org/countries.csv#AF",
78
+ "year": "1962",
79
+ "population": 9989846
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,75 @@
1
+ @prefix csvw: <http://www.w3.org/ns/csvw#> .
2
+ @prefix geonames: <http://www.geonames.org/ontology#> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+ @prefix schema: <http://schema.org/> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+
7
+ <http://example.org/countries.csv#AD> schema:latitude "42.546245"^^xsd:double;
8
+ schema:longitude "1.601554"^^xsd:double;
9
+ schema:name "Andorra";
10
+ geonames:countryCode "AD" .
11
+
12
+ <http://example.org/countries.csv#AE> schema:latitude "23.424076"^^xsd:double;
13
+ schema:longitude "53.847818"^^xsd:double;
14
+ schema:name "United Arab Emirates";
15
+ geonames:countryCode "AE" .
16
+
17
+ <http://example.org/countries.csv#AF> schema:latitude "33.93911"^^xsd:double;
18
+ schema:longitude "67.709953"^^xsd:double;
19
+ schema:name "Afghanistan";
20
+ geonames:countryCode "AF" .
21
+
22
+ [
23
+ a csvw:TableGroup;
24
+ csvw:table [
25
+ a csvw:Table;
26
+ csvw:row [
27
+ a csvw:Row;
28
+ csvw:describes <http://example.org/countries.csv#AD>;
29
+ csvw:rownum "1"^^xsd:integer;
30
+ csvw:url <http://example.org/countries.csv#row=2>
31
+ ], [
32
+ a csvw:Row;
33
+ csvw:describes <http://example.org/countries.csv#AE>;
34
+ csvw:rownum "2"^^xsd:integer;
35
+ csvw:url <http://example.org/countries.csv#row=3>
36
+ ], [
37
+ a csvw:Row;
38
+ csvw:describes <http://example.org/countries.csv#AF>;
39
+ csvw:rownum "3"^^xsd:integer;
40
+ csvw:url <http://example.org/countries.csv#row=4>
41
+ ];
42
+ csvw:url <http://example.org/countries.csv>
43
+ ], [
44
+ a csvw:Table;
45
+ csvw:row [
46
+ a csvw:Row;
47
+ csvw:describes [
48
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
49
+ <http://example.org/country_slice.csv#population> "9616353"^^xsd:integer;
50
+ <http://example.org/country_slice.csv#year> "1960"^^xsd:gYear
51
+ ];
52
+ csvw:rownum "1"^^xsd:integer;
53
+ csvw:url <http://example.org/country_slice.csv#row=2>
54
+ ], [
55
+ a csvw:Row;
56
+ csvw:describes [
57
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
58
+ <http://example.org/country_slice.csv#population> "9799379"^^xsd:integer;
59
+ <http://example.org/country_slice.csv#year> "1961"^^xsd:gYear
60
+ ];
61
+ csvw:rownum "2"^^xsd:integer;
62
+ csvw:url <http://example.org/country_slice.csv#row=3>
63
+ ], [
64
+ a csvw:Row;
65
+ csvw:describes [
66
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
67
+ <http://example.org/country_slice.csv#population> "9989846"^^xsd:integer;
68
+ <http://example.org/country_slice.csv#year> "1962"^^xsd:gYear
69
+ ];
70
+ csvw:rownum "3"^^xsd:integer;
71
+ csvw:url <http://example.org/country_slice.csv#row=4>
72
+ ];
73
+ csvw:url <http://example.org/country_slice.csv>
74
+ ]
75
+ ] .
@@ -0,0 +1,19 @@
1
+ [
2
+ {
3
+ "country": "AD",
4
+ "name": "Andorra"
5
+ },
6
+ {
7
+ "country": "AF",
8
+ "name": "Afghanistan"
9
+ },
10
+ {
11
+ "country": "AI",
12
+ "name": "Anguilla"
13
+ },
14
+ {
15
+ "country": "AL",
16
+ "name": "Albania"
17
+ }
18
+ ]
19
+
@@ -0,0 +1,22 @@
1
+ @prefix : <http://example.org/country-codes-and-names.csv#> .
2
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
3
+
4
+ [
5
+ :country "AL";
6
+ :name "Albania"
7
+ ] .
8
+
9
+ [
10
+ :country "AI";
11
+ :name "Anguilla"
12
+ ] .
13
+
14
+ [
15
+ :country "AF";
16
+ :name "Afghanistan"
17
+ ] .
18
+
19
+ [
20
+ :country "AD";
21
+ :name "Andorra"
22
+ ] .
@@ -0,0 +1,47 @@
1
+ {
2
+ "tables": [{
3
+ "url": "http://example.org/country-codes-and-names.csv",
4
+ "row": [
5
+ {
6
+ "url": "http://example.org/country-codes-and-names.csv#row=2",
7
+ "rownum": 1,
8
+ "describes": [
9
+ {
10
+ "country": "AD",
11
+ "name": "Andorra"
12
+ }
13
+ ]
14
+ },
15
+ {
16
+ "url": "http://example.org/country-codes-and-names.csv#row=3",
17
+ "rownum": 2,
18
+ "describes": [
19
+ {
20
+ "country": "AF",
21
+ "name": "Afghanistan"
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "url": "http://example.org/country-codes-and-names.csv#row=4",
27
+ "rownum": 3,
28
+ "describes": [
29
+ {
30
+ "country": "AI",
31
+ "name": "Anguilla"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "url": "http://example.org/country-codes-and-names.csv#row=5",
37
+ "rownum": 4,
38
+ "describes": [
39
+ {
40
+ "country": "AL",
41
+ "name": "Albania"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }]
47
+ }
@@ -0,0 +1,45 @@
1
+ @prefix : <http://example.org/country-codes-and-names.csv#> .
2
+ @prefix csvw: <http://www.w3.org/ns/csvw#> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
+
6
+ [
7
+ a csvw:TableGroup;
8
+ csvw:table [
9
+ a csvw:Table;
10
+ csvw:row [
11
+ a csvw:Row;
12
+ csvw:describes [
13
+ :country "AD";
14
+ :name "Andorra"
15
+ ];
16
+ csvw:rownum 1;
17
+ csvw:url <http://example.org/country-codes-and-names.csv#row=2>
18
+ ], [
19
+ a csvw:Row;
20
+ csvw:describes [
21
+ :country "AF";
22
+ :name "Afghanistan"
23
+ ];
24
+ csvw:rownum 2;
25
+ csvw:url <http://example.org/country-codes-and-names.csv#row=3>
26
+ ], [
27
+ a csvw:Row;
28
+ csvw:describes [
29
+ :country "AI";
30
+ :name "Anguilla"
31
+ ];
32
+ csvw:rownum 3;
33
+ csvw:url <http://example.org/country-codes-and-names.csv#row=4>
34
+ ], [
35
+ a csvw:Row;
36
+ csvw:describes [
37
+ :country "AL";
38
+ :name "Albania"
39
+ ];
40
+ csvw:rownum 4;
41
+ csvw:url <http://example.org/country-codes-and-names.csv#row=5>
42
+ ];
43
+ csvw:url <http://example.org/country-codes-and-names.csv>
44
+ ]
45
+ ] .
@@ -0,0 +1,5 @@
1
+ country,name
2
+ AD,Andorra
3
+ AF,Afghanistan
4
+ AI,Anguilla
5
+ AL,Albania
@@ -0,0 +1,4 @@
1
+ countryRef,year,population
2
+ AF,1960,9616353
3
+ AF,1961,9799379
4
+ AF,1962,9989846
@@ -0,0 +1,3 @@
1
+ Reporting Senior Post,Grade,Payscale Minimum (£),Payscale Maximum (£),Generic Job Title,Number of Posts (FTE),Profession
2
+ 90115,4,17426,20002,Administrator,8.67,Operational Delivery
3
+ 90115,5,19546,22478,Administrator,0.5,Operational Delivery
@@ -0,0 +1,54 @@
1
+ {
2
+ "@context": "http://www.w3.org/ns/csvw",
3
+ "columns": [{
4
+ "name": "reportsToSenior",
5
+ "titles": "Reporting Senior Post",
6
+ "datatype": "string",
7
+ "propertyUrl": "http://example.org/def/reportsTo",
8
+ "valueUrl": "senior-roles.csv#post-{reportsToSenior}",
9
+ "required": true
10
+ }, {
11
+ "name": "grade",
12
+ "titles": "Grade",
13
+ "datatype": "string",
14
+ "propertyUrl": "http://example.org/def/grade"
15
+ }, {
16
+ "name": "min_pay",
17
+ "titles": "Payscale Minimum (£)",
18
+ "datatype": "integer",
19
+ "propertyUrl": "http://example.org/def/min_pay"
20
+ }, {
21
+ "name": "max_pay",
22
+ "titles": "Payscale Maximum (£)",
23
+ "datatype": "integer",
24
+ "propertyUrl": "http://example.org/def/max_pay"
25
+ }, {
26
+ "name": "job",
27
+ "titles": "Generic Job Title",
28
+ "datatype": "string",
29
+ "propertyUrl": "http://example.org/def/job"
30
+ }, {
31
+ "name": "number",
32
+ "titles": "Number of Posts (FTE)",
33
+ "datatype": "number",
34
+ "propertyUrl": "http://example.org/def/number-of-posts"
35
+ }, {
36
+ "name": "profession",
37
+ "titles": "Profession",
38
+ "datatype": "string",
39
+ "propertyUrl": "http://example.org/def/profession"
40
+ }],
41
+ "foreignKeys": [{
42
+ "columnReference": "reportsToSenior",
43
+ "reference": {
44
+ "resource": "senior-roles.csv",
45
+ "columnReference": "ref"
46
+ }
47
+ }, {
48
+ "columnReference": "profession",
49
+ "reference": {
50
+ "resource": "gov.uk/professions.csv",
51
+ "columnReference": "name"
52
+ }
53
+ }]
54
+ }
@@ -0,0 +1,32 @@
1
+ [{
2
+ "@id": "http://example.org/senior-roles.csv#post-90115",
3
+ "dc:identifier": "90115",
4
+ "foaf:name": "Steve Egan",
5
+ "http://example.org/def/grade": "SCS1A",
6
+ "http://example.org/def/job": "Deputy Chief Executive",
7
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90334",
8
+ "http://example.org/def/profession": "Finance"
9
+ }, {
10
+ "@id": "http://example.org/senior-roles.csv#post-90334",
11
+ "dc:identifier": "90334",
12
+ "foaf:name": "Sir Alan Langlands",
13
+ "http://example.org/def/grade": "SCS4",
14
+ "http://example.org/def/job": "Chief Executive",
15
+ "http://example.org/def/profession": "Policy"
16
+ }, {
17
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90115",
18
+ "http://example.org/def/grade": "4",
19
+ "http://example.org/def/min_pay": 17426,
20
+ "http://example.org/def/max_pay": 20002,
21
+ "http://example.org/def/job": "Administrator",
22
+ "http://example.org/def/number-of-posts": 8.67,
23
+ "http://example.org/def/profession": "Operational Delivery"
24
+ }, {
25
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90115",
26
+ "http://example.org/def/grade": "5",
27
+ "http://example.org/def/min_pay": 19546,
28
+ "http://example.org/def/max_pay": 22478,
29
+ "http://example.org/def/job": "Administrator",
30
+ "http://example.org/def/number-of-posts": 0.5,
31
+ "http://example.org/def/profession": "Operational Delivery"
32
+ }]
@@ -0,0 +1,36 @@
1
+ @prefix dc: <http://purl.org/dc/terms/> .
2
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
3
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4
+
5
+ <http://example.org/senior-roles.csv#post-90115>
6
+ dc:identifier "90115" ;
7
+ foaf:name "Steve Egan" ;
8
+ <http://example.org/def/grade> "SCS1A" ;
9
+ <http://example.org/def/job> "Deputy Chief Executive" ;
10
+ <http://example.org/def/reportsTo> <http://example.org/senior-roles.csv#post-90334> ;
11
+ <http://example.org/def/profession> "Finance" .
12
+
13
+ <http://example.org/senior-roles.csv#post-90334>
14
+ dc:identifier "90334" ;
15
+ foaf:name "Sir Alan Langlands" ;
16
+ <http://example.org/def/grade> "SCS4" ;
17
+ <http://example.org/def/job> "Chief Executive" ;
18
+ <http://example.org/def/profession> "Policy" .
19
+
20
+ _:d8b8e40c-8c74-458b-99f7-64d1cf5c65f2
21
+ <http://example.org/def/reportsTo> <http://example.org/senior-roles.csv#post-90115> ;
22
+ <http://example.org/def/grade> "4" ;
23
+ <http://example.org/def/min_pay> "17426"^^xsd:integer ;
24
+ <http://example.org/def/max_pay> "20002"^^xsd:integer ;
25
+ <http://example.org/def/job> "Administrator" ;
26
+ <http://example.org/def/number-of-posts> "8.67"^^xsd:double ;
27
+ <http://example.org/def/profession> "Operational Delivery" .
28
+
29
+ _:fa1fa954-dd5f-4aa1-b2bc-20bf9867fac6
30
+ <http://example.org/def/reportsTo> <http://example.org/senior-roles.csv#post-90115> ;
31
+ <http://example.org/def/grade> "5" ;
32
+ <http://example.org/def/min_pay> "19546"^^xsd:integer ;
33
+ <http://example.org/def/max_pay> "22478"^^xsd:integer ;
34
+ <http://example.org/def/job> "Administrator" ;
35
+ <http://example.org/def/number-of-posts> "0.5"^^xsd:double ;
36
+ <http://example.org/def/profession> "Operational Delivery" .
@@ -0,0 +1,56 @@
1
+ {
2
+ "tables": [{
3
+ "url": "http://example.org/senior-roles.csv",
4
+ "row": [{
5
+ "url": "http://example.org/senior-roles.csv#row=2",
6
+ "rownum": 1,
7
+ "describes": [{
8
+ "@id": "http://example.org/senior-roles.csv#post-90115",
9
+ "dc:identifier": "90115",
10
+ "foaf:name": "Steve Egan",
11
+ "http://example.org/def/grade": "SCS1A",
12
+ "http://example.org/def/job": "Deputy Chief Executive",
13
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90334",
14
+ "http://example.org/def/profession": "Finance"
15
+ }]
16
+ }, {
17
+ "url": "http://example.org/senior-roles.csv#row=3",
18
+ "rownum": 2,
19
+ "describes": [{
20
+ "@id": "http://example.org/senior-roles.csv#post-90334",
21
+ "dc:identifier": "90334",
22
+ "foaf:name": "Sir Alan Langlands",
23
+ "http://example.org/def/grade": "SCS4",
24
+ "http://example.org/def/job": "Chief Executive",
25
+ "http://example.org/def/profession": "Policy"
26
+ }]
27
+ }]
28
+ }, {
29
+ "url": "http://example.org/junior-roles.csv",
30
+ "row": [{
31
+ "url": "http://example.org/junior-roles.csv#row=2",
32
+ "rownum": 1,
33
+ "describes": [{
34
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90115",
35
+ "http://example.org/def/grade": "4",
36
+ "http://example.org/def/min_pay": 17426,
37
+ "http://example.org/def/max_pay": 20002,
38
+ "http://example.org/def/job": "Administrator",
39
+ "http://example.org/def/number-of-posts": 8.67,
40
+ "http://example.org/def/profession": "Operational Delivery"
41
+ }]
42
+ }, {
43
+ "url": "http://example.org/junior-roles.csv#row=3",
44
+ "rownum": 2,
45
+ "describes": [{
46
+ "http://example.org/def/reportsTo": "http://example.org/senior-roles.csv#post-90115",
47
+ "http://example.org/def/grade": "5",
48
+ "http://example.org/def/min_pay": 19546,
49
+ "http://example.org/def/max_pay": 22478,
50
+ "http://example.org/def/job": "Administrator",
51
+ "http://example.org/def/number-of-posts": 0.5,
52
+ "http://example.org/def/profession": "Operational Delivery"
53
+ }]
54
+ }]
55
+ }]
56
+ }