Skip to content

Commit 1a5ef96

Browse files
Remove "cleanClass"
1 parent 04fba2a commit 1a5ef96

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

lib/query/woqlBuilder.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ WOQLQuery.prototype.node = function(node, type) {
158158
}
159159

160160
WOQLQuery.prototype.insert = function(id, type, refGraph) {
161-
type = this.cleanType(type, true)
162161
refGraph = refGraph || (this.triple_builder_context ? this.triple_builder_context.graph : false)
163162
if (refGraph) {
164163
return this.add_quad(id, 'rdf:type', '@schema:'+type, refGraph)
@@ -168,7 +167,6 @@ WOQLQuery.prototype.insert = function(id, type, refGraph) {
168167

169168
WOQLQuery.prototype.insert_data = function(data, refGraph) {
170169
if (data.type && data.id) {
171-
type = this.cleanType(data.type, true)
172170
this.insert(data.id, type, refGraph)
173171
if (data.label) {
174172
this.label(data.label)
@@ -224,7 +222,6 @@ WOQLQuery.prototype.graph = function(g) {
224222
}
225223

226224
WOQLQuery.prototype.domain = function(d) {
227-
d = this.cleanClass(d)
228225
return this._add_partial(false, 'rdfs:domain', d)
229226
}
230227
/**
@@ -258,7 +255,7 @@ WOQLQuery.prototype.description = function(c, lang) {
258255
*/
259256
WOQLQuery.prototype.parent = function(...parentList) {
260257
for (var i = 0; i < parentList.length; i++) {
261-
var pn = this.cleanClass(parentList[i])
258+
var pn = parentList[i]
262259
this._add_partial(false, 'rdfs:subClassOf', pn)
263260
}
264261
return this

lib/query/woqlCore.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -420,20 +420,6 @@ WOQLQuery.prototype.expandArithmeticVariable = function(varname, always) {
420420
return this.expandVariable(varname, 'ArithmeticValue', always)
421421
}
422422

423-
424-
WOQLQuery.prototype.cleanClass = function(c, stringonly) {
425-
if (typeof c !== 'string') return ''
426-
if (c.indexOf(':') === -1) {
427-
if (this.vocab && this.vocab[c]) c = this.vocab[c]
428-
else c = c //'scm:' + c
429-
}
430-
return stringonly ? c : this.expandValueVariable(c)
431-
}
432-
433-
WOQLQuery.prototype.cleanType = function(t, stringonly) {
434-
return this.cleanClass(t, stringonly)
435-
}
436-
437423
WOQLQuery.prototype.defaultContext = function(DB_IRI) {
438424
let def = {}
439425
for (var pref in UTILS.standard_urls) {

0 commit comments

Comments
 (0)