Skip to content

Commit ed46606

Browse files
Updated document and woql object
1 parent 5f35607 commit ed46606

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/objectFrame.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,12 @@ PropertyFrame.prototype.get = function(){
588588
return gets;
589589
}
590590

591-
592591
PropertyFrame.prototype.clear = function(){
593592
for(var i = 0 ; i<this.values.length; i++){
594593
this.values[i].clear();
595594
}
596595
}
596+
597597
PropertyFrame.prototype.clone = function(){
598598
const cvalues = [];
599599
const cloned = new PropertyFrame(this.predicate, this.cframe, this.parent);

lib/woql.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ WOQL.and = function(...queries){ return new WOQLQuery().and(...queries); }
2323
WOQL.not = function(query){ return new WOQLQuery().not(query); }
2424
WOQL.triple = function(a, b, c){ return new WOQLQuery().triple(a, b, c); }
2525
WOQL.quad = function(a, b, c, d){ return new WOQLQuery().quad(a, b, c, d); }
26-
WOQL.eq = function(a, b){ return new WOQLQuery().eq(a, b);}
2726
WOQL.sub = function(a, b){ return new WOQLQuery().sub(a, b); }
2827
WOQL.isa = function(a, b){ return new WOQLQuery().isa(a, b); }
28+
WOQL.eq = function(a, b){ return new WOQLQuery().eq(a, b);}
2929
WOQL.trim = function(a, b){ return new WOQLQuery().trim(a, b); }
3030
WOQL.delete = function(JSON_or_IRI){ return new WOQLQuery().delete(JSON_or_IRI); }
3131
WOQL.delete_triple = function( S, P, O ){ return new WOQLQuery().delete_triple (S, P, O); }
32-
WOQL.add_triple = function( S, P, O ){ return new WOQLQuery().add_triple (S, P, O); }
3332
WOQL.delete_quad = function( S, P, O, G ){ return new WOQLQuery().delete_quad (S, P, O, G); }
33+
WOQL.add_triple = function( S, P, O ){ return new WOQLQuery().add_triple (S, P, O); }
3434
WOQL.add_quad = function( S, P, O, G ){ return new WOQLQuery().add_quad (S, P, O, G);}
3535
WOQL.eval = function(arith, v){ return new WOQLQuery().eval(arith, v);}
3636
WOQL.plus = function(...args){ return new WOQLQuery().plus(...args);}
@@ -49,11 +49,10 @@ WOQL.list = function(vars){ return new WOQLQuery().list(vars); }
4949
//WOQL.value = function(vars){ return new WOQLQuery().list(vars); }
5050
//These ones are special ones for dealing with the schema only...
5151
WOQL.addClass = function(classid, graph){ return new WOQLQuery().addClass(classid, graph); }
52-
WOQL.addProperty = function(propid, graph){ return new WOQLQuery().addProperty(propid, graph); }
52+
WOQL.addProperty = function(propid, type, graph){ return new WOQLQuery().addProperty(propid, type, graph); }
5353
WOQL.node = function(nodeid, type){ return new WOQLQuery().node(nodeid, type); }
5454

5555

56-
5756
/*
5857
* Beneath here are pseudo predicates - they belong to the javascript object
5958
* but not to the WOQL language
@@ -62,8 +61,6 @@ WOQL.node = function(nodeid, type){ return new WOQLQuery().node(nodeid, type); }
6261
WOQL.query = function(){ return new WOQLQuery(); }
6362
//loads query from json
6463
WOQL.json = function(json){ return new WOQLQuery().json(json); }
65-
//returns a special schema object for terse schema updates
66-
WOQL.schema = function(){ return new WOQLSchema(); }
6764

6865
WOQL.rule = function(){ return new Pattern.FrameRule(); }
6966
//Simple utility function for typechecking
@@ -1036,6 +1033,11 @@ TripleBuilder.prototype.max = function(m){
10361033
return this.card(m, "max");
10371034
}
10381035

1036+
TripleBuilder.prototype.cardinality = function(m){
1037+
return this.card(m, "cardinality");
1038+
}
1039+
1040+
10391041
TripleBuilder.prototype.min = function(m){
10401042
return this.card(m, "min");
10411043
}

0 commit comments

Comments
 (0)