Skip to content

Commit 98a1f31

Browse files
fixed property predicate bug
1 parent 7b72071 commit 98a1f31

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/woql.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,6 @@ TripleBuilder.prototype.sub = function(s){
992992
return this.addEntry(unit);
993993
}
994994

995-
996995
TripleBuilder.prototype.label = function(l, lang){
997996
lang = (lang ? lang : "en");
998997
var x = this.addPO('rdfs:label', {"@value": l, "@language": lang});
@@ -1004,6 +1003,11 @@ TripleBuilder.prototype.comment = function(c, lang){
10041003
return this.addPO('rdfs:comment', {"@value": c, "@language": lang});
10051004
}
10061005

1006+
TripleBuilder.prototype.property = function(p,val){
1007+
p = this.cleanPredicate(p);
1008+
return this.addPO(p, val);
1009+
}
1010+
10071011
TripleBuilder.prototype.parent = function(...p){
10081012
for(var i = 0 ; i<p.length; i++){
10091013
pn = this.query.cleanClass(p[i]);

0 commit comments

Comments
 (0)