rdf 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS +1 -1
- data/README.md +43 -9
- data/VERSION +1 -1
- data/etc/doap.nt +74 -80
- data/lib/rdf.rb +13 -11
- data/lib/rdf/mixin/enumerable.rb +1 -0
- data/lib/rdf/mixin/queryable.rb +8 -0
- data/lib/rdf/mixin/writable.rb +7 -0
- data/lib/rdf/model/dataset.rb +1 -1
- data/lib/rdf/model/graph.rb +3 -0
- data/lib/rdf/model/statement.rb +30 -7
- data/lib/rdf/model/uri.rb +2 -2
- data/lib/rdf/nquads.rb +2 -2
- data/lib/rdf/ntriples.rb +6 -4
- data/lib/rdf/ntriples/reader.rb +25 -3
- data/lib/rdf/ntriples/writer.rb +9 -0
- data/lib/rdf/query.rb +4 -1
- data/lib/rdf/query/hash_pattern_normalizer.rb +9 -8
- data/lib/rdf/query/pattern.rb +49 -16
- data/lib/rdf/query/solution.rb +20 -1
- data/lib/rdf/query/solutions.rb +15 -5
- data/lib/rdf/query/variable.rb +17 -5
- data/lib/rdf/reader.rb +65 -20
- data/lib/rdf/repository.rb +19 -12
- data/lib/rdf/util/cache.rb +2 -2
- data/lib/rdf/vocab/owl.rb +401 -86
- data/lib/rdf/vocab/rdfs.rb +81 -18
- data/lib/rdf/vocab/rdfv.rb +122 -1
- data/lib/rdf/vocab/writer.rb +41 -3
- data/lib/rdf/vocab/xsd.rb +202 -1
- data/lib/rdf/vocabulary.rb +69 -11
- data/lib/rdf/writer.rb +21 -5
- metadata +4 -4
data/lib/rdf/vocab/rdfs.rb
CHANGED
@@ -5,118 +5,181 @@ require 'rdf'
|
|
5
5
|
module RDF
|
6
6
|
# @!parse
|
7
7
|
# # Vocabulary for <http://www.w3.org/2000/01/rdf-schema#>
|
8
|
+
# #
|
9
|
+
# # The RDF Schema vocabulary (RDFS)
|
10
|
+
# # @see http://www.w3.org/2000/01/rdf-schema-more
|
8
11
|
# class RDFS < RDF::StrictVocabulary
|
12
|
+
# # The class of classes.
|
13
|
+
# # @return [RDF::Vocabulary::Term]
|
14
|
+
# attr_reader :Class
|
15
|
+
#
|
16
|
+
# # The class of RDF containers.
|
17
|
+
# # @return [RDF::Vocabulary::Term]
|
18
|
+
# attr_reader :Container
|
19
|
+
#
|
20
|
+
# # The class of container membership properties, rdf:_1, rdf:_2, ..., all of which are sub-properties of 'member'.
|
21
|
+
# # @return [RDF::Vocabulary::Term]
|
22
|
+
# attr_reader :ContainerMembershipProperty
|
23
|
+
#
|
24
|
+
# # The class of RDF datatypes.
|
25
|
+
# # @return [RDF::Vocabulary::Term]
|
26
|
+
# attr_reader :Datatype
|
27
|
+
#
|
28
|
+
# # The class of literal values, eg. textual strings and integers.
|
29
|
+
# # @return [RDF::Vocabulary::Term]
|
30
|
+
# attr_reader :Literal
|
31
|
+
#
|
32
|
+
# # The class resource, everything.
|
33
|
+
# # @return [RDF::Vocabulary::Term]
|
34
|
+
# attr_reader :Resource
|
35
|
+
#
|
36
|
+
# # A description of the subject resource.
|
37
|
+
# # @return [RDF::Vocabulary::Term]
|
38
|
+
# attr_reader :comment
|
39
|
+
#
|
40
|
+
# # A domain of the subject property.
|
41
|
+
# # @return [RDF::Vocabulary::Term]
|
42
|
+
# attr_reader :domain
|
43
|
+
#
|
44
|
+
# # The defininition of the subject resource.
|
45
|
+
# # @return [RDF::Vocabulary::Term]
|
46
|
+
# attr_reader :isDefinedBy
|
47
|
+
#
|
48
|
+
# # A human-readable name for the subject.
|
49
|
+
# # @return [RDF::Vocabulary::Term]
|
50
|
+
# attr_reader :label
|
51
|
+
#
|
52
|
+
# # A member of the subject resource.
|
53
|
+
# # @return [RDF::Vocabulary::Term]
|
54
|
+
# attr_reader :member
|
55
|
+
#
|
56
|
+
# # A range of the subject property.
|
57
|
+
# # @return [RDF::Vocabulary::Term]
|
58
|
+
# attr_reader :range
|
59
|
+
#
|
60
|
+
# # Further information about the subject resource.
|
61
|
+
# # @return [RDF::Vocabulary::Term]
|
62
|
+
# attr_reader :seeAlso
|
63
|
+
#
|
64
|
+
# # The subject is a subclass of a class.
|
65
|
+
# # @return [RDF::Vocabulary::Term]
|
66
|
+
# attr_reader :subClassOf
|
67
|
+
#
|
68
|
+
# # The subject is a subproperty of a property.
|
69
|
+
# # @return [RDF::Vocabulary::Term]
|
70
|
+
# attr_reader :subPropertyOf
|
71
|
+
#
|
9
72
|
# end
|
10
|
-
|
73
|
+
RDFS = Class.new(RDF::StrictVocabulary("http://www.w3.org/2000/01/rdf-schema#")) do
|
11
74
|
|
12
75
|
# Ontology definition
|
13
76
|
ontology :"http://www.w3.org/2000/01/rdf-schema#",
|
14
|
-
"dc11:title":
|
15
|
-
"rdfs:seeAlso":
|
77
|
+
"dc11:title": "The RDF Schema vocabulary (RDFS)".freeze,
|
78
|
+
"rdfs:seeAlso": "http://www.w3.org/2000/01/rdf-schema-more".freeze,
|
16
79
|
type: "owl:Ontology".freeze
|
17
80
|
|
18
81
|
# Class definitions
|
19
82
|
term :Class,
|
20
83
|
comment: %(The class of classes.).freeze,
|
84
|
+
isDefinedBy: "rdfs:".freeze,
|
21
85
|
label: "Class".freeze,
|
22
|
-
isDefinedBy: %(rdfs:).freeze,
|
23
86
|
subClassOf: "rdfs:Resource".freeze,
|
24
87
|
type: "rdfs:Class".freeze
|
25
88
|
term :Container,
|
26
89
|
comment: %(The class of RDF containers.).freeze,
|
90
|
+
isDefinedBy: "rdfs:".freeze,
|
27
91
|
label: "Container".freeze,
|
28
|
-
isDefinedBy: %(rdfs:).freeze,
|
29
92
|
subClassOf: "rdfs:Resource".freeze,
|
30
93
|
type: "rdfs:Class".freeze
|
31
94
|
term :ContainerMembershipProperty,
|
32
95
|
comment: %(The class of container membership properties, rdf:_1, rdf:_2, ...,
|
33
96
|
all of which are sub-properties of 'member'.).freeze,
|
97
|
+
isDefinedBy: "rdfs:".freeze,
|
34
98
|
label: "ContainerMembershipProperty".freeze,
|
35
|
-
isDefinedBy: %(rdfs:).freeze,
|
36
99
|
subClassOf: "rdf:Property".freeze,
|
37
100
|
type: "rdfs:Class".freeze
|
38
101
|
term :Datatype,
|
39
102
|
comment: %(The class of RDF datatypes.).freeze,
|
103
|
+
isDefinedBy: "rdfs:".freeze,
|
40
104
|
label: "Datatype".freeze,
|
41
|
-
isDefinedBy: %(rdfs:).freeze,
|
42
105
|
subClassOf: "rdfs:Class".freeze,
|
43
106
|
type: "rdfs:Class".freeze
|
44
107
|
term :Literal,
|
45
108
|
comment: %(The class of literal values, eg. textual strings and integers.).freeze,
|
109
|
+
isDefinedBy: "rdfs:".freeze,
|
46
110
|
label: "Literal".freeze,
|
47
|
-
isDefinedBy: %(rdfs:).freeze,
|
48
111
|
subClassOf: "rdfs:Resource".freeze,
|
49
112
|
type: "rdfs:Class".freeze
|
50
113
|
term :Resource,
|
51
114
|
comment: %(The class resource, everything.).freeze,
|
115
|
+
isDefinedBy: "rdfs:".freeze,
|
52
116
|
label: "Resource".freeze,
|
53
|
-
isDefinedBy: %(rdfs:).freeze,
|
54
117
|
type: "rdfs:Class".freeze
|
55
118
|
|
56
119
|
# Property definitions
|
57
120
|
property :comment,
|
58
121
|
comment: %(A description of the subject resource.).freeze,
|
59
122
|
domain: "rdfs:Resource".freeze,
|
123
|
+
isDefinedBy: "rdfs:".freeze,
|
60
124
|
label: "comment".freeze,
|
61
125
|
range: "rdfs:Literal".freeze,
|
62
|
-
isDefinedBy: %(rdfs:).freeze,
|
63
126
|
type: "rdf:Property".freeze
|
64
127
|
property :domain,
|
65
128
|
comment: %(A domain of the subject property.).freeze,
|
66
129
|
domain: "rdf:Property".freeze,
|
130
|
+
isDefinedBy: "rdfs:".freeze,
|
67
131
|
label: "domain".freeze,
|
68
132
|
range: "rdfs:Class".freeze,
|
69
|
-
isDefinedBy: %(rdfs:).freeze,
|
70
133
|
type: "rdf:Property".freeze
|
71
134
|
property :isDefinedBy,
|
72
135
|
comment: %(The defininition of the subject resource.).freeze,
|
73
136
|
domain: "rdfs:Resource".freeze,
|
137
|
+
isDefinedBy: "rdfs:".freeze,
|
74
138
|
label: "isDefinedBy".freeze,
|
75
139
|
range: "rdfs:Resource".freeze,
|
76
|
-
isDefinedBy: %(rdfs:).freeze,
|
77
140
|
subPropertyOf: "rdfs:seeAlso".freeze,
|
78
141
|
type: "rdf:Property".freeze
|
79
142
|
property :label,
|
80
143
|
comment: %(A human-readable name for the subject.).freeze,
|
81
144
|
domain: "rdfs:Resource".freeze,
|
145
|
+
isDefinedBy: "rdfs:".freeze,
|
82
146
|
label: "label".freeze,
|
83
147
|
range: "rdfs:Literal".freeze,
|
84
|
-
isDefinedBy: %(rdfs:).freeze,
|
85
148
|
type: "rdf:Property".freeze
|
86
149
|
property :member,
|
87
150
|
comment: %(A member of the subject resource.).freeze,
|
88
151
|
domain: "rdfs:Resource".freeze,
|
152
|
+
isDefinedBy: "rdfs:".freeze,
|
89
153
|
label: "member".freeze,
|
90
154
|
range: "rdfs:Resource".freeze,
|
91
|
-
isDefinedBy: %(rdfs:).freeze,
|
92
155
|
type: "rdf:Property".freeze
|
93
156
|
property :range,
|
94
157
|
comment: %(A range of the subject property.).freeze,
|
95
158
|
domain: "rdf:Property".freeze,
|
159
|
+
isDefinedBy: "rdfs:".freeze,
|
96
160
|
label: "range".freeze,
|
97
161
|
range: "rdfs:Class".freeze,
|
98
|
-
isDefinedBy: %(rdfs:).freeze,
|
99
162
|
type: "rdf:Property".freeze
|
100
163
|
property :seeAlso,
|
101
164
|
comment: %(Further information about the subject resource.).freeze,
|
102
165
|
domain: "rdfs:Resource".freeze,
|
166
|
+
isDefinedBy: "rdfs:".freeze,
|
103
167
|
label: "seeAlso".freeze,
|
104
168
|
range: "rdfs:Resource".freeze,
|
105
|
-
isDefinedBy: %(rdfs:).freeze,
|
106
169
|
type: "rdf:Property".freeze
|
107
170
|
property :subClassOf,
|
108
171
|
comment: %(The subject is a subclass of a class.).freeze,
|
109
172
|
domain: "rdfs:Class".freeze,
|
173
|
+
isDefinedBy: "rdfs:".freeze,
|
110
174
|
label: "subClassOf".freeze,
|
111
175
|
range: "rdfs:Class".freeze,
|
112
|
-
isDefinedBy: %(rdfs:).freeze,
|
113
176
|
type: "rdf:Property".freeze
|
114
177
|
property :subPropertyOf,
|
115
178
|
comment: %(The subject is a subproperty of a property.).freeze,
|
116
179
|
domain: "rdf:Property".freeze,
|
180
|
+
isDefinedBy: "rdfs:".freeze,
|
117
181
|
label: "subPropertyOf".freeze,
|
118
182
|
range: "rdf:Property".freeze,
|
119
|
-
isDefinedBy: %(rdfs:).freeze,
|
120
183
|
type: "rdf:Property".freeze
|
121
184
|
end
|
122
185
|
end
|
data/lib/rdf/vocab/rdfv.rb
CHANGED
@@ -5,9 +5,130 @@ require 'rdf'
|
|
5
5
|
module RDF
|
6
6
|
# @!parse
|
7
7
|
# # Vocabulary for <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
8
|
+
# #
|
9
|
+
# # This is the RDF Schema for the RDF vocabulary terms in the RDF Namespace, defined in RDF 1.1 Concepts.
|
8
10
|
# class RDFV < RDF::StrictVocabulary
|
11
|
+
# # The class of containers of alternatives.
|
12
|
+
# # @return [RDF::Vocabulary::Term]
|
13
|
+
# # @attr_reader :Alt
|
14
|
+
#
|
15
|
+
# # The class of unordered containers.
|
16
|
+
# # @return [RDF::Vocabulary::Term]
|
17
|
+
# # @attr_reader :Bag
|
18
|
+
#
|
19
|
+
# # A class representing a compound literal.
|
20
|
+
# # @return [RDF::Vocabulary::Term]
|
21
|
+
# # @attr_reader :CompoundLiteral
|
22
|
+
#
|
23
|
+
# # The class of RDF Lists.
|
24
|
+
# # @return [RDF::Vocabulary::Term]
|
25
|
+
# # @attr_reader :List
|
26
|
+
#
|
27
|
+
# # The class of RDF properties.
|
28
|
+
# # @return [RDF::Vocabulary::Term]
|
29
|
+
# # @attr_reader :Property
|
30
|
+
#
|
31
|
+
# # The class of ordered containers.
|
32
|
+
# # @return [RDF::Vocabulary::Term]
|
33
|
+
# # @attr_reader :Seq
|
34
|
+
#
|
35
|
+
# # The class of RDF statements.
|
36
|
+
# # @return [RDF::Vocabulary::Term]
|
37
|
+
# # @attr_reader :Statement
|
38
|
+
#
|
39
|
+
# # The direction component of a CompoundLiteral.
|
40
|
+
# # @return [RDF::Vocabulary::Term]
|
41
|
+
# # @attr_reader :direction
|
42
|
+
#
|
43
|
+
# # The first item in the subject RDF list.
|
44
|
+
# # @return [RDF::Vocabulary::Term]
|
45
|
+
# # @attr_reader :first
|
46
|
+
#
|
47
|
+
# # The object of the subject RDF statement.
|
48
|
+
# # @return [RDF::Vocabulary::Term]
|
49
|
+
# # @attr_reader :object
|
50
|
+
#
|
51
|
+
# # The language component of a CompoundLiteral.
|
52
|
+
# # @return [RDF::Vocabulary::Term]
|
53
|
+
# # @attr_reader :language
|
54
|
+
#
|
55
|
+
# # The predicate of the subject RDF statement.
|
56
|
+
# # @return [RDF::Vocabulary::Term]
|
57
|
+
# # @attr_reader :predicate
|
58
|
+
#
|
59
|
+
# # The rest of the subject RDF list after the first item.
|
60
|
+
# # @return [RDF::Vocabulary::Term]
|
61
|
+
# # @attr_reader :rest
|
62
|
+
#
|
63
|
+
# # The subject of the subject RDF statement.
|
64
|
+
# # @return [RDF::Vocabulary::Term]
|
65
|
+
# # @attr_reader :subject
|
66
|
+
#
|
67
|
+
# # The subject is an instance of a class.
|
68
|
+
# # @return [RDF::Vocabulary::Term]
|
69
|
+
# # @attr_reader :type
|
70
|
+
#
|
71
|
+
# # Idiomatic property used for structured values.
|
72
|
+
# # @return [RDF::Vocabulary::Term]
|
73
|
+
# # @attr_reader :value
|
74
|
+
#
|
75
|
+
# # The datatype of RDF literals storing fragments of HTML content.
|
76
|
+
# # @return [RDF::Vocabulary::Term]
|
77
|
+
# # @attr_reader :HTML
|
78
|
+
#
|
79
|
+
# # The datatype of RDF literals storing JSON content.
|
80
|
+
# # @return [RDF::Vocabulary::Term]
|
81
|
+
# # @attr_reader :JSON
|
82
|
+
#
|
83
|
+
# # The class of plain (i.e. untyped) literal values, as used in RIF and OWL 2.
|
84
|
+
# # @return [RDF::Vocabulary::Term]
|
85
|
+
# # @attr_reader :PlainLiteral
|
86
|
+
#
|
87
|
+
# # The datatype of XML literal values.
|
88
|
+
# # @return [RDF::Vocabulary::Term]
|
89
|
+
# # @attr_reader :XMLLiteral
|
90
|
+
#
|
91
|
+
# # The datatype of language-tagged string values.
|
92
|
+
# # @return [RDF::Vocabulary::Term]
|
93
|
+
# # @attr_reader :langString
|
94
|
+
#
|
95
|
+
# # RDF/XML node element.
|
96
|
+
# # @return [RDF::Vocabulary::Term]
|
97
|
+
# # @attr_reader :Description
|
98
|
+
#
|
99
|
+
# # RDF/XML attribute creating a Reification.
|
100
|
+
# # @return [RDF::Vocabulary::Term]
|
101
|
+
# # @attr_reader :ID
|
102
|
+
#
|
103
|
+
# # RDF/XML attribute declaring subject.
|
104
|
+
# # @return [RDF::Vocabulary::Term]
|
105
|
+
# # @attr_reader :about
|
106
|
+
#
|
107
|
+
# # RDF/XML literal datatype.
|
108
|
+
# # @return [RDF::Vocabulary::Term]
|
109
|
+
# # @attr_reader :datatype
|
110
|
+
#
|
111
|
+
# # RDF/XML container membership list element.
|
112
|
+
# # @return [RDF::Vocabulary::Term]
|
113
|
+
# # @attr_reader :li
|
114
|
+
#
|
115
|
+
# # The empty list, with no items in it. If the rest of a list is nil then the list has no more items in it.
|
116
|
+
# # @return [RDF::Vocabulary::Term]
|
117
|
+
# # @attr_reader :nil
|
118
|
+
#
|
119
|
+
# # RDF/XML Blank Node identifier.
|
120
|
+
# # @return [RDF::Vocabulary::Term]
|
121
|
+
# # @attr_reader :nodeID
|
122
|
+
#
|
123
|
+
# # Parse type for RDF/XML, either Collection, Literal or Resource.
|
124
|
+
# # @return [RDF::Vocabulary::Term]
|
125
|
+
# # @attr_reader :parseType
|
126
|
+
#
|
127
|
+
# # RDF/XML attribute declaring object.
|
128
|
+
# # @return [RDF::Vocabulary::Term]
|
129
|
+
# # @attr_reader :resource
|
9
130
|
# end
|
10
|
-
|
131
|
+
RDFV = Class.new(RDF::StrictVocabulary("http://www.w3.org/1999/02/22-rdf-syntax-ns#")) do
|
11
132
|
|
12
133
|
class << self
|
13
134
|
def name; "RDF"; end
|
data/lib/rdf/vocab/writer.rb
CHANGED
@@ -145,11 +145,29 @@ module RDF
|
|
145
145
|
module #{module_name}
|
146
146
|
# @!parse
|
147
147
|
# # Vocabulary for <#{base_uri}>
|
148
|
-
#
|
149
|
-
# end
|
150
|
-
class #{class_name} < RDF::#{"Strict" if strict}Vocabulary("#{base_uri}")
|
148
|
+
# #
|
151
149
|
).gsub(/^ /, '')
|
152
150
|
|
151
|
+
if vocab.ontology
|
152
|
+
ont_doc = []
|
153
|
+
[:"dc:title", :"dc11:title", :label, :comment, :"dc:description", :"dc11:description"].each do |attr|
|
154
|
+
next unless vocab.ontology.attributes[attr]
|
155
|
+
Array(vocab.ontology.attributes[attr]).each do |v|
|
156
|
+
ont_doc << " # # " + v.to_s.gsub(/\n/, ' ')
|
157
|
+
end
|
158
|
+
end
|
159
|
+
@output.puts ont_doc.join("\n # #\n") unless ont_doc.empty?
|
160
|
+
# Version Info
|
161
|
+
Array(vocab.ontology.attributes[:"owl:versionInfo"]).each do |vers|
|
162
|
+
@output.puts " # # @version #{vers}"
|
163
|
+
end
|
164
|
+
# See Also
|
165
|
+
Array(vocab.ontology.attributes[:"rdfs:seeAlso"]).each do |see|
|
166
|
+
@output.puts " # # @see #{see}"
|
167
|
+
end
|
168
|
+
end
|
169
|
+
@output.puts %( # class #{class_name} < RDF::#{"Strict" if strict}Vocabulary)
|
170
|
+
|
153
171
|
# Split nodes into Class/Property/Datatype/Other
|
154
172
|
term_nodes = {
|
155
173
|
ontology: {},
|
@@ -181,6 +199,26 @@ module RDF
|
|
181
199
|
term_nodes[kind][name] = term.attributes
|
182
200
|
end
|
183
201
|
|
202
|
+
# Yard attribute information for terms
|
203
|
+
term_nodes.each do |tt, ttv|
|
204
|
+
next if tt == :ontology
|
205
|
+
ttv.each do |name, attributes|
|
206
|
+
# Only document terms that can be accessed like a Ruby attribute
|
207
|
+
next unless name.to_s.match?(/^[_[:alpha:]](?:\w*)[!?=]?$/)
|
208
|
+
@output.puts(Array(attributes[:comment]).map do |comment|
|
209
|
+
" # # #{comment.to_s.gsub(/\n/, ' ')}"
|
210
|
+
end.join("\n # #\n")) if attributes[:comment]
|
211
|
+
@output.puts " # # @return [RDF::Vocabulary::Term]"
|
212
|
+
@output.puts " # attr_reader :#{name}"
|
213
|
+
@output.puts " #"
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
# End of yard preamble
|
218
|
+
@output.puts " # end"
|
219
|
+
@output.puts %( #{class_name} = Class.new(RDF::#{"Strict" if strict}Vocabulary("#{base_uri}")) do)
|
220
|
+
|
221
|
+
# Output term definitions
|
184
222
|
{
|
185
223
|
ontology: "Ontology definition",
|
186
224
|
class: "Class definitions",
|
data/lib/rdf/vocab/xsd.rb
CHANGED
@@ -5,9 +5,210 @@ require 'rdf'
|
|
5
5
|
module RDF
|
6
6
|
# @!parse
|
7
7
|
# # Vocabulary for <http://www.w3.org/2001/XMLSchema#>
|
8
|
+
# #
|
8
9
|
# class XSD < RDF::Vocabulary
|
10
|
+
# # `ENTITIES` represents the `ENTITIES` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `ENTITIES` is the set of finite, non-zero-length sequences of ·{ENTITY}· values that have been declared as unparsed entities in a document type definition. The ·lexical space· of `ENTITIES` is the set of space-separated lists of tokens, of which each token is in the ·lexical space· of {ENTITY}. The ·item type· of `ENTITIES` is {ENTITY}. `ENTITIES` is derived from ·{anySimpleType}· in two steps: an anonymous list type is defined, whose ·item type· is {ENTITY}; this is the ·base type· of `ENTITIES`, which restricts its value space to lists with at least one item.
|
11
|
+
# # @return [RDF::Vocabulary::Term]
|
12
|
+
# attr_reader :ENTITIES
|
13
|
+
#
|
14
|
+
# # `ENTITY` represents the `ENTITY` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `ENTITY` is the set of all strings that ·match· the `NCName` production in [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/) and have been declared as an unparsed entity in a document type definition. The ·lexical space· of `ENTITY` is the set of all strings that ·match· the `NCName` production in [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·base type· of `ENTITY` is {NCName}.
|
15
|
+
# # @return [RDF::Vocabulary::Term]
|
16
|
+
# attr_reader :ENTITY
|
17
|
+
#
|
18
|
+
# # `ID` represents the ID attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `ID` is the set of all strings that ·match· the `NCName` production in [Namespaces in XML]. The ·lexical space· of `ID` is the set of all strings that ·match· the `NCName` production in [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·base type· of `ID` is {NCName}.
|
19
|
+
# # @return [RDF::Vocabulary::Term]
|
20
|
+
# attr_reader :ID
|
21
|
+
#
|
22
|
+
# # `IDREF` represents the `IDRE`F attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `IDREF` is the set of all strings that ·match· the `NCName` production in [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·lexical space· of `IDREF` is the set of strings that ·match· the `NCName` production in [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·base type· of `IDREF` is {NCName}.
|
23
|
+
# # @return [RDF::Vocabulary::Term]
|
24
|
+
# attr_reader :IDREF
|
25
|
+
#
|
26
|
+
# # `IDREFS` represents the `IDREFS` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `IDREFS` is the set of finite, non-zero-length sequences of `IDREFs`. The ·lexical space· of `IDREFS` is the set of space-separated lists of tokens, of which each token is in the ·lexical space· of `IDREF.` The ·item type· of `IDREFS` is {IDREF}. `IDREFS` is derived from ·{anySimpleType}· in two steps: an anonymous list type is defined, whose ·item type· is {IDREF}; this is the ·base type· of `IDREFS`, which restricts its value space to lists with at least one item.
|
27
|
+
# # @return [RDF::Vocabulary::Term]
|
28
|
+
# attr_reader :IDREFS
|
29
|
+
#
|
30
|
+
# # `NCName` represents XML "non-colonized" `Names`. The ·value space· of `NCName` is the set of all strings which ·match· the `NCName` production of [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·lexical space· of `NCName` is the set of all strings which ·match· the `NCName` production of [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/). The ·base type· of `NCName` is {Name}.
|
31
|
+
# # @return [RDF::Vocabulary::Term]
|
32
|
+
# attr_reader :NCName
|
33
|
+
#
|
34
|
+
# # `NMTOKEN` represents the `NMTOKEN` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `NMTOKEN` is the set of tokens that ·match· the `Nmtoken` production in [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·lexical space· of `NMTOKEN` is the set of strings that ·match· the `Nmtoken` production in [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·base type· of `NMTOKEN` is {token}.
|
35
|
+
# # @return [RDF::Vocabulary::Term]
|
36
|
+
# attr_reader :NMTOKEN
|
37
|
+
#
|
38
|
+
# # `NMTOKENS` represents the `NMTOKENS` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `NMTOKENS` is the set of finite, non-zero-length sequences of ·`NMTOKEN`·s. The ·lexical space· of `NMTOKENS` is the set of space-separated lists of tokens, of which each token is in the ·lexical space· of `NMTOKEN`. The ·item type· of `NMTOKENS` is `NMTOKEN`. `NMTOKEN`S is derived from ·{anySimpleType}· in two steps: an anonymous list type is defined, whose ·item type· is `NMTOKEN`; this is the ·base type· of `NMTOKENS`, which restricts its value space to lists with at least one item.
|
39
|
+
# # @return [RDF::Vocabulary::Term]
|
40
|
+
# attr_reader :NMTOKENS
|
41
|
+
#
|
42
|
+
# # `NOTATION` represents the `NOTATION` attribute type from [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·value space· of `NOTATION` is the set of `QName`s of notations declared in the current schema. The ·lexical space· of `NOTATION` is the set of all names of notations declared in the current schema (in the form of `QNames`).
|
43
|
+
# # @return [RDF::Vocabulary::Term]
|
44
|
+
# attr_reader :NOTATION
|
45
|
+
#
|
46
|
+
# # `Name` represents XML Names. The ·value space· of `Name` is the set of all strings which ·match· the `Name` production of [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814)(http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·lexical space· of `Name` is the set of all strings which ·match· the `Name` production of [XML](http://www.w3.org/TR/2000/WD-xml-2e-20000814). The ·base type· of `Name` is {token}.
|
47
|
+
# # @return [RDF::Vocabulary::Term]
|
48
|
+
# attr_reader :Name
|
49
|
+
#
|
50
|
+
# # `QName` represents XML qualified names. The ·value space· of `QName` is the set of tuples `{namespace name, local part}`, where namespace name is an anyURI and local part is an NCName. The ·lexical space· of `QName` is the set of strings that ·match· the `QName` production of [Namespaces in XML](http://www.w3.org/TR/1999/REC-xml-names-19990114/).
|
51
|
+
# # @return [RDF::Vocabulary::Term]
|
52
|
+
# attr_reader :QName
|
53
|
+
#
|
54
|
+
# # `anyAtomicType` is a special ·restriction· of {anySimpleType}. The ·value· and ·lexical spaces· of `anyAtomicType` are the unions of the ·value· and ·lexical spaces· of all the ·primitive· datatypes, and `anyAtomicType` is their ·base type·.
|
55
|
+
# # @return [RDF::Vocabulary::Term]
|
56
|
+
# attr_reader :anyAtomicType
|
57
|
+
#
|
58
|
+
# # The definition of `anySimpleType` is a special ·restriction· of {anyType}. The ·lexical space· of `anySimpleType` is the set of all sequences of Unicode characters, and its ·value space· includes all ·atomic values· and all finite-length lists of zero or more ·atomic values·.
|
59
|
+
# # @return [RDF::Vocabulary::Term]
|
60
|
+
# attr_reader :anySimpleType
|
61
|
+
#
|
62
|
+
# # The root of the [XML Schema 1.1] datatype heirarchy.
|
63
|
+
# # @return [RDF::Vocabulary::Term]
|
64
|
+
# attr_reader :anyType
|
65
|
+
#
|
66
|
+
# # `anyURI` represents an Internationalized Resource Identifier Reference (`IRI`). An `anyURI` value can be absolute or relative, and may have an optional fragment identifier (i.e., it may be an `IRI Reference`). This type should be used when the value fulfills the role of an `IRI`, as defined in [RFC 2045](https://www.ietf.org/rfc/rfc3987.txt) or its successor(s) in the IETF Standards Track.
|
67
|
+
# # @return [RDF::Vocabulary::Term]
|
68
|
+
# attr_reader :anyURI
|
69
|
+
#
|
70
|
+
# # `base64Binary` represents arbitrary `Base64`-encoded binary data. For `base64Binary` data the entire binary stream is encoded using the `Base64` Encoding defined in [RFC 3548](https://www.ietf.org/rfc/rfc3548.txt), which is derived from the encoding described in [RFC 2045](https://www.ietf.org/rfc/rfc2045.txt).
|
71
|
+
# # @return [RDF::Vocabulary::Term]
|
72
|
+
# attr_reader :base64Binary
|
73
|
+
#
|
74
|
+
# # `boolean` represents the values of two-valued logic.
|
75
|
+
# # @return [RDF::Vocabulary::Term]
|
76
|
+
# attr_reader :boolean
|
77
|
+
#
|
78
|
+
# # ` byte` is ·derived· from short by setting the value of ·`maxInclusive`· to be `127` and ·`minInclusive`· to be `-128`. The ·base type· of `byte` is {short}.
|
79
|
+
# # @return [RDF::Vocabulary::Term]
|
80
|
+
# attr_reader :byte
|
81
|
+
#
|
82
|
+
# # `date` represents top-open intervals of exactly one day in length on the timelines of {dateTime}, beginning on the beginning moment of each day, up to but not including the beginning moment of the next day). For non-timezoned values, the top-open intervals disjointly cover the non-timezoned timeline, one per day. For timezoned values, the intervals begin at every minute and therefore overlap.
|
83
|
+
# # @return [RDF::Vocabulary::Term]
|
84
|
+
# attr_reader :date
|
85
|
+
#
|
86
|
+
# # `dateTime` represents instants of time, optionally marked with a particular time zone offset. Values representing the same instant but having different time zone offsets are equal but not identical.
|
87
|
+
# # @return [RDF::Vocabulary::Term]
|
88
|
+
# attr_reader :dateTime
|
89
|
+
#
|
90
|
+
# # The `dateTimeStamp` datatype is ·derived· from {dateTime} by giving the value required to its explicitTimezone facet. The result is that all values of `dateTimeStamp` are required to have explicit time zone offsets and the datatype is totally ordered.
|
91
|
+
# # @return [RDF::Vocabulary::Term]
|
92
|
+
# attr_reader :dateTimeStamp
|
93
|
+
#
|
94
|
+
# # `dayTimeDuration` is a datatype ·derived· from {duration} by restricting its ·lexical representations· to instances of `dayTimeDurationLexicalRep`. The ·value space· of `dayTimeDuration` is therefore that of {duration} restricted to those whose ·months· property is 0. This results in a {duration} datatype which is totally ordered.
|
95
|
+
# # @return [RDF::Vocabulary::Term]
|
96
|
+
# attr_reader :dayTimeDuration
|
97
|
+
#
|
98
|
+
# # `decimal` represents a subset of the real numbers, which can be represented by decimal numerals. The ·value space· of `decimal` is the set of numbers that can be obtained by dividing an integer by a non-negative power of ten, i.e., expressible as `i / 10n` where `i` and `n` are integers and `n ≥ 0`. Precision is not reflected in this value space; the number `2.0` is not distinct from the number `2.00`. The order relation on `decimal` is the order relation on real numbers, restricted to this subset.
|
99
|
+
# # @return [RDF::Vocabulary::Term]
|
100
|
+
# attr_reader :decimal
|
101
|
+
#
|
102
|
+
# # The `double` datatype is patterned after the IEEE double-precision 64-bit floating point datatype [IEEE 754-2008](https://ieeexplore.ieee.org/document/4610935). Each floating point datatype has a value space that is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers.
|
103
|
+
# # @return [RDF::Vocabulary::Term]
|
104
|
+
# attr_reader :double
|
105
|
+
#
|
106
|
+
# # `duration` is a datatype that represents durations of time. The concept of duration being captured is drawn from those of [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html), specifically durations without fixed endpoints. For example, "15 days" (whose most common lexical representation in duration is "'P15D'") is a `duration` value; "15 days beginning 12 July 1995" and "15 days ending 12 July 1995" are not `duration` values. `duration` can provide addition and subtraction operations between duration values and between `duration`/{dateTime} value pairs, and can be the result of subtracting dateTime values. However, only addition to {dateTime} is required for XML Schema processing and is defined in the function ·`dateTimePlusDuration`·.
|
107
|
+
# # @return [RDF::Vocabulary::Term]
|
108
|
+
# attr_reader :duration
|
109
|
+
#
|
110
|
+
# # The `float` datatype is patterned after the IEEE single-precision 32-bit floating point datatype [IEEE 754-2008](https://ieeexplore.ieee.org/document/4610935). Its value space is a subset of the rational numbers. Floating point numbers are often used to approximate arbitrary real numbers.
|
111
|
+
# # @return [RDF::Vocabulary::Term]
|
112
|
+
# attr_reader :float
|
113
|
+
#
|
114
|
+
# # `gDay` represents whole days within an arbitrary month—days that recur at the same point in each (Gregorian) month. This datatype is used to represent a specific day of the month. To indicate, for example, that an employee gets a paycheck on the 15th of each month. (Obviously, days beyond 28 cannot occur in all months; they are nonetheless permitted, up to 31.)
|
115
|
+
# # @return [RDF::Vocabulary::Term]
|
116
|
+
# attr_reader :gDay
|
117
|
+
#
|
118
|
+
# # `gMonth` represents whole (Gregorian) months within an arbitrary year—months that recur at the same point in each year. It might be used, for example, to say what month annual Thanksgiving celebrations fall in different countries (--11 in the United States, --10 in Canada, and possibly other months in other countries).
|
119
|
+
# # @return [RDF::Vocabulary::Term]
|
120
|
+
# attr_reader :gMonth
|
121
|
+
#
|
122
|
+
# # `gMonthDay` represents whole calendar days that recur at the same point in each calendar year, or that occur in some arbitrary calendar year. (Obviously, days beyond 28 cannot occur in all Februaries; 29 is nonetheless permitted.)
|
123
|
+
# # @return [RDF::Vocabulary::Term]
|
124
|
+
# attr_reader :gMonthDay
|
125
|
+
#
|
126
|
+
# # `gYear` represents Gregorian calendar years.
|
127
|
+
# # @return [RDF::Vocabulary::Term]
|
128
|
+
# attr_reader :gYear
|
129
|
+
#
|
130
|
+
# # `gYearMonth` represents specific whole Gregorian months in specific Gregorian years.
|
131
|
+
# # @return [RDF::Vocabulary::Term]
|
132
|
+
# attr_reader :gYearMonth
|
133
|
+
#
|
134
|
+
# # `hexBinary` represents arbitrary hex-encoded binary data.
|
135
|
+
# # @return [RDF::Vocabulary::Term]
|
136
|
+
# attr_reader :hexBinary
|
137
|
+
#
|
138
|
+
# # `int` is ·derived· from long by setting the value of ·`maxInclusive`· to be ``2147483647`` and ·`minInclusive`· to be ``-2147483648``. The ·base type· of `int` is {long}.
|
139
|
+
# # @return [RDF::Vocabulary::Term]
|
140
|
+
# attr_reader :int
|
141
|
+
#
|
142
|
+
# # `integer` is ·derived· from {decimal} by fixing the value of ·`fractionDigits`· to be `0` and disallowing the trailing decimal point. This results in the standard mathematical concept of the integer numbers. The ·value space· of `integer` is the infinite set `{...,-2,-1,0,1,2,...}`. The ·base type· of `integer` is {decimal}.
|
143
|
+
# # @return [RDF::Vocabulary::Term]
|
144
|
+
# attr_reader :integer
|
145
|
+
#
|
146
|
+
# # `language` represents formal natural language identifiers, as defined by [BCP 47](https://tools.ietf.org/html/bcp47) (currently represented by [RFC 2045](https://www.ietf.org/rfc/rfc4646.txt) and [RFC 2045](https://www.ietf.org/rfc/rfc4647.txt)) or its successor(s). The ·value space· and ·lexical space· of `language` are the set of all strings that conform to the pattern `[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*`
|
147
|
+
# # @return [RDF::Vocabulary::Term]
|
148
|
+
# attr_reader :language
|
149
|
+
#
|
150
|
+
# # `long` is ·derived· from {integer} by setting the value of ·`maxInclusive`· to be `9223372036854775807` and ·`minInclusive`· to be `-9223372036854775808`. The ·base type· of `long` is {integer}.
|
151
|
+
# # @return [RDF::Vocabulary::Term]
|
152
|
+
# attr_reader :long
|
153
|
+
#
|
154
|
+
# # `negativeInteger` is ·derived· from {nonPositiveInteger} by setting the value of ·`maxInclusive`· to be `-1`. This results in the standard mathematical concept of the negative integers. The ·value space· of `negativeInteger` is the infinite set `{...,-2,-1}`. The ·base type· of `negativeInteger` is {nonPositiveInteger}.
|
155
|
+
# # @return [RDF::Vocabulary::Term]
|
156
|
+
# attr_reader :negativeInteger
|
157
|
+
#
|
158
|
+
# # `nonNegativeInteger` is ·derived· from {integer} by setting the value of ·`minInclusive`· to be `0`. This results in the standard mathematical concept of the non-negative integers. The ·value space· of `nonNegativeInteger` is the infinite set `{0,1,2,...}`. The ·base type· of `nonNegativeInteger` is {integer}.
|
159
|
+
# # @return [RDF::Vocabulary::Term]
|
160
|
+
# attr_reader :nonNegativeInteger
|
161
|
+
#
|
162
|
+
# # `nonPositiveInteger` is ·derived· from {integer} by setting the value of ·`maxInclusive`· to be `0`. This results in the standard mathematical concept of the non-positive integers. The ·value space· of `nonPositiveInteger` is the infinite set `{...,-2,-1,0}`. The ·base type· of `nonPositiveInteger` is {integer}.
|
163
|
+
# # @return [RDF::Vocabulary::Term]
|
164
|
+
# attr_reader :nonPositiveInteger
|
165
|
+
#
|
166
|
+
# # `normalizedString` represents white space normalized strings. The ·value space· of `normalizedString` is the set of strings that do not contain the carriage return `(#xD)`, line feed `(#xA) no`r tab `(#x9)` characters. The ·lexical space· of `normalizedString` is the set of strings that do not contain the carriage return `(#xD)`, line feed `(#xA)` nor tab `(#x9)` characters. The ·base type· of `normalizedString` is {string}.
|
167
|
+
# # @return [RDF::Vocabulary::Term]
|
168
|
+
# attr_reader :normalizedString
|
169
|
+
#
|
170
|
+
# # `positiveInteger` is ·derived· from `nonNegativeInteger` by setting the value of ·`minInclusive`· to be `1`. This results in the standard mathematical concept of the positive integer numbers. The ·value space· of `positiveInteger` is the infinite set `{1,2,...}`. The ·base type· of `positiveInteger` is {nonNegativeInteger}.
|
171
|
+
# # @return [RDF::Vocabulary::Term]
|
172
|
+
# attr_reader :positiveInteger
|
173
|
+
#
|
174
|
+
# # `short` is ·derived· from `int` by setting the value of ·`maxInclusive`· to be `32767` and ·minInclusive· to be `-32768`. The ·base type· of `short` is {int}.
|
175
|
+
# # @return [RDF::Vocabulary::Term]
|
176
|
+
# attr_reader :short
|
177
|
+
#
|
178
|
+
# # The `string` datatype represents character strings in XML.
|
179
|
+
# # @return [RDF::Vocabulary::Term]
|
180
|
+
# attr_reader :string
|
181
|
+
#
|
182
|
+
# # `time` represents instants of time that recur at the same point in each calendar day, or that occur in some arbitrary calendar day.
|
183
|
+
# # @return [RDF::Vocabulary::Term]
|
184
|
+
# attr_reader :time
|
185
|
+
#
|
186
|
+
# # `token` represents tokenized strings. The ·value space· of `token` is the set of strings that do not contain the carriage return `(#xD)`, line feed `(#xA)` nor tab `(#x9)` characters, that have no leading or trailing spaces `(#x20)` and that have no internal sequences of two or more spaces. The ·lexical space· of `token` is the set of strings that do not contain the carriage return `(#xD)`, line feed `(#xA)` nor tab `(#x9)` characters, that have no leading or trailing spaces `(#x20)` and that have no internal sequences of two or more spaces. The ·base type· of `token` is {normalizedString}.
|
187
|
+
# # @return [RDF::Vocabulary::Term]
|
188
|
+
# attr_reader :token
|
189
|
+
#
|
190
|
+
# # `unsignedByte` is ·derived· from {unsignedShort} by setting the value of ·`maxInclusive`· to be `255`. The ·base type· of `unsignedByte` is {unsignedShort}.
|
191
|
+
# # @return [RDF::Vocabulary::Term]
|
192
|
+
# attr_reader :unsignedByte
|
193
|
+
#
|
194
|
+
# # `unsignedInt` is ·derived· from {unsignedLong} by setting the value of ·`maxInclusive`· to be `4294967295`. The ·base type· of `unsignedInt` is {unsignedLong}.
|
195
|
+
# # @return [RDF::Vocabulary::Term]
|
196
|
+
# attr_reader :unsignedInt
|
197
|
+
#
|
198
|
+
# # `unsignedLong` is ·derived· from {nonNegativeInteger} by setting the value of ·`maxInclusive`· to be `18446744073709551615`. The ·base type· of `unsignedLong` is {nonNegativeInteger}.
|
199
|
+
# # @return [RDF::Vocabulary::Term]
|
200
|
+
# attr_reader :unsignedLong
|
201
|
+
#
|
202
|
+
# # `unsignedShort` is ·derived· from {unsignedInt} by setting the value of ·`maxInclusive`· to be `65535`. The ·base type· of `unsignedShort` is {unsignedInt}.
|
203
|
+
# # @return [RDF::Vocabulary::Term]
|
204
|
+
# attr_reader :unsignedShort
|
205
|
+
#
|
206
|
+
# # `yearMonthDuration` is a datatype ·derived· from {duration} by restricting its ·lexical representations· to instances of `yearMonthDurationLexicalRep`. The ·value space· of `yearMonthDuration` is therefore that of {duration} restricted to those whose ·seconds· property is 0. This results in a duration datatype which is totally ordered.
|
207
|
+
# # @return [RDF::Vocabulary::Term]
|
208
|
+
# attr_reader :yearMonthDuration
|
209
|
+
#
|
9
210
|
# end
|
10
|
-
|
211
|
+
XSD = Class.new(RDF::Vocabulary("http://www.w3.org/2001/XMLSchema#")) do
|
11
212
|
|
12
213
|
# Datatype definitions
|
13
214
|
term :ENTITIES,
|