Skip to content

Commit 01ec0c5

Browse files
committed
Merge branch 'dev' of https://github.com/terminusdb/terminus-client into dev
2 parents 1ddc5d7 + 1aadc69 commit 01ec0c5

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

lib/query/woqlCore.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,26 @@ WOQLQuery.prototype.cleanPredicate = function(p) {
257257
return '' + p
258258
}
259259
if (p.indexOf(':') != -1) pred = p
260-
else if (this.vocab && this.vocab[p]) pred = this.vocab[p]
260+
else if (this.wellKnownPredicate(p) ) pred = this.vocab[p]
261261
else pred = 'scm:' + p
262262
return this.expandVariable(pred)
263263
}
264264

265+
WOQLQuery.prototype.wellKnownPredicate = function(p) {
266+
if (this.vocab && this.vocab[p]){
267+
let full = this.vocab[p]
268+
let start = full.substring(0, 3)
269+
if(full == "system:abstract" || start == "xdd" || start == "xsd") return false
270+
return true
271+
}
272+
return false
273+
}
274+
275+
265276
WOQLQuery.prototype.cleanPathPredicate = function(p) {
266277
let pred = false
267278
if (p.indexOf(':') != -1) pred = p
268-
else if (this.vocab && this.vocab[p]) pred = this.vocab[p]
279+
else if (this.wellKnownPredicate(p) ) pred = this.vocab[p]
269280
else pred = 'scm:' + p
270281
return pred
271282
}

0 commit comments

Comments
 (0)