Module: RDF::N3::Algebra

Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra/builtin.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra/formula.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra/list_operator.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra/not_implemented.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra/resource_operator.rb

Overview

Based on the SPARQL Algebra, operators for executing a patch

Author:

Defined Under Namespace

Modules: Builtin, List, Log, Math, Str, Time Classes: Formula, ListOperator, NotImplemented, ResourceOperator

Class Method Summary collapse

Class Method Details

.for(uri) ⇒ Object



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/rdf-n3-a6ef81a7e1ce/lib/rdf/n3/algebra.rb', line 118

def for(uri)
  {
    RDF::N3::List.append              => List.const_get(:Append),
    RDF::N3::List.first               => List.const_get(:First),
    RDF::N3::List.in                  => List.const_get(:In),
    RDF::N3::List.iterate             => List.const_get(:Iterate),
    RDF::N3::List.last                => List.const_get(:Last),
    RDF::N3::List.length              => List.const_get(:Length),
    RDF::N3::List.member              => List.const_get(:Member),

    RDF::N3::Log.conclusion           => Log.const_get(:Conclusion),
    RDF::N3::Log.conjunction          => Log.const_get(:Conjunction),
    RDF::N3::Log.content              => Log.const_get(:Content),
    RDF::N3::Log.dtlit                => Log.const_get(:DtLit),
    RDF::N3::Log.equalTo              => Log.const_get(:EqualTo),
    RDF::N3::Log.implies              => Log.const_get(:Implies),
    RDF::N3::Log.includes             => Log.const_get(:Includes),
    RDF::N3::Log.langlit              => Log.const_get(:LangLit),
    RDF::N3::Log.n3String             => Log.const_get(:N3String),
    RDF::N3::Log.notEqualTo           => Log.const_get(:NotEqualTo),
    RDF::N3::Log.notIncludes          => Log.const_get(:NotIncludes),
    RDF::N3::Log.outputString         => Log.const_get(:OutputString),
    RDF::N3::Log.parsedAsN3           => Log.const_get(:ParsedAsN3),
    RDF::N3::Log.semantics            => Log.const_get(:Semantics),
    RDF::N3::Log.supports             => NotImplemented,

    RDF::N3::Math.absoluteValue       => Math.const_get(:AbsoluteValue),
    RDF::N3::Math.acos                => Math.const_get(:ACos),
    RDF::N3::Math.asin                => Math.const_get(:ASin),
    RDF::N3::Math.atan                => Math.const_get(:ATan),
    RDF::N3::Math.acosh               => Math.const_get(:ACosH),
    RDF::N3::Math.asinh               => Math.const_get(:ASinH),
    RDF::N3::Math.atanh               => Math.const_get(:ATanH),
    RDF::N3::Math.ceiling             => Math.const_get(:Ceiling),
    RDF::N3::Math.ceiling             => Math.const_get(:Ceiling),
    RDF::N3::Math.cos                 => Math.const_get(:Cos),
    RDF::N3::Math.cosh                => Math.const_get(:CosH),
    RDF::N3::Math.difference          => Math.const_get(:Difference),
    RDF::N3::Math.equalTo             => Math.const_get(:EqualTo),
    RDF::N3::Math.exponentiation      => Math.const_get(:Exponentiation),
    RDF::N3::Math.floor               => Math.const_get(:Floor),
    RDF::N3::Math.greaterThan         => Math.const_get(:GreaterThan),
    RDF::N3::Math.lessThan            => Math.const_get(:LessThan),
    RDF::N3::Math.negation            => Math.const_get(:Negation),
    RDF::N3::Math.notEqualTo          => Math.const_get(:NotEqualTo),
    RDF::N3::Math.notGreaterThan      => Math.const_get(:NotGreaterThan),
    RDF::N3::Math.notLessThan         => Math.const_get(:NotLessThan),
    RDF::N3::Math.product             => Math.const_get(:Product),
    RDF::N3::Math.quotient            => Math.const_get(:Quotient),
    RDF::N3::Math.remainder           => Math.const_get(:Remainder),
    RDF::N3::Math.rounded             => Math.const_get(:Rounded),
    RDF::N3::Math.sin                 => Math.const_get(:Sin),
    RDF::N3::Math.sinh                => Math.const_get(:SinH),
    RDF::N3::Math.tan                 => Math.const_get(:Tan),
    RDF::N3::Math.tanh                => Math.const_get(:TanH),
    RDF::N3::Math[:sum]               => Math.const_get(:Sum),

    RDF::N3::Str.concatenation        => Str.const_get(:Concatenation),
    RDF::N3::Str.contains             => Str.const_get(:Contains),
    RDF::N3::Str.containsIgnoringCase => Str.const_get(:ContainsIgnoringCase),
    RDF::N3::Str.containsRoughly      => NotImplemented,
    RDF::N3::Str.endsWith             => Str.const_get(:EndsWith),
    RDF::N3::Str.equalIgnoringCase    => Str.const_get(:EqualIgnoringCase),
    RDF::N3::Str.format               => Str.const_get(:Format),
    RDF::N3::Str.greaterThan          => Str.const_get(:GreaterThan),
    RDF::N3::Str.lessThan             => Str.const_get(:LessThan),
    RDF::N3::Str.matches              => Str.const_get(:Matches),
    RDF::N3::Str.notEqualIgnoringCase => Str.const_get(:NotEqualIgnoringCase),
    RDF::N3::Str.notGreaterThan       => Str.const_get(:NotGreaterThan),
    RDF::N3::Str.notLessThan          => Str.const_get(:NotLessThan),
    RDF::N3::Str.notMatches           => Str.const_get(:NotMatches),
    RDF::N3::Str.replace              => Str.const_get(:Replace),
    RDF::N3::Str.scrape               => Str.const_get(:Scrape),
    RDF::N3::Str.startsWith           => Str.const_get(:StartsWith),

    RDF::N3::Time.dayOfWeek           => Time.const_get(:DayOfWeek),
    RDF::N3::Time.day                 => Time.const_get(:Day),
    RDF::N3::Time.gmTime              => Time.const_get(:GmTime),
    RDF::N3::Time.hour                => Time.const_get(:Hour),
    RDF::N3::Time.inSeconds           => Time.const_get(:InSeconds),
    RDF::N3::Time.localTime           => Time.const_get(:LocalTime),
    RDF::N3::Time.minute              => Time.const_get(:Minute),
    RDF::N3::Time.month               => Time.const_get(:Month),
    RDF::N3::Time.second              => Time.const_get(:Second),
    RDF::N3::Time.timeZone            => Time.const_get(:Timezone),
    RDF::N3::Time.year                => Time.const_get(:Year),
  }[uri]
end