rdf-sak 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +202 -0
- data/README.md +268 -0
- data/Rakefile +13 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/example/cleanup.xsl +14 -0
- data/example/matches.xhtml +11 -0
- data/example/transforms.ttl +58 -0
- data/lib/rdf-sak.rb +1 -0
- data/lib/rdf/sak.rb +2506 -0
- data/lib/rdf/sak/ci.rb +827 -0
- data/lib/rdf/sak/cli.rb +35 -0
- data/lib/rdf/sak/docstats.rb +188 -0
- data/lib/rdf/sak/document.rb +772 -0
- data/lib/rdf/sak/ibis.rb +248 -0
- data/lib/rdf/sak/mimemagic.rb +73 -0
- data/lib/rdf/sak/pav.rb +479 -0
- data/lib/rdf/sak/qb.rb +280 -0
- data/lib/rdf/sak/scovo.rb +51 -0
- data/lib/rdf/sak/tfo.rb +301 -0
- data/lib/rdf/sak/transform.rb +1172 -0
- data/lib/rdf/sak/urlrunner.rb +602 -0
- data/lib/rdf/sak/util.rb +2081 -0
- data/lib/rdf/sak/version.rb +5 -0
- data/rdf-sak.gemspec +60 -0
- metadata +366 -0
data/lib/rdf/sak/qb.rb
ADDED
@@ -0,0 +1,280 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# This file generated automatically using rdf vocabulary format from http://purl.org/linked-data/cube#
|
4
|
+
require 'rdf'
|
5
|
+
module RDF::SAK
|
6
|
+
# @!parse
|
7
|
+
# # Vocabulary for <http://purl.org/linked-data/cube#>
|
8
|
+
# class QB < RDF::StrictVocabulary
|
9
|
+
# end
|
10
|
+
class QB < RDF::StrictVocabulary("http://purl.org/linked-data/cube#")
|
11
|
+
|
12
|
+
# Ontology definition
|
13
|
+
ontology :"http://purl.org/linked-data/cube#",
|
14
|
+
comment: %(This vocabulary allows multi-dimensional data, such as statistics, to be published in RDF. It is based on the core information model from SDMX \(and thus also DDI\).).freeze,
|
15
|
+
"dc:contributor": [term(
|
16
|
+
"foaf:mbox": "arofan.gregory@earthlink.net".freeze
|
17
|
+
), term(
|
18
|
+
"foaf:mbox": "dave@epimorphics.com".freeze
|
19
|
+
), term(
|
20
|
+
"foaf:mbox": "ian@epimorphics.com".freeze
|
21
|
+
), term(
|
22
|
+
"foaf:mbox": "jeni@jenitennison.com".freeze
|
23
|
+
), term(
|
24
|
+
"foaf:mbox": "richard@cyganiak.de".freeze
|
25
|
+
)],
|
26
|
+
"dc:created": "2010-07-12".freeze,
|
27
|
+
"dc:license": "http://www.opendatacommons.org/licenses/pddl/1.0/".freeze,
|
28
|
+
"dc:modified": ["2010-11-27".freeze, "2013-03-02".freeze, "2013-07-26".freeze],
|
29
|
+
"dc:title": "Vocabulary for multi-dimensional (e.g. statistical) data publishing".freeze,
|
30
|
+
label: "The data cube vocabulary".freeze,
|
31
|
+
"owl:versionInfo": "0.2".freeze,
|
32
|
+
type: "owl:Ontology".freeze
|
33
|
+
|
34
|
+
# Class definitions
|
35
|
+
term :Attachable,
|
36
|
+
comment: %(Abstract superclass for everything that can have attributes and dimensions).freeze,
|
37
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
38
|
+
label: "Attachable (abstract)".freeze,
|
39
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
40
|
+
term :AttributeProperty,
|
41
|
+
comment: %(The class of components which represent attributes of observations in the cube, e.g. unit of measurement).freeze,
|
42
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
43
|
+
label: "Attribute property".freeze,
|
44
|
+
"owl:disjointWith": "qb:MeasureProperty".freeze,
|
45
|
+
subClassOf: "qb:ComponentProperty".freeze,
|
46
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
47
|
+
term :CodedProperty,
|
48
|
+
comment: %(Superclass of all coded ComponentProperties).freeze,
|
49
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
50
|
+
label: "Coded property".freeze,
|
51
|
+
subClassOf: "qb:ComponentProperty".freeze,
|
52
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
53
|
+
term :ComponentProperty,
|
54
|
+
comment: %(Abstract super-property of all properties representing dimensions, attributes or measures).freeze,
|
55
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
56
|
+
label: "Component property (abstract)".freeze,
|
57
|
+
subClassOf: "rdf:Property".freeze,
|
58
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
59
|
+
term :ComponentSet,
|
60
|
+
comment: %(Abstract class of things which reference one or more ComponentProperties).freeze,
|
61
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
62
|
+
label: "Component set".freeze,
|
63
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
64
|
+
term :ComponentSpecification,
|
65
|
+
comment: %(Used to define properties of a component \(attribute, dimension etc\) which are specific to its usage in a DSD.).freeze,
|
66
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
67
|
+
label: "Component specification".freeze,
|
68
|
+
subClassOf: "qb:ComponentSet".freeze,
|
69
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
70
|
+
term :DataSet,
|
71
|
+
comment: %(Represents a collection of observations, possibly organized into various slices, conforming to some common dimensional structure.).freeze,
|
72
|
+
equivalentClass: "http://purl.org/NET/scovo#Dataset".freeze,
|
73
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
74
|
+
label: "Data set".freeze,
|
75
|
+
subClassOf: "qb:Attachable".freeze,
|
76
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
77
|
+
term :DataStructureDefinition,
|
78
|
+
comment: %(Defines the structure of a DataSet or slice).freeze,
|
79
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
80
|
+
label: "Data structure definition".freeze,
|
81
|
+
subClassOf: "qb:ComponentSet".freeze,
|
82
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
83
|
+
term :DimensionProperty,
|
84
|
+
comment: %(The class of components which represent the dimensions of the cube).freeze,
|
85
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
86
|
+
label: "Dimension property".freeze,
|
87
|
+
"owl:disjointWith": "qb:MeasureProperty".freeze,
|
88
|
+
subClassOf: ["qb:CodedProperty".freeze, "qb:ComponentProperty".freeze],
|
89
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
90
|
+
term :HierarchicalCodeList,
|
91
|
+
comment: %(Represents a generalized hierarchy of concepts which can be used for coding. The hierarchy is defined by one or more roots together with a property which relates concepts in the hierarchy to thier child concept . The same concepts may be members of multiple hierarchies provided that different qb:parentChildProperty values are used for each hierarchy.).freeze,
|
92
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
93
|
+
label: "Hierarchical Code List".freeze,
|
94
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
95
|
+
term :MeasureProperty,
|
96
|
+
comment: %(The class of components which represent the measured value of the phenomenon being observed).freeze,
|
97
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
98
|
+
label: "Measure property".freeze,
|
99
|
+
"owl:disjointWith": ["qb:AttributeProperty".freeze, "qb:DimensionProperty".freeze],
|
100
|
+
subClassOf: "qb:ComponentProperty".freeze,
|
101
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
102
|
+
term :Observation,
|
103
|
+
comment: %(A single observation in the cube, may have one or more associated measured values).freeze,
|
104
|
+
equivalentClass: "http://purl.org/NET/scovo#Item".freeze,
|
105
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
106
|
+
label: "Observation".freeze,
|
107
|
+
subClassOf: "qb:Attachable".freeze,
|
108
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
109
|
+
term :ObservationGroup,
|
110
|
+
comment: %(A, possibly arbitrary, group of observations.).freeze,
|
111
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
112
|
+
label: "Observation Group".freeze,
|
113
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
114
|
+
term :Slice,
|
115
|
+
comment: %(Denotes a subset of a DataSet defined by fixing a subset of the dimensional values, component properties on the Slice).freeze,
|
116
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
117
|
+
label: "Slice".freeze,
|
118
|
+
subClassOf: ["qb:Attachable".freeze, "qb:ObservationGroup".freeze],
|
119
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
120
|
+
term :SliceKey,
|
121
|
+
comment: %(Denotes a subset of the component properties of a DataSet which are fixed in the corresponding slices).freeze,
|
122
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
123
|
+
label: "Slice key".freeze,
|
124
|
+
subClassOf: "qb:ComponentSet".freeze,
|
125
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
126
|
+
|
127
|
+
# Property definitions
|
128
|
+
property :attribute,
|
129
|
+
comment: %(An alternative to qb:componentProperty which makes explicit that the component is a attribute).freeze,
|
130
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
131
|
+
label: "attribute".freeze,
|
132
|
+
range: "qb:AttributeProperty".freeze,
|
133
|
+
subPropertyOf: "qb:componentProperty".freeze,
|
134
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
135
|
+
property :codeList,
|
136
|
+
comment: %(gives the code list associated with a CodedProperty).freeze,
|
137
|
+
domain: "qb:CodedProperty".freeze,
|
138
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
139
|
+
label: "code list".freeze,
|
140
|
+
range: term(
|
141
|
+
unionOf: list("skos:ConceptScheme".freeze, "skos:Collection".freeze, "qb:HierarchicalCodeList".freeze)
|
142
|
+
),
|
143
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
144
|
+
property :component,
|
145
|
+
comment: %(indicates a component specification which is included in the structure of the dataset).freeze,
|
146
|
+
domain: "qb:DataStructureDefinition".freeze,
|
147
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
148
|
+
label: "component specification".freeze,
|
149
|
+
range: "qb:ComponentSpecification".freeze,
|
150
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
151
|
+
property :componentAttachment,
|
152
|
+
comment: %(Indicates the level at which the component property should be attached, this might an qb:DataSet, qb:Slice or qb:Observation, or a qb:MeasureProperty.).freeze,
|
153
|
+
domain: "qb:ComponentSpecification".freeze,
|
154
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
155
|
+
label: "component attachment".freeze,
|
156
|
+
range: "rdfs:Class".freeze,
|
157
|
+
type: "rdf:Property".freeze
|
158
|
+
property :componentProperty,
|
159
|
+
comment: %(indicates a ComponentProperty \(i.e. attribute/dimension\) expected on a DataSet, or a dimension fixed in a SliceKey).freeze,
|
160
|
+
domain: "qb:ComponentSet".freeze,
|
161
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
162
|
+
label: "component".freeze,
|
163
|
+
range: "qb:ComponentProperty".freeze,
|
164
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
165
|
+
property :componentRequired,
|
166
|
+
comment: %(Indicates whether a component property is required \(true\) or optional \(false\) in the context of a DSD. Only applicable
|
167
|
+
to components correspond to an attribute. Defaults to false \(optional\).).freeze,
|
168
|
+
domain: "qb:ComponentSpecification".freeze,
|
169
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
170
|
+
label: "component required".freeze,
|
171
|
+
range: "xsd:boolean".freeze,
|
172
|
+
type: ["owl:DatatypeProperty".freeze, "rdf:Property".freeze]
|
173
|
+
property :concept,
|
174
|
+
comment: %(gives the concept which is being measured or indicated by a ComponentProperty).freeze,
|
175
|
+
domain: "qb:ComponentProperty".freeze,
|
176
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
177
|
+
label: "concept".freeze,
|
178
|
+
range: "skos:Concept".freeze,
|
179
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
180
|
+
property :dataSet,
|
181
|
+
comment: %(indicates the data set of which this observation is a part).freeze,
|
182
|
+
domain: "qb:Observation".freeze,
|
183
|
+
equivalentProperty: "http://purl.org/NET/scovo#dataset".freeze,
|
184
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
185
|
+
label: "data set".freeze,
|
186
|
+
range: "qb:DataSet".freeze,
|
187
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
188
|
+
property :dimension,
|
189
|
+
comment: %(An alternative to qb:componentProperty which makes explicit that the component is a dimension).freeze,
|
190
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
191
|
+
label: "dimension".freeze,
|
192
|
+
range: "qb:DimensionProperty".freeze,
|
193
|
+
subPropertyOf: "qb:componentProperty".freeze,
|
194
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
195
|
+
property :hierarchyRoot,
|
196
|
+
comment: %(Specifies a root of the hierarchy. A hierarchy may have multiple roots but must have at least one.).freeze,
|
197
|
+
domain: "qb:HierarchicalCodeList".freeze,
|
198
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
199
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
200
|
+
property :measure,
|
201
|
+
comment: %(An alternative to qb:componentProperty which makes explicit that the component is a measure).freeze,
|
202
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
203
|
+
label: "measure".freeze,
|
204
|
+
range: "qb:MeasureProperty".freeze,
|
205
|
+
subPropertyOf: "qb:componentProperty".freeze,
|
206
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
207
|
+
property :measureDimension,
|
208
|
+
comment: %(An alternative to qb:componentProperty which makes explicit that the component is a measure dimension).freeze,
|
209
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
210
|
+
label: "measure dimension".freeze,
|
211
|
+
range: "qb:DimensionProperty".freeze,
|
212
|
+
subPropertyOf: "qb:componentProperty".freeze,
|
213
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
214
|
+
property :measureType,
|
215
|
+
comment: %(Generic measure dimension, the value of this dimension indicates which measure \(from the set of measures in the DSD\) is being given by the obsValue \(or other primary measure\)).freeze,
|
216
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
217
|
+
label: "measure type".freeze,
|
218
|
+
range: "qb:MeasureProperty".freeze,
|
219
|
+
type: ["qb:DimensionProperty".freeze, "rdf:Property".freeze]
|
220
|
+
property :observation,
|
221
|
+
comment: %(indicates a observation contained within this slice of the data set).freeze,
|
222
|
+
domain: "qb:ObservationGroup".freeze,
|
223
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
224
|
+
label: "observation".freeze,
|
225
|
+
range: "qb:Observation".freeze,
|
226
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
227
|
+
property :observationGroup,
|
228
|
+
comment: %(Indicates a group of observations. The domain of this property is left open so that a group may be attached to different resources and need not be restricted to a single DataSet).freeze,
|
229
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
230
|
+
label: "observation group".freeze,
|
231
|
+
range: "qb:ObservationGroup".freeze,
|
232
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
233
|
+
property :order,
|
234
|
+
comment: %(indicates a priority order for the components of sets with this structure, used to guide presentations - lower order numbers come before higher numbers, un-numbered components come last).freeze,
|
235
|
+
domain: "qb:ComponentSpecification".freeze,
|
236
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
237
|
+
label: "order".freeze,
|
238
|
+
range: "xsd:int".freeze,
|
239
|
+
type: ["owl:DatatypeProperty".freeze, "rdf:Property".freeze]
|
240
|
+
property :parentChildProperty,
|
241
|
+
comment: %(Specifies a property which relates a parent concept in the hierarchy to a child concept.).freeze,
|
242
|
+
domain: "qb:HierarchicalCodeList".freeze,
|
243
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
244
|
+
label: "parent-child property".freeze,
|
245
|
+
range: "rdf:Property".freeze,
|
246
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
247
|
+
property :slice,
|
248
|
+
comment: %(Indicates a subset of a DataSet defined by fixing a subset of the dimensional values).freeze,
|
249
|
+
domain: "qb:DataSet".freeze,
|
250
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
251
|
+
label: "slice".freeze,
|
252
|
+
range: "qb:Slice".freeze,
|
253
|
+
subPropertyOf: "qb:observationGroup".freeze,
|
254
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
255
|
+
property :sliceKey,
|
256
|
+
comment: %(indicates a slice key which is used for slices in this dataset).freeze,
|
257
|
+
domain: "qb:DataStructureDefinition".freeze,
|
258
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
259
|
+
label: "slice key".freeze,
|
260
|
+
range: "qb:SliceKey".freeze,
|
261
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
262
|
+
property :sliceStructure,
|
263
|
+
comment: %(indicates the sub-key corresponding to this slice).freeze,
|
264
|
+
domain: "qb:Slice".freeze,
|
265
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
266
|
+
label: "slice structure".freeze,
|
267
|
+
range: "qb:SliceKey".freeze,
|
268
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
269
|
+
property :structure,
|
270
|
+
comment: %(indicates the structure to which this data set conforms).freeze,
|
271
|
+
domain: "qb:DataSet".freeze,
|
272
|
+
isDefinedBy: "http://purl.org/linked-data/cube".freeze,
|
273
|
+
label: "structure".freeze,
|
274
|
+
range: "qb:DataStructureDefinition".freeze,
|
275
|
+
type: ["owl:ObjectProperty".freeze, "rdf:Property".freeze]
|
276
|
+
|
277
|
+
RDF::Vocabulary.register :qb, self if
|
278
|
+
RDF::Vocabulary.respond_to? :register
|
279
|
+
end
|
280
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# This file generated automatically using rdf vocabulary format from http://purl.org/NET/scovo#
|
4
|
+
require 'rdf'
|
5
|
+
module RDF::SAK
|
6
|
+
# @!parse
|
7
|
+
# # Vocabulary for <http://purl.org/NET/scovo#>
|
8
|
+
# class SCOVO < RDF::StrictVocabulary
|
9
|
+
# end
|
10
|
+
class SCOVO < RDF::StrictVocabulary("http://purl.org/NET/scovo#")
|
11
|
+
|
12
|
+
# Class definitions
|
13
|
+
term :Dataset,
|
14
|
+
comment: %(a statistical dataset).freeze,
|
15
|
+
label: "Dataset".freeze,
|
16
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
17
|
+
term :Dimension,
|
18
|
+
comment: %(a dimension of a statistical data item).freeze,
|
19
|
+
label: "Dimension".freeze,
|
20
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
21
|
+
term :Item,
|
22
|
+
comment: %(a statistical data item).freeze,
|
23
|
+
label: "Item".freeze,
|
24
|
+
type: ["owl:Class".freeze, "rdfs:Class".freeze]
|
25
|
+
|
26
|
+
# Property definitions
|
27
|
+
property :dataset,
|
28
|
+
domain: "scovo:Item".freeze,
|
29
|
+
label: "belongs to dataset".freeze,
|
30
|
+
range: "scovo:Dataset".freeze,
|
31
|
+
type: "rdf:Property".freeze
|
32
|
+
property :datasetOf,
|
33
|
+
domain: "scovo:Dataset".freeze,
|
34
|
+
label: "is the dataset of".freeze,
|
35
|
+
range: "scovo:Item".freeze,
|
36
|
+
type: "rdf:Property".freeze
|
37
|
+
property :dimension,
|
38
|
+
domain: "scovo:Item".freeze,
|
39
|
+
label: "has a dimension".freeze,
|
40
|
+
range: "scovo:Dimension".freeze,
|
41
|
+
type: "rdf:Property".freeze
|
42
|
+
property :max,
|
43
|
+
domain: "scovo:Dimension".freeze,
|
44
|
+
label: "has a maximum range value".freeze,
|
45
|
+
type: "rdf:Property".freeze
|
46
|
+
property :min,
|
47
|
+
domain: "scovo:Dimension".freeze,
|
48
|
+
label: "has a minimum range value".freeze,
|
49
|
+
type: "rdf:Property".freeze
|
50
|
+
end
|
51
|
+
end
|
data/lib/rdf/sak/tfo.rb
ADDED
@@ -0,0 +1,301 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# This file generated automatically using rdf vocabulary format from https://privatealpha.com/ontology/transformation/1#
|
4
|
+
require 'rdf'
|
5
|
+
module RDF::SAK
|
6
|
+
# @!parse
|
7
|
+
# # Vocabulary for <https://privatealpha.com/ontology/transformation/1#>
|
8
|
+
# #
|
9
|
+
# # Transformation Functions Ontology
|
10
|
+
# #
|
11
|
+
# # This document describes functions which transform HTTP representations, i.e., the actual literal payloads of HTTP messages.
|
12
|
+
# #
|
13
|
+
# # This document describes functions which transform HTTP representations, i.e., the actual literal payloads of HTTP messages.
|
14
|
+
# class TFO < RDF::StrictVocabulary
|
15
|
+
# # This class represents an application of a transformation function, connecting a specific input and scalar parameters with its output.
|
16
|
+
# # @return [RDF::Vocabulary::Term]
|
17
|
+
# attr_reader :Application
|
18
|
+
#
|
19
|
+
# # This class represents the set of transformation functions that operate exclusively over (HTML/XML) markup.
|
20
|
+
# # @return [RDF::Vocabulary::Term]
|
21
|
+
# attr_reader :MarkupTransform
|
22
|
+
#
|
23
|
+
# # This class provides a specification for a parameter in a given function.
|
24
|
+
# # @return [RDF::Vocabulary::Term]
|
25
|
+
# attr_reader :Parameter
|
26
|
+
#
|
27
|
+
# # This class represents a list with the restriction that its members be tfo:Parameter nodes.
|
28
|
+
# # @return [RDF::Vocabulary::Term]
|
29
|
+
# attr_reader :ParameterList
|
30
|
+
#
|
31
|
+
# # This class represents a partial application of a transformation function, affording the encapsulation and re-use of existing parameters.
|
32
|
+
# # @return [RDF::Vocabulary::Term]
|
33
|
+
# attr_reader :Partial
|
34
|
+
#
|
35
|
+
# # This class provides a specification for a transformation function.
|
36
|
+
# # @return [RDF::Vocabulary::Term]
|
37
|
+
# attr_reader :Transform
|
38
|
+
#
|
39
|
+
# # Specifies the list of content-types, in order of preference, that the function can process.
|
40
|
+
# # @return [RDF::Vocabulary::Term]
|
41
|
+
# attr_reader :accepts
|
42
|
+
#
|
43
|
+
# # Identifies a tfo:Partial function that this tfo:Application completes.
|
44
|
+
# # @return [RDF::Vocabulary::Term]
|
45
|
+
# attr_reader :completes
|
46
|
+
#
|
47
|
+
# # Specifies one or more default values for a parameter.
|
48
|
+
# # @return [RDF::Vocabulary::Term]
|
49
|
+
# attr_reader :default
|
50
|
+
#
|
51
|
+
# # URI to the implementation of the function.
|
52
|
+
# # @return [RDF::Vocabulary::Term]
|
53
|
+
# attr_reader :implementation
|
54
|
+
#
|
55
|
+
# # Specifies the resource that was the input of the transformation function.
|
56
|
+
# # @return [RDF::Vocabulary::Term]
|
57
|
+
# attr_reader :input
|
58
|
+
#
|
59
|
+
# # Specifies the resource that was the output of the transformation function.
|
60
|
+
# # @return [RDF::Vocabulary::Term]
|
61
|
+
# attr_reader :output
|
62
|
+
#
|
63
|
+
# # Binds a parameter object to its function.
|
64
|
+
# # @return [RDF::Vocabulary::Term]
|
65
|
+
# attr_reader :parameter
|
66
|
+
#
|
67
|
+
# # Specifies a SHACL prefix declaration for complementing any associated XPath expression.
|
68
|
+
# # @return [RDF::Vocabulary::Term]
|
69
|
+
# attr_reader :prefix
|
70
|
+
#
|
71
|
+
# # Specifies the list of content-types, in order of preference, that the function is capable of returning.
|
72
|
+
# # @return [RDF::Vocabulary::Term]
|
73
|
+
# attr_reader :returns
|
74
|
+
#
|
75
|
+
# # Specifies the transform associated with this particular application
|
76
|
+
# # @return [RDF::Vocabulary::Term]
|
77
|
+
# attr_reader :transform
|
78
|
+
#
|
79
|
+
# # A case-insensitive regular expression.
|
80
|
+
# # @return [RDF::Vocabulary::Term]
|
81
|
+
# attr_reader :iregexp
|
82
|
+
#
|
83
|
+
# # A regular expression.
|
84
|
+
# # @return [RDF::Vocabulary::Term]
|
85
|
+
# attr_reader :regexp
|
86
|
+
#
|
87
|
+
# # An XPath expression.
|
88
|
+
# # @return [RDF::Vocabulary::Term]
|
89
|
+
# attr_reader :xpath
|
90
|
+
#
|
91
|
+
# end
|
92
|
+
TFO = Class.new(RDF::StrictVocabulary("https://privatealpha.com/ontology/transformation/1#")) do
|
93
|
+
|
94
|
+
# Ontology definition
|
95
|
+
ontology :"https://privatealpha.com/ontology/transformation/1#",
|
96
|
+
"bibo:uri": "tfo:".freeze,
|
97
|
+
comment: %(This document describes functions which transform HTTP representations, i.e., the actual literal payloads of HTTP messages.).freeze,
|
98
|
+
"dc:created": "2014-06-05T03:06:58Z".freeze,
|
99
|
+
"dc:creator": "https://doriantaylor.com/person/dorian-taylor#me".freeze,
|
100
|
+
"dc:description": "This document describes functions which transform HTTP representations, i.e., the actual literal payloads of HTTP messages.".freeze,
|
101
|
+
"dc:modified": ["2020-01-20T06:05:13Z".freeze, "2020-04-11T02:51:52Z".freeze, "2020-06-10T18:27:35Z".freeze, "2020-07-03T04:49:40Z".freeze],
|
102
|
+
"dc:references": ["https://www.iana.org/assignments/media-types/media-types.xhtml".freeze, "https://www.w3.org/TR/prov-o/".freeze, "https://www.w3.org/TR/rdf-schema/".freeze, "https://www.w3.org/TR/xmlschema-2/".freeze],
|
103
|
+
"dc:subject": "tfo:".freeze,
|
104
|
+
"dc:title": "Transformation Functions Ontology".freeze,
|
105
|
+
"foaf:primaryTopic": "tfo:".freeze,
|
106
|
+
"http://purl.org/vocab/vann/preferredNamespacePrefix": "tfo".freeze,
|
107
|
+
isDefinedBy: "tfo:".freeze,
|
108
|
+
"owl:sameAs": ["https://privatealpha.com/ontology/permutation/1".freeze, "https://privatealpha.com/ontology/permutation/1#".freeze],
|
109
|
+
type: ["bibo:Webpage".freeze, "owl:Ontology".freeze]
|
110
|
+
|
111
|
+
# Class definitions
|
112
|
+
term :Application,
|
113
|
+
comment: %(This class represents an application of a transformation function, connecting a specific input and scalar parameters with its output.).freeze,
|
114
|
+
label: "Application".freeze,
|
115
|
+
subClassOf: "tfo:Partial".freeze,
|
116
|
+
type: "owl:Class".freeze
|
117
|
+
term :MarkupTransform,
|
118
|
+
comment: %(This class represents the set of transformation functions that operate exclusively over \(HTML/XML\) markup.).freeze,
|
119
|
+
label: "MarkupTransform".freeze,
|
120
|
+
subClassOf: "tfo:Transform".freeze,
|
121
|
+
type: "owl:Class".freeze
|
122
|
+
term :Parameter,
|
123
|
+
comment: %(This class provides a specification for a parameter in a given function.).freeze,
|
124
|
+
label: "Parameter".freeze,
|
125
|
+
subClassOf: ["rdf:Property".freeze, term(
|
126
|
+
allValuesFrom: "tfo:Partial".freeze,
|
127
|
+
onProperty: "rdfs:domain".freeze
|
128
|
+
)],
|
129
|
+
type: "owl:Class".freeze
|
130
|
+
term :ParameterList,
|
131
|
+
comment: %(This class represents a list with the restriction that its members be tfo:Parameter nodes.).freeze,
|
132
|
+
label: "ParameterList".freeze,
|
133
|
+
subClassOf: ["rdf:List".freeze, term(
|
134
|
+
allValuesFrom: "tfo:Parameter".freeze,
|
135
|
+
onProperty: "rdf:first".freeze
|
136
|
+
), term(
|
137
|
+
allValuesFrom: "tfo:ParameterList".freeze,
|
138
|
+
onProperty: "rdf:rest".freeze
|
139
|
+
)],
|
140
|
+
type: "owl:Class".freeze
|
141
|
+
term :Partial,
|
142
|
+
comment: %(This class represents a partial application of a transformation function, affording the encapsulation and re-use of existing parameters.).freeze,
|
143
|
+
label: "Partial".freeze,
|
144
|
+
subClassOf: "prov:Activity".freeze,
|
145
|
+
type: "owl:Class".freeze
|
146
|
+
term :Transform,
|
147
|
+
comment: %(This class provides a specification for a transformation function.).freeze,
|
148
|
+
label: "Transform".freeze,
|
149
|
+
subClassOf: "prov:SoftwareAgent".freeze,
|
150
|
+
type: "owl:Class".freeze
|
151
|
+
|
152
|
+
# Property definitions
|
153
|
+
property :accepts,
|
154
|
+
comment: %(Specifies the list of content-types, in order of preference, that the function can process.).freeze,
|
155
|
+
domain: "tfo:Transform".freeze,
|
156
|
+
isDefinedBy: "tfo:".freeze,
|
157
|
+
label: "accepts".freeze,
|
158
|
+
range: term(
|
159
|
+
unionOf: list("tfo:content-type".freeze, "rdf:List".freeze)
|
160
|
+
),
|
161
|
+
type: "owl:ObjectProperty".freeze
|
162
|
+
property :"by-uri",
|
163
|
+
comment: %(Specifies a regular expression for matching against URIs.).freeze,
|
164
|
+
domain: "tfo:Transform".freeze,
|
165
|
+
isDefinedBy: "tfo:".freeze,
|
166
|
+
label: "by-uri".freeze,
|
167
|
+
range: "tfo:regexp".freeze,
|
168
|
+
type: "owl:DatatypeProperty".freeze
|
169
|
+
property :"by-xpath",
|
170
|
+
comment: %(Specifies an XPath expression for matching against markup \(HTML/XML\) content.).freeze,
|
171
|
+
domain: "tfo:MarkupTransform".freeze,
|
172
|
+
isDefinedBy: "tfo:".freeze,
|
173
|
+
label: "by-xpath".freeze,
|
174
|
+
range: "tfo:xpath".freeze,
|
175
|
+
type: "owl:DatatypeProperty".freeze
|
176
|
+
property :completes,
|
177
|
+
comment: %(Identifies a tfo:Partial function that this tfo:Application completes.).freeze,
|
178
|
+
domain: "tfo:Application".freeze,
|
179
|
+
isDefinedBy: "tfo:".freeze,
|
180
|
+
label: "completes".freeze,
|
181
|
+
range: "tfo:Partial".freeze,
|
182
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
183
|
+
property :default,
|
184
|
+
comment: %(Specifies one or more default values for a parameter.).freeze,
|
185
|
+
domain: "tfo:Parameter".freeze,
|
186
|
+
isDefinedBy: "tfo:".freeze,
|
187
|
+
label: "default".freeze,
|
188
|
+
type: "owl:ObjectProperty".freeze
|
189
|
+
property :implementation,
|
190
|
+
comment: %(URI to the implementation of the function.).freeze,
|
191
|
+
domain: "tfo:Transform".freeze,
|
192
|
+
isDefinedBy: "tfo:".freeze,
|
193
|
+
label: "implementation".freeze,
|
194
|
+
range: "rdfs:Resource".freeze,
|
195
|
+
"skos:usageNote": "The URI is meant to be dereferenced by an internal implementation, e.g. file:, jar:, or an idiosyncratic scheme like urn:x-python:.".freeze,
|
196
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
197
|
+
property :input,
|
198
|
+
comment: %(Specifies the resource that was the input of the transformation function.).freeze,
|
199
|
+
domain: "tfo:Application".freeze,
|
200
|
+
isDefinedBy: "tfo:".freeze,
|
201
|
+
label: "input".freeze,
|
202
|
+
range: "rdfs:Resource".freeze,
|
203
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
204
|
+
property :"not-by-uri",
|
205
|
+
comment: %(Specifies a regular expression for anti-matching against URIs.).freeze,
|
206
|
+
domain: "tfo:Transform".freeze,
|
207
|
+
isDefinedBy: "tfo:".freeze,
|
208
|
+
label: "not-by-uri".freeze,
|
209
|
+
range: "tfo:regexp".freeze,
|
210
|
+
type: "owl:DatatypeProperty".freeze
|
211
|
+
property :"not-by-xpath",
|
212
|
+
comment: %(Specifies an XPath expression for anti-matching against markup \(HTML/XML\) content.).freeze,
|
213
|
+
domain: "tfo:MarkupTransform".freeze,
|
214
|
+
isDefinedBy: "tfo:".freeze,
|
215
|
+
label: "not-by-xpath".freeze,
|
216
|
+
range: "tfo:xpath".freeze,
|
217
|
+
type: "owl:DatatypeProperty".freeze
|
218
|
+
property :output,
|
219
|
+
comment: %(Specifies the resource that was the output of the transformation function.).freeze,
|
220
|
+
domain: "tfo:Application".freeze,
|
221
|
+
isDefinedBy: "tfo:".freeze,
|
222
|
+
label: "output".freeze,
|
223
|
+
range: "rdfs:Resource".freeze,
|
224
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
225
|
+
property :parameter,
|
226
|
+
comment: %(Binds a parameter object to its function.).freeze,
|
227
|
+
domain: "tfo:Transform".freeze,
|
228
|
+
isDefinedBy: "tfo:".freeze,
|
229
|
+
label: "parameter".freeze,
|
230
|
+
range: "tfo:Parameter".freeze,
|
231
|
+
"skos:usageNote": "Parameters can either be supplied to the function as key-value pairs or sequentially.".freeze,
|
232
|
+
type: "owl:ObjectProperty".freeze
|
233
|
+
property :"parameter-list",
|
234
|
+
comment: %(Specifies the sequence of parameters when the invocation method of the function is sequential.).freeze,
|
235
|
+
domain: "tfo:Transform".freeze,
|
236
|
+
isDefinedBy: "tfo:".freeze,
|
237
|
+
label: "parameter-list".freeze,
|
238
|
+
range: "tfo:ParameterList".freeze,
|
239
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
240
|
+
property :prefix,
|
241
|
+
comment: %(Specifies a SHACL prefix declaration for complementing any associated XPath expression.).freeze,
|
242
|
+
domain: "tfo:MarkupTransform".freeze,
|
243
|
+
label: "prefix".freeze,
|
244
|
+
note: %(
|
245
|
+
Note that the existing sh:declare property has a domain of owl:Ontology so we can't use it for this.
|
246
|
+
).freeze,
|
247
|
+
range: "sh:PrefixDeclaration".freeze,
|
248
|
+
type: "owl:ObjectProperty".freeze
|
249
|
+
property :returns,
|
250
|
+
comment: %(Specifies the list of content-types, in order of preference, that the function is capable of returning.).freeze,
|
251
|
+
domain: "tfo:Transform".freeze,
|
252
|
+
isDefinedBy: "tfo:".freeze,
|
253
|
+
label: "returns".freeze,
|
254
|
+
range: term(
|
255
|
+
unionOf: list("tfo:content-type".freeze, "rdf:List".freeze)
|
256
|
+
),
|
257
|
+
type: "owl:ObjectProperty".freeze
|
258
|
+
property :transform,
|
259
|
+
comment: %(Specifies the transform associated with this particular application).freeze,
|
260
|
+
domain: "tfo:Partial".freeze,
|
261
|
+
isDefinedBy: "tfo:".freeze,
|
262
|
+
label: "transform".freeze,
|
263
|
+
range: "tfo:Transform".freeze,
|
264
|
+
type: ["owl:FunctionalProperty".freeze, "owl:ObjectProperty".freeze]
|
265
|
+
|
266
|
+
# Datatype definitions
|
267
|
+
term :"content-type",
|
268
|
+
comment: %(A literal that represents a content-type such as that which is found in the HTTP Accept: or Content-Type: header.).freeze,
|
269
|
+
isDefinedBy: "tfo:".freeze,
|
270
|
+
label: "content-type".freeze,
|
271
|
+
"owl:onDatatype": "xsd:token".freeze,
|
272
|
+
"owl:withRestrictions": list(term(
|
273
|
+
"xsd:pattern": "^([!\#$%&'\\*\\+\\-.^_`|~0-9-A-Za-z]+)(?:/[!\#$%&'\\*\\+\\-.^_`|~0-9-A-Za-z]+)?)$".freeze
|
274
|
+
)),
|
275
|
+
"rdfs:seeAlso": ["https://tools.ietf.org/html/rfc7230#section-3.2.6".freeze, "https://tools.ietf.org/html/rfc7231#section-5.3.2".freeze],
|
276
|
+
type: "rdfs:Datatype".freeze
|
277
|
+
term :iregexp,
|
278
|
+
comment: %(A case-insensitive regular expression.).freeze,
|
279
|
+
label: "iregexp".freeze,
|
280
|
+
note: %(
|
281
|
+
Note that we do not intend to provide the full complement of flags for regular expressions like m, s, or x.
|
282
|
+
).freeze,
|
283
|
+
"owl:onDatatype": "xsd:string".freeze,
|
284
|
+
subClassOf: "tfo:regexp".freeze,
|
285
|
+
type: "rdfs:Datatype".freeze
|
286
|
+
term :regexp,
|
287
|
+
comment: %(A regular expression.).freeze,
|
288
|
+
label: "regexp".freeze,
|
289
|
+
"owl:onDatatype": "xsd:string".freeze,
|
290
|
+
"skos:usageNote": "\n We do not specify a flavour, but in practice we should assume PCRE or ECMA-262.\n ".freeze,
|
291
|
+
type: "rdfs:Datatype".freeze
|
292
|
+
term :xpath,
|
293
|
+
comment: %(An XPath expression.).freeze,
|
294
|
+
label: "xpath".freeze,
|
295
|
+
"owl:onDatatype": "xsd:string".freeze,
|
296
|
+
type: "rdfs:Datatype".freeze
|
297
|
+
|
298
|
+
RDF::Vocabulary.register :tfo, self if
|
299
|
+
RDF::Vocabulary.respond_to? :register
|
300
|
+
end
|
301
|
+
end
|