Skip to content

Commit 1f1c936

Browse files
fixed bugs with add Property
1 parent 09b429d commit 1f1c936

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/woql.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ WOQLQuery.prototype.loadDefaultVocabulary = function(){
9494
vocab.type = "rdf:type";
9595
vocab.label = "rdfs:label";
9696
vocab.Class = "owl:Class";
97+
vocab.DatatypeProperty = "owl:DatatypeProperty";
98+
vocab.ObjectProperty = "owl:ObjectProperty";
99+
vocab.Entity = "tcs:Entity";
100+
vocab.Document = "tcs:Document";
101+
vocab.Relationship = "tcs:Relationship";
102+
vocab.temporality = "tcs:temporality";
103+
vocab.geotemporality = "tcs:geotemporality";
104+
vocab.geography = "tcs:geography";
105+
vocab.abstract = "tcs:abstract";
97106
vocab.comment = "rdfs:comment";
98107
vocab.range = "rdfs:range";
99108
vocab.domain = "rdfs:domain";
@@ -658,7 +667,8 @@ WOQLQuery.prototype.addClass = function(c, graph){
658667
}
659668

660669
WOQLQuery.prototype.addProperty = function(p, t, g){
661-
if(p && t){
670+
t = (t ? t : "xsd:string");
671+
if(p){
662672
graph = (g ? this.cleanGraph(g) : "db:schema");
663673
p = (p.indexOf(":") == -1) ? "scm:" + p : p;
664674
t = (t.indexOf(":") == -1) ? this.cleanType(t) : t ;

0 commit comments

Comments
 (0)