rdf-tabular 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/etc/doap.csv ADDED
@@ -0,0 +1,5 @@
1
+ name,type,homepage,license,shortdesc,description,created,programming_language,implements,category,download_page,mailing_list,bug_database,blog,developer,maintainer,documenter,maker,dc_title,dc_description,dc_date,dc_creator,isPartOf
2
+ RDF::Tabular,http://usefulinc.com/ns/doap#Project,http://ruby-rdf.github.com/rdf-tabular,http://creativecommons.org/licenses/publicdomain/,Tabular Data RDF Reader and JSON serializer.,RDF::Tabular processes tabular data with metadata creating RDF or JSON output.,1/5/2015,Ruby,http://www.w3.org/TR/tabular-data-model/,http://dbpedia.org/resource/Resource_Description_Framework,http://rubygems.org/gems/rdf-tabular,http://lists.w3.org/Archives/Public/public-rdf-ruby/,http://github.com/ruby-rdf/rdf-tabular/issues,http://greggkellogg.net/,http://greggkellogg.net/foaf#me,http://greggkellogg.net/foaf#me,http://greggkellogg.net/foaf#me,http://greggkellogg.net/foaf#me,RDF::Tabular,RDF::Tabular processes tabular data with metadata creating RDF or JSON output.,1/5/2015,http://greggkellogg.net/foaf#me,http://rubygems.org/gems/rdf
3
+ ,http://www.w3.org/ns/earl#TestSubject,,,,,,,http://www.w3.org/TR/tabular-metadata/,http://dbpedia.org/resource/Ruby_(programming_language),,,,,,,,,,,,,
4
+ ,http://www.w3.org/ns/earl#Software,,,,,,,http://www.w3.org/TR/csv2rdf/,,,,,,,,,,,,,,
5
+ ,,,,,,,,http://www.w3.org/TR/csv2json/,,,,,,,,,,,,,,
@@ -0,0 +1,34 @@
1
+ {
2
+ "@context": "http://www.w3.org/ns/csvw",
3
+ "url": "doap.csv",
4
+ "tableSchema": {
5
+ "aboutUrl": "http://rubygems.org/gems/rdf-tabular",
6
+ "propertyUrl": "http://usefulinc.com/ns/doap#{_name}",
7
+ "null": "",
8
+ "columns": [
9
+ {"title": "name"},
10
+ {"title": "type", "propertyUrl": "rdf:type", "valueUrl": "{+type}"},
11
+ {"title": "homepage", "valueUrl": "{+homepage}"},
12
+ {"title": "license", "valueUrl": "{+license}"},
13
+ {"title": "shortdesc", "lang": "en"},
14
+ {"title": "description", "lang": "en"},
15
+ {"title": "created", "datatype": {"base": "date", "format": "M/d/yyyy"}},
16
+ {"title": "programming_language", "propertyUrl": "http://usefulinc.com/ns/doap#programming-language"},
17
+ {"title": "implements", "valueUrl": "{+implements}"},
18
+ {"title": "category", "valueUrl": "{+category}"},
19
+ {"title": "download_page", "propertyUrl": "http://usefulinc.com/ns/doap#download-page", "valueUrl": "{+download_page}"},
20
+ {"title": "mailing_list", "propertyUrl": "http://usefulinc.com/ns/doap#mailing-list", "valueUrl": "{+mailing_list}"},
21
+ {"title": "bug_database", "propertyUrl": "http://usefulinc.com/ns/doap#bug-database", "valueUrl": "{+bug_database}"},
22
+ {"title": "blog", "valueUrl": "{+blog}"},
23
+ {"title": "developer", "valueUrl": "{+developer}"},
24
+ {"title": "maintainer", "valueUrl": "{+maintainer}"},
25
+ {"title": "documenter", "valueUrl": "{+documenter}"},
26
+ {"title": "maker", "propertyUrl": "foaf:maker", "valueUrl": "{+maker}"},
27
+ {"title": "dc_title", "propertyUrl": "dc:title"},
28
+ {"title": "dc_description", "propertyUrl": "dc:description", "lang": "en"},
29
+ {"title": "dc_date", "propertyUrl": "dc:date", "datatype": {"base": "date", "format": "M/d/yyyy"}},
30
+ {"title": "dc_creator", "propertyUrl": "dc:creator", "valueUrl": "{+dc_creator}"},
31
+ {"title": "isPartOf", "propertyUrl": "dc:isPartOf", "valueUrl": "{+isPartOf}"}
32
+ ]
33
+ }
34
+ }
data/etc/doap.ttl ADDED
@@ -0,0 +1,35 @@
1
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
2
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
3
+ @prefix dc: <http://purl.org/dc/terms/> .
4
+ @prefix earl: <http://www.w3.org/ns/earl#> .
5
+ @prefix foaf: <http://xmlns.com/foaf/0.1/> .
6
+ @prefix doap: <http://usefulinc.com/ns/doap#> .
7
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
8
+
9
+ <http://rubygems.org/gems/rdf-tabular> a doap:Project, earl:TestSubject, earl:Software ;
10
+ doap:name "RDF::Tabular" ;
11
+ doap:homepage <http://ruby-rdf.github.com/rdf-tabular> ;
12
+ doap:license <http://creativecommons.org/licenses/publicdomain/> ;
13
+ doap:shortdesc "Tabular Data RDF Reader and JSON serializer."@en ;
14
+ doap:description "RDF::Tabular processes tabular data with metadata creating RDF or JSON output."@en ;
15
+ doap:created "2015-01-05"^^xsd:date ;
16
+ doap:programming-language "Ruby" ;
17
+ doap:implements <http://www.w3.org/TR/tabular-data-model/>,
18
+ <http://www.w3.org/TR/tabular-metadata/>,
19
+ <http://www.w3.org/TR/csv2rdf/>,
20
+ <http://www.w3.org/TR/csv2json/>;
21
+ doap:category <http://dbpedia.org/resource/Resource_Description_Framework>,
22
+ <http://dbpedia.org/resource/Ruby_(programming_language)> ;
23
+ doap:download-page <http://rubygems.org/gems/rdf-tabular> ;
24
+ doap:mailing-list <http://lists.w3.org/Archives/Public/public-rdf-ruby/> ;
25
+ doap:bug-database <http://github.com/ruby-rdf/rdf-tabular/issues> ;
26
+ doap:blog <http://greggkellogg.net/> ;
27
+ doap:developer <http://greggkellogg.net/foaf#me> ;
28
+ doap:maintainer <http://greggkellogg.net/foaf#me> ;
29
+ doap:documenter <http://greggkellogg.net/foaf#me> ;
30
+ foaf:maker <http://greggkellogg.net/foaf#me> ;
31
+ dc:title "RDF::Tabular" ;
32
+ dc:description "RDF::Tabular processes tabular data with metadata creating RDF or JSON output."@en ;
33
+ dc:date "2015-01-05"^^xsd:date ;
34
+ dc:creator <http://greggkellogg.net/foaf#me> ;
35
+ dc:isPartOf <http://rubygems.org/gems/rdf> .
@@ -0,0 +1,34 @@
1
+ $:.unshift(File.expand_path("..", __FILE__))
2
+ require 'rdf' # @see http://rubygems.org/gems/rdf
3
+ begin
4
+ require 'byebug' # REMOVE ME
5
+ rescue LoadError
6
+ end
7
+ require 'csv'
8
+
9
+ module RDF
10
+ ##
11
+ # **`RDF::Tabular`** is a Tabular/CSV extension for RDF.rb.
12
+ #
13
+ # @see http://w3c.github.io/csvw/
14
+ #
15
+ # @author [Gregg Kellogg](http://greggkellogg.net/)
16
+ module Tabular
17
+ require 'rdf/tabular/format'
18
+ require 'rdf/tabular/utils'
19
+ autoload :Column, 'rdf/tabular/metadata'
20
+ autoload :CSVW, 'rdf/tabular/csvw'
21
+ autoload :Dialect, 'rdf/tabular/metadata'
22
+ autoload :JSON, 'rdf/tabular/literal'
23
+ autoload :Metadata, 'rdf/tabular/metadata'
24
+ autoload :Reader, 'rdf/tabular/reader'
25
+ autoload :Schema, 'rdf/tabular/metadata'
26
+ autoload :Table, 'rdf/tabular/metadata'
27
+ autoload :TableGroup, 'rdf/tabular/metadata'
28
+ autoload :Transformation, 'rdf/tabular/metadata'
29
+ autoload :VERSION, 'rdf/tabular/version'
30
+
31
+ def self.debug?; @debug; end
32
+ def self.debug=(value); @debug = value; end
33
+ end
34
+ end
@@ -0,0 +1,477 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # This file generated automatically using vocab-fetch from http://w3c.github.io/csvw/ns/csvw.ttl
3
+ require 'rdf'
4
+ module RDF::Tabular
5
+ class CSVW < RDF::Vocabulary("http://www.w3.org/ns/csvw#")
6
+
7
+ # Class definitions
8
+ term :Column,
9
+ comment: %(A Column Description describes a single column.).freeze,
10
+ label: "Column Description".freeze,
11
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
12
+ type: "rdfs:Class".freeze
13
+ term :Datatype,
14
+ comment: %(Describes facets of a datatype.).freeze,
15
+ label: "Datatype".freeze,
16
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
17
+ type: "rdfs:Class".freeze
18
+ term :Dialect,
19
+ comment: %(A Dialect Description provides hints to parsers about how to parse a linked file.).freeze,
20
+ label: "Dialect Description".freeze,
21
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
22
+ type: "rdfs:Class".freeze
23
+ term :Direction,
24
+ comment: %(The class of table/text directions.).freeze,
25
+ label: "Direction".freeze,
26
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
27
+ type: "rdfs:Class".freeze
28
+ term :Schema,
29
+ comment: %(A Schema is a definition of a tabular format that may be common to multiple tables.).freeze,
30
+ label: "Schema".freeze,
31
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
32
+ type: "rdfs:Class".freeze
33
+ term :Table,
34
+ comment: %(A Table describes an Annotated Table.).freeze,
35
+ label: "Table Description".freeze,
36
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
37
+ type: "rdfs:Class".freeze
38
+ term :TableGroup,
39
+ comment: %(A Table Group describes an Annotated Table Group.).freeze,
40
+ label: "Table Group Description".freeze,
41
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
42
+ type: "rdfs:Class".freeze
43
+ term :Transformation,
44
+ comment: %(A Transformation Definition is a definition of how tabular data can be transformed into another format.).freeze,
45
+ label: "Transformation Definition".freeze,
46
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
47
+ type: "rdfs:Class".freeze
48
+
49
+ # Property definitions
50
+ property :aboutUrl,
51
+ comment: %(A URI template property that may be used to create a unique identifier for each cell within a row when mapping data to other formats).freeze,
52
+ label: "about URL".freeze,
53
+ range: "http://www.w3.org/ns/csvw#uriTemplate".freeze,
54
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
55
+ type: "rdf:Property".freeze
56
+ property :base,
57
+ comment: %(An atomic property that contains a single string: a term defined in the default context representing a built-in datatype URL).freeze,
58
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
59
+ label: "base".freeze,
60
+ range: "rdfs:Datatype".freeze,
61
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
62
+ type: "rdf:Property".freeze
63
+ property :columns,
64
+ comment: %(An array of Column Descriptions.).freeze,
65
+ domain: "http://www.w3.org/ns/csvw#Schema".freeze,
66
+ label: "columns".freeze,
67
+ range: "http://www.w3.org/ns/csvw#Column".freeze,
68
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
69
+ type: "rdf:Property".freeze
70
+ property :commentPrefix,
71
+ comment: %(A character that, when it appears at the beginning of a skipped row, indicates a comment that should be associated as a comment annotation to the table. The default is "#".).freeze,
72
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
73
+ label: "comment prefix".freeze,
74
+ range: "xsd:string".freeze,
75
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
76
+ type: "rdf:Property".freeze
77
+ property :datatype,
78
+ comment: %(An object property that contains either a single string that is the main datatype of the values of the cell or a datatype description object.).freeze,
79
+ label: "datatype".freeze,
80
+ range: "http://www.w3.org/ns/csvw#Datatype".freeze,
81
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
82
+ type: "rdf:Property".freeze
83
+ property :decimalChar,
84
+ comment: %(A single character string whose value is used to represent a decimal point within the number. The default value is ".".).freeze,
85
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
86
+ label: "decimal character".freeze,
87
+ range: "xsd:string".freeze,
88
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
89
+ type: "rdf:Property".freeze
90
+ property :default,
91
+ comment: %(An atomic property holding a single string that provides a default string value for the cell in cases where the original string value is a null value. This default value may be used when converting the table into other formats.).freeze,
92
+ label: "default".freeze,
93
+ range: "xsd:string".freeze,
94
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
95
+ type: "rdf:Property".freeze
96
+ property :delimiter,
97
+ comment: %(The separator between cells. The default is ",".).freeze,
98
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
99
+ label: "delimiter".freeze,
100
+ range: "xsd:string".freeze,
101
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
102
+ type: "rdf:Property".freeze
103
+ property :dialect,
104
+ comment: %(Provides hints to processors about how to parse the referenced files for to create tabular data models for an individual table, or all the tables in a group.).freeze,
105
+ label: "dialect".freeze,
106
+ range: "http://www.w3.org/ns/csvw#Dialect".freeze,
107
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
108
+ type: "rdf:Property".freeze
109
+ property :doubleQuote,
110
+ comment: %(If true, sets the escape character flag to ". If false, to \.).freeze,
111
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
112
+ label: "double quote".freeze,
113
+ range: "xsd:boolean".freeze,
114
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
115
+ type: "rdf:Property".freeze
116
+ property :encoding,
117
+ comment: %(The character encoding for the file, one of the encodings listed in [encoding]. The default is utf-8.).freeze,
118
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
119
+ label: "encoding".freeze,
120
+ range: "xsd:string".freeze,
121
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
122
+ type: "rdf:Property".freeze
123
+ property :foreignKeys,
124
+ comment: %(An array of foreign key definitions that define how the values from specified columns within this table link to rows within this table or other tables.).freeze,
125
+ domain: "http://www.w3.org/ns/csvw#Schema".freeze,
126
+ label: "foreign keys".freeze,
127
+ range: "xsd:string".freeze,
128
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
129
+ type: "rdf:Property".freeze
130
+ property :format,
131
+ comment: %(A definition of the format of the cell, used when parsing the cell.).freeze,
132
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
133
+ label: "format".freeze,
134
+ range: "xsd:string".freeze,
135
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
136
+ type: "rdf:Property".freeze
137
+ property :groupChar,
138
+ comment: %(A single character string whose value is used to group digits within the number. The default value is ",".).freeze,
139
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
140
+ label: "group character".freeze,
141
+ range: "xsd:string".freeze,
142
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
143
+ type: "rdf:Property".freeze
144
+ property :header,
145
+ comment: %(A single boolean atomic property that, if true, sets the header row count flag to 1, and if false to 0, unless headerRowCount is provided, in which case the value provided for the header property is ignored.).freeze,
146
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
147
+ label: "header".freeze,
148
+ range: "xsd:boolean".freeze,
149
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
150
+ type: "rdf:Property".freeze
151
+ property :headerColumnCount,
152
+ comment: %(The number of header columns \(following the skipped columns\) in each row. The default is 0.
153
+ ).freeze,
154
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
155
+ label: "header column count".freeze,
156
+ range: "xsd:nonNegativeInteger".freeze,
157
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
158
+ type: "rdf:Property".freeze
159
+ property :headerRowCount,
160
+ comment: %(The number of header rows \(following the skipped rows\) in the file. The default is 1.).freeze,
161
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
162
+ label: "header row count".freeze,
163
+ range: "xsd:nonNegativeInteger".freeze,
164
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
165
+ type: "rdf:Property".freeze
166
+ property :language,
167
+ comment: %(A language code as defined by [BCP47]. Indicates the language of the value within the cell.).freeze,
168
+ label: "language".freeze,
169
+ range: "xsd:string".freeze,
170
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
171
+ type: "rdf:Property".freeze
172
+ property :length,
173
+ comment: %(The exact length of the value of the cell.).freeze,
174
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
175
+ label: "length".freeze,
176
+ range: "xsd:nonNegativeInteger".freeze,
177
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
178
+ type: "rdf:Property".freeze
179
+ property :lineTerminator,
180
+ comment: %(The character that is used at the end of a row. The default is CRLF.).freeze,
181
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
182
+ label: "line terminator".freeze,
183
+ range: "xsd:string".freeze,
184
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
185
+ type: "rdf:Property".freeze
186
+ property :maxExclusive,
187
+ comment: %(The maximum value for the cell \(exclusive\).).freeze,
188
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
189
+ label: "max exclusive".freeze,
190
+ range: "xsd:integer".freeze,
191
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
192
+ type: "rdf:Property".freeze
193
+ property :maxInclusive,
194
+ comment: %(The maximum value for the cell \(inclusive\). ).freeze,
195
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
196
+ label: "max inclusive".freeze,
197
+ range: "xsd:integer".freeze,
198
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
199
+ type: "rdf:Property".freeze
200
+ property :maxLength,
201
+ comment: %(The maximum length of the value of the cell.).freeze,
202
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
203
+ label: "max length".freeze,
204
+ range: "xsd:nonNegativeInteger".freeze,
205
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
206
+ type: "rdf:Property".freeze
207
+ property :minExclusive,
208
+ comment: %(The minimum value for the cell \(exclusive\).).freeze,
209
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
210
+ label: "min exclusive".freeze,
211
+ range: "xsd:integer".freeze,
212
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
213
+ type: "rdf:Property".freeze
214
+ property :minInclusive,
215
+ comment: %(The minimum value for the cell \(inclusive\).).freeze,
216
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
217
+ label: "min inclusive".freeze,
218
+ range: "xsd:integer".freeze,
219
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
220
+ type: "rdf:Property".freeze
221
+ property :minLength,
222
+ comment: %(The minimum length of the value of the cell.).freeze,
223
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
224
+ label: "min length".freeze,
225
+ range: "xsd:nonNegativeInteger".freeze,
226
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
227
+ type: "rdf:Property".freeze
228
+ property :name,
229
+ comment: %(An atomic property that gives a canonical name for the column. This must be a string. Conversion specifications must use this property as the basis for the names of properties/elements/attributes in the results of conversions.).freeze,
230
+ domain: "http://www.w3.org/ns/csvw#Column".freeze,
231
+ label: "name".freeze,
232
+ range: "xsd:string".freeze,
233
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
234
+ type: "rdf:Property".freeze
235
+ property :notes,
236
+ comment: %(An array of objects representing annotations. This specification does not place any constraints on the structure of these objects.).freeze,
237
+ domain: "http://www.w3.org/ns/csvw#Table".freeze,
238
+ label: "notes".freeze,
239
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
240
+ type: "rdf:Property".freeze
241
+ property :null,
242
+ comment: %(The string used for null values. If not specified, the default for this is the empty string.).freeze,
243
+ label: "null".freeze,
244
+ range: "xsd:string".freeze,
245
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
246
+ type: "rdf:Property".freeze
247
+ property :ordered,
248
+ comment: %(Indicates if multiple values of a cell are considered ordered or unordered; see separator.).freeze,
249
+ label: "ordered".freeze,
250
+ range: "xsd:boolean".freeze,
251
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
252
+ type: "rdf:Property".freeze
253
+ property :pattern,
254
+ comment: %(A regular expression string, in the syntax and interpreted as defined by [ECMASCRIPT].).freeze,
255
+ domain: "http://www.w3.org/ns/csvw#Datatype".freeze,
256
+ label: "pattern".freeze,
257
+ range: "xsd:string".freeze,
258
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
259
+ type: "rdf:Property".freeze
260
+ property :primaryKey,
261
+ comment: %(A column reference property that holds either a single reference to a column description object or an array of references.).freeze,
262
+ domain: "http://www.w3.org/ns/csvw#Schema".freeze,
263
+ label: "primary key".freeze,
264
+ range: "xsd:string".freeze,
265
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
266
+ type: "rdf:Property".freeze
267
+ property :propertyUrl,
268
+ comment: %(An URI template property that holds one or more strings that may be expanded to URIs for properties if the table is mapped to another format. The default value of propertyUrl is "{#_name}".).freeze,
269
+ label: "property URL".freeze,
270
+ range: "http://www.w3.org/ns/csvw#uriTemplate".freeze,
271
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
272
+ type: "rdf:Property".freeze
273
+ property :quoteChar,
274
+ comment: %(The character that is used around escaped cells.).freeze,
275
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
276
+ label: "quote char".freeze,
277
+ range: "xsd:string".freeze,
278
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
279
+ type: "rdf:Property".freeze
280
+ property :required,
281
+ comment: %(A boolean value which indicates whether every cell within the column must have a non-null value.).freeze,
282
+ domain: "http://www.w3.org/ns/csvw#Column".freeze,
283
+ label: "required".freeze,
284
+ range: "xsd:boolean".freeze,
285
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
286
+ type: "rdf:Property".freeze
287
+ property :resources,
288
+ comment: %(An array of table descriptions for the tables in the group.).freeze,
289
+ domain: "http://www.w3.org/ns/csvw#TableGroup".freeze,
290
+ label: "resources".freeze,
291
+ range: "http://www.w3.org/ns/csvw#Table".freeze,
292
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
293
+ type: "rdf:Property".freeze
294
+ property :row,
295
+ comment: %(Relates a Table to each Row output.).freeze,
296
+ domain: "http://www.w3.org/ns/csvw#Table".freeze,
297
+ label: "row".freeze,
298
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
299
+ subPropertyOf: "rdfs:member".freeze,
300
+ type: "rdf:Property".freeze
301
+ property :rownum,
302
+ comment: %(The position of the row amongst the rows of the Annotated Tabl, starting from 1 ).freeze,
303
+ label: "row number".freeze,
304
+ range: "xsd:integer".freeze,
305
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
306
+ type: "rdf:Property".freeze
307
+ property :scriptFormat,
308
+ comment: %(A link property giving the single URL for the format that is used by the script or template. If one has been defined, this should be a URL for a media type, in the form http://www.iana.org/assignments/media-types/media-type such as http://www.iana.org/assignments/media-types/application/javascript. Otherwise, it can be any URL that describes the script or template format.).freeze,
309
+ domain: "http://www.w3.org/ns/csvw#Transformation".freeze,
310
+ label: "script format".freeze,
311
+ range: "xsd:anyURI".freeze,
312
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
313
+ type: "rdf:Property".freeze
314
+ property :separator,
315
+ comment: %(The character used to separate items in the string value of the cell.).freeze,
316
+ label: "separator".freeze,
317
+ range: "xsd:string".freeze,
318
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
319
+ type: "rdf:Property".freeze
320
+ property :skipBlankRows,
321
+ comment: %(Indicates whether to ignore wholly empty rows \(ie rows in which all the cells are empty\). The default is false.).freeze,
322
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
323
+ label: "skip blank rows".freeze,
324
+ range: "xsd:boolean".freeze,
325
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
326
+ type: "rdf:Property".freeze
327
+ property :skipColumns,
328
+ comment: %(The number of columns to skip at the beginning of each row, before any header columns. The default is 0.).freeze,
329
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
330
+ label: "skip columns".freeze,
331
+ range: "xsd:nonNegativeInteger".freeze,
332
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
333
+ type: "rdf:Property".freeze
334
+ property :skipInitialSpace,
335
+ comment: %(If true, sets the trim flag to "start". If false, to false.).freeze,
336
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
337
+ label: "skip initial space".freeze,
338
+ range: "xsd:boolean".freeze,
339
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
340
+ type: "rdf:Property".freeze
341
+ property :skipRows,
342
+ comment: %(The number of rows to skip at the beginning of the file, before a header row or tabular data.).freeze,
343
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
344
+ label: "skip rows".freeze,
345
+ range: "xsd:nonNegativeInteger".freeze,
346
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
347
+ type: "rdf:Property".freeze
348
+ property :source,
349
+ comment: %(The format to which the tabular data should be transformed prior to the transformation using the template. If the value is "json", the tabular data should first be transformed first to JSON based on the simple mapping defined in Generating JSON from Tabular Data on the Web. If the value is "rdf", it should similarly first be transformed to XML based on the simple mapping defined in Generating RDF from Tabular Data on the Web.).freeze,
350
+ domain: "http://www.w3.org/ns/csvw#Transformation".freeze,
351
+ label: "source".freeze,
352
+ range: "xsd:string".freeze,
353
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
354
+ type: "rdf:Property".freeze
355
+ property :suppressOutput,
356
+ comment: %(A boolean atomic property. If true, suppresses any output that would be generated when converting a table or cells within a column.).freeze,
357
+ label: "suppress output".freeze,
358
+ range: "xsd:boolean".freeze,
359
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
360
+ type: "rdf:Property".freeze
361
+ property :table,
362
+ comment: %(Relates an Table group to annotated tables. \(Note, this is different from csvw:resources, which relates metadata, rather than resulting annotated table descriptions.).freeze,
363
+ domain: "http://www.w3.org/ns/csvw#TableGroup".freeze,
364
+ label: "table".freeze,
365
+ range: "http://www.w3.org/ns/csvw#Table".freeze,
366
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
367
+ subPropertyOf: "rdfs:member".freeze,
368
+ type: "rdf:Property".freeze
369
+ property :tableDirection,
370
+ comment: %(One of csvw:rtl csvw:ltr or csvw:default. Indicates whether the tables in the group should be displayed with the first column on the right, on the left, or based on the first character in the table that has a specific direction. ).freeze,
371
+ label: "table direction".freeze,
372
+ range: "http://www.w3.org/ns/csvw#Direction".freeze,
373
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
374
+ type: "rdf:Property".freeze
375
+ property :tableSchema,
376
+ comment: %(An object property that provides a schema description for an individual table, or all the tables in a group.).freeze,
377
+ label: "table schema".freeze,
378
+ range: "http://www.w3.org/ns/csvw#Schema".freeze,
379
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
380
+ type: "rdf:Property".freeze
381
+ property :targetFormat,
382
+ comment: %(A link property giving the single URL for the format that will be created through the transformation. If one has been defined, this should be a URL for a media type, in the form http://www.iana.org/assignments/media-types/media-type such as http://www.iana.org/assignments/media-types/text/calendar. Otherwise, it can be any URL that describes the target format.).freeze,
383
+ domain: "http://www.w3.org/ns/csvw#Transformation".freeze,
384
+ label: "target format".freeze,
385
+ range: "xsd:anyURI".freeze,
386
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
387
+ type: "rdf:Property".freeze
388
+ property :textDirection,
389
+ comment: %(One of csvw:rtl or csvw:ltr. Indicates whether the text within cells should be displayed by default as left-to-right or right-to-left text. ).freeze,
390
+ label: "text direction".freeze,
391
+ range: "http://www.w3.org/ns/csvw#Direction".freeze,
392
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
393
+ type: "rdf:Property".freeze
394
+ property :title,
395
+ comment: %(For a Transformation A natural language property that describes the format that will be generated from the transformation. This is useful if the target format is a generic format \(such as application/json\) and the transformation is creating a specific profile of that format.
396
+
397
+ For a Column: A natural language property that provides possible alternative names for the column.).freeze,
398
+ label: "title".freeze,
399
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
400
+ type: "rdf:Property".freeze
401
+ property :transformations,
402
+ comment: %(An array property of transformation definitions that provide mechanisms to transform the tabular data into other formats.).freeze,
403
+ label: "transformations".freeze,
404
+ range: "http://www.w3.org/ns/csvw#Transformation".freeze,
405
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
406
+ type: "rdf:Property".freeze
407
+ property :trim,
408
+ comment: %(Indicates whether to trim whitespace around cells; may be true, false, start or end. The default is false.).freeze,
409
+ domain: "http://www.w3.org/ns/csvw#Dialect".freeze,
410
+ label: "trim".freeze,
411
+ range: "xsd:boolean".freeze,
412
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
413
+ type: "rdf:Property".freeze
414
+ property :url,
415
+ comment: %(For a Table: This link property gives the single URL of the CSV file that the table is held in, relative to the location of the metadata document.
416
+
417
+ For a Template: A link property giving the single URL of the file that the template is held in, relative to the location of the metadata document.).freeze,
418
+ label: "url".freeze,
419
+ range: "xsd:anyURI".freeze,
420
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
421
+ type: "rdf:Property".freeze
422
+ property :valueUrl,
423
+ comment: %(An URI template property that is used to define one or more resources value of a cell instead of a literal values.).freeze,
424
+ label: "valueUrl".freeze,
425
+ range: "http://www.w3.org/ns/csvw#uriTemplate".freeze,
426
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
427
+ type: "rdf:Property".freeze
428
+ property :virtual,
429
+ comment: %(A boolean atomic property taking a single value which indicates whether the column is a virtual column not present in the original source).freeze,
430
+ domain: "http://www.w3.org/ns/csvw#Column".freeze,
431
+ label: "virtual".freeze,
432
+ range: "xsd:boolean".freeze,
433
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
434
+ type: "rdf:Property".freeze
435
+
436
+ # Datatype definitions
437
+ term :JSON,
438
+ comment: %(A literal containing JSON.).freeze,
439
+ label: "JSON".freeze,
440
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
441
+ subClassOf: "xsd:string".freeze,
442
+ type: "rdfs:Datatype".freeze
443
+ term :uriTemplate,
444
+ comment: %().freeze,
445
+ label: "uri template".freeze,
446
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
447
+ subClassOf: "xsd:anyURI".freeze,
448
+ type: "rdfs:Datatype".freeze
449
+
450
+ # Extra definitions
451
+ term :"",
452
+ "dc:description" => %(This document describes the RDFS vocabulary description used in the Metadata Vocabulary for Tabular Data [[tabular-metadata]] along with the default JSON-LD Context.).freeze,
453
+ "dc:title" => %(CSVW Namespace Vocabulary Terms).freeze,
454
+ label: "".freeze,
455
+ type: "owl:Ontology".freeze
456
+ term :csvEncodedTabularData,
457
+ comment: %(Describes the role of a CSV file in the tabular data mapping.).freeze,
458
+ label: "CSV Encoded Tabular Data".freeze,
459
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
460
+ type: "prov:Role".freeze
461
+ term :ltr,
462
+ comment: %(Indicates text should be processed left to right.).freeze,
463
+ label: "left to right".freeze,
464
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
465
+ type: "http://www.w3.org/ns/csvw#Direction".freeze
466
+ term :rtl,
467
+ comment: %(Indiects text should be processed right to left).freeze,
468
+ label: "right to left".freeze,
469
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
470
+ type: "http://www.w3.org/ns/csvw#Direction".freeze
471
+ term :tabularMetadata,
472
+ comment: %(Describes the role of a Metadata file in the tabular data mapping.).freeze,
473
+ label: "Tabular Metadata".freeze,
474
+ "rdfs:isDefinedBy" => %(http://www.w3.org/ns/csvw#).freeze,
475
+ type: "prov:Role".freeze
476
+ end
477
+ end