Skip to content

Commit b944244

Browse files
adding more fixes to woql
1 parent aa98e98 commit b944244

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/woql.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,13 @@ TripleBuilder.prototype.isa = function(s){
986986
return this.addEntry(unit);
987987
}
988988

989+
TripleBuilder.prototype.domain = function(d){
990+
d = this.query.cleanClass(d);
991+
var x = this.addPO('rdfs:domain',d);
992+
return x;
993+
}
994+
995+
989996
TripleBuilder.prototype.sub = function(s){
990997
s = this.query.cleanClass(s);
991998
var unit = new WOQLQuery.sub(this.subject, s);
@@ -1010,7 +1017,7 @@ TripleBuilder.prototype.property = function(p,val){
10101017

10111018
TripleBuilder.prototype.parent = function(...p){
10121019
for(var i = 0 ; i<p.length; i++){
1013-
pn = this.query.cleanClass(p[i]);
1020+
var pn = this.query.cleanClass(p[i]);
10141021
this.addPO('rdfs:subClassOf', pn);
10151022
}
10161023
return this;

0 commit comments

Comments
 (0)