Skip to content

Commit 96784a6

Browse files
Merge branch 'dev' of https://github.com/terminusdb/terminus-client into dev
2 parents 77a3460 + f85f9fb commit 96784a6

12 files changed

+472
-11
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
WOQLClient:require('./lib/woqlClient'),
2+
WOQLClient:require('./lib/woqlClient'),
33
ConnectionCapabilities:require('./lib/connectionCapabilities'),
44
ConnectionConfig:require('./lib/connectionConfig'),
55
IDParser:require('./lib/terminusIDParser'),

lib/viewer/chartConfig.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,15 @@ WOQLChartRule.prototype.style=function(key,value){
114114
return this.rule[key];
115115
}
116116

117+
WOQLChartRule.prototype.label = function(label){
118+
if(label){
119+
this.rule.label = label;
120+
return this;
121+
}
122+
return this.rule.label;
123+
}
124+
125+
117126
WOQLChartRule.prototype.fill=function(color){
118127
if(color){
119128
this.rule.fill = color;
@@ -156,12 +165,17 @@ WOQLChartRule.prototype.labelRotate=function(angle){
156165
return this.rule.labelRotate;
157166
}
158167

159-
WOQLChartRule.prototype.axisType=function(type){
168+
/*
169+
* The type of xAxis or yAxis 'number' | 'category' default is 'category'.
170+
* The type of line chart 'basis'|'basisClosed'|'basisOpen'|'linear'|'linearClosed'|'natural'|'monotoneX'|'monotoneY'|'monotone' | 'step' | 'stepBefore' | 'stepAfter' |
171+
*/
172+
173+
WOQLChartRule.prototype.type=function(type){
160174
if(type){
161-
this.pattern.scope=type
175+
this.rule.type=type
162176
return this;
163177
}
164-
return this.pattern.scope
178+
return this.rule.type
165179
}
166180
/*
167181
* works only if type is number
@@ -175,4 +189,13 @@ WOQLChartRule.prototype.axisDomain=function(domainArr){
175189
return this.rule.domain
176190
}
177191

192+
193+
WOQLChartRule.prototype.barSize=function(barSize){
194+
if(barSize){
195+
this.rule.barSize=barSize
196+
return this;
197+
}
198+
return this.rule.barSize
199+
}
200+
178201
module.exports = WOQLChartConfig;

lib/woqlResult.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ WOQLResult.prototype.last = function(){
8989
}
9090

9191
WOQLResult.prototype.next = function () {
92-
const res = this.bindings[this.cursor];
9392
this.cursor++;
93+
const res = this.bindings[this.cursor];
9494
return res;
9595
};
9696

@@ -114,7 +114,7 @@ WOQLResult.prototype.sort = function(key, asc_or_desc){
114114
/**
115115
* Compares results a, b according to "asc" or "desc" order
116116
*/
117-
WOQLResult.prototype.compareValues = function(a, b, asc_or_desc){
117+
WOQLResult.prototype.compareValues = function(a, b, asc_or_desc="asc"){
118118
if(!a || !b) return 0;
119119
if(typeof a['@value'] != "undefined" && typeof b['@value'] != "undefined"){
120120
a = a['@value'];

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"build": "webpack --mode production",
5353
"prepare": "npm run clean && npm run test && npm run build",
5454
"coveralls-after": "nyc report --reporter=text-lcov | coveralls",
55-
"npm:publish": "npm publish --access public"
55+
"npm:publish": "npm publish --access public",
56+
"test-single": "mocha $1"
5657
},
5758
"repository": {
5859
"type": "git",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports={
2+
"bindings": [
3+
{
4+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
5+
"http://terminusdb.com/woql/variable/Comment":"unknown",
6+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Bicycle",
7+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Bicycle"}
8+
},
9+
{
10+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
11+
"http://terminusdb.com/woql/variable/Comment":"unknown",
12+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Journey",
13+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Journey"}
14+
},
15+
{
16+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
17+
"http://terminusdb.com/woql/variable/Comment": {
18+
"@language":"en",
19+
"@value":"A station where municipal bicycles are deposited"
20+
},
21+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Station",
22+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Bike Station"}
23+
}
24+
],
25+
"graphs": {}
26+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
module.exports={
2+
"bindings": [
3+
{
4+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
5+
"http://terminusdb.com/woql/variable/Comment": {
6+
"@language":"en",
7+
"@value":"http://195.201.12.87:6365/pybike/schema ontology for http://195.201.12.87:6365/pybike"
8+
},
9+
"http://terminusdb.com/woql/variable/Domain":"unknown",
10+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike",
11+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"http://195.201.12.87:6365/pybike"},
12+
"http://terminusdb.com/woql/variable/Parent":"unknown",
13+
"http://terminusdb.com/woql/variable/Range":"unknown",
14+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#Ontology"
15+
},
16+
{
17+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
18+
"http://terminusdb.com/woql/variable/Comment":"unknown",
19+
"http://terminusdb.com/woql/variable/Domain":"unknown",
20+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Bicycle",
21+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Bicycle"},
22+
"http://terminusdb.com/woql/variable/Parent":"http://terminusdb.com/schema/tcs#Entity",
23+
"http://terminusdb.com/woql/variable/Range":"unknown",
24+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#Class"
25+
},
26+
{
27+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
28+
"http://terminusdb.com/woql/variable/Comment":"unknown",
29+
"http://terminusdb.com/woql/variable/Domain":"unknown",
30+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Journey",
31+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Journey"},
32+
"http://terminusdb.com/woql/variable/Parent":"http://terminusdb.com/schema/tcs#Entity",
33+
"http://terminusdb.com/woql/variable/Range":"unknown",
34+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#Class"
35+
},
36+
{
37+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
38+
"http://terminusdb.com/woql/variable/Comment": {
39+
"@language":"en",
40+
"@value":"A station where municipal bicycles are deposited"
41+
},
42+
"http://terminusdb.com/woql/variable/Domain":"unknown",
43+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#Station",
44+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Bike Station"},
45+
"http://terminusdb.com/woql/variable/Parent":"http://terminusdb.com/schema/tcs#Entity",
46+
"http://terminusdb.com/woql/variable/Range":"unknown",
47+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#Class"
48+
},
49+
{
50+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
51+
"http://terminusdb.com/woql/variable/Comment":"unknown",
52+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
53+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#duration",
54+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Journey Duration"},
55+
"http://terminusdb.com/woql/variable/Parent":"unknown",
56+
"http://terminusdb.com/woql/variable/Range":"http://www.w3.org/2001/XMLSchema#integer",
57+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#DatatypeProperty"
58+
},
59+
{
60+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
61+
"http://terminusdb.com/woql/variable/Comment":"unknown",
62+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
63+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#end_station",
64+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"End Station"},
65+
"http://terminusdb.com/woql/variable/Parent":"unknown",
66+
"http://terminusdb.com/woql/variable/Range":"http://195.201.12.87:6365/pybike/schema#Station",
67+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#ObjectProperty"
68+
},
69+
{
70+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
71+
"http://terminusdb.com/woql/variable/Comment":"unknown",
72+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
73+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#end_time",
74+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Time Ended"},
75+
"http://terminusdb.com/woql/variable/Parent":"unknown",
76+
"http://terminusdb.com/woql/variable/Range":"http://www.w3.org/2001/XMLSchema#dateTime",
77+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#DatatypeProperty"
78+
},
79+
{
80+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
81+
"http://terminusdb.com/woql/variable/Comment":"unknown",
82+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
83+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#journey_bicycle",
84+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Bicycle Used"},
85+
"http://terminusdb.com/woql/variable/Parent":"unknown",
86+
"http://terminusdb.com/woql/variable/Range":"http://195.201.12.87:6365/pybike/schema#Bicycle",
87+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#ObjectProperty"
88+
},
89+
{
90+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
91+
"http://terminusdb.com/woql/variable/Comment":"unknown",
92+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
93+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#start_station",
94+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Start Station"},
95+
"http://terminusdb.com/woql/variable/Parent":"unknown",
96+
"http://terminusdb.com/woql/variable/Range":"http://195.201.12.87:6365/pybike/schema#Station",
97+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#ObjectProperty"
98+
},
99+
{
100+
"http://terminusdb.com/woql/variable/Abstract":"unknown",
101+
"http://terminusdb.com/woql/variable/Comment":"unknown",
102+
"http://terminusdb.com/woql/variable/Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
103+
"http://terminusdb.com/woql/variable/Element":"http://195.201.12.87:6365/pybike/schema#start_time",
104+
"http://terminusdb.com/woql/variable/Label": {"@language":"en", "@value":"Time Started"},
105+
"http://terminusdb.com/woql/variable/Parent":"unknown",
106+
"http://terminusdb.com/woql/variable/Range":"http://www.w3.org/2001/XMLSchema#dateTime",
107+
"http://terminusdb.com/woql/variable/Type":"http://www.w3.org/2002/07/owl#DatatypeProperty"
108+
}
109+
],
110+
"graphs": {}
111+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports=[ { "v:Abstract": "unknown",
2+
"v:Comment": "unknown",
3+
"v:Element": "http://195.201.12.87:6365/pybike/schema#Bicycle",
4+
"v:Label": { "@language": "en", "@value": "Bicycle" } },
5+
{ "v:Abstract": "unknown",
6+
"v:Comment": "unknown",
7+
"v:Element": "http://195.201.12.87:6365/pybike/schema#Journey",
8+
"v:Label": { "@language": "en", "@value": "Journey" } },
9+
{ "v:Abstract": "unknown",
10+
"v:Comment":
11+
{ "@language": "en",
12+
"@value": "A station where municipal bicycles are deposited" },
13+
"v:Element": "http://195.201.12.87:6365/pybike/schema#Station",
14+
"v:Label": { "@language": "en", "@value": "Bike Station" } } ]
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
module.exports=[
2+
{
3+
"v:Abstract":"unknown",
4+
"v:Comment":{
5+
"@language":"en",
6+
"@value":"http://195.201.12.87:6365/pybike/schema ontology for http://195.201.12.87:6365/pybike"
7+
},
8+
"v:Domain":"unknown",
9+
"v:Element":"http://195.201.12.87:6365/pybike",
10+
"v:Label":{
11+
"@language":"en",
12+
"@value":"http://195.201.12.87:6365/pybike"
13+
},
14+
"v:Parent":"unknown",
15+
"v:Range":"unknown",
16+
"v:Type":"owl:Ontology"
17+
},
18+
{
19+
"v:Abstract":"unknown",
20+
"v:Comment":"unknown",
21+
"v:Domain":"unknown",
22+
"v:Element":"http://195.201.12.87:6365/pybike/schema#Bicycle",
23+
"v:Label":{
24+
"@language":"en",
25+
"@value":"Bicycle"
26+
},
27+
"v:Parent":"tcs:Entity",
28+
"v:Range":"unknown",
29+
"v:Type":"owl:Class"
30+
},
31+
{
32+
"v:Abstract":"unknown",
33+
"v:Comment":"unknown",
34+
"v:Domain":"unknown",
35+
"v:Element":"http://195.201.12.87:6365/pybike/schema#Journey",
36+
"v:Label":{
37+
"@language":"en",
38+
"@value":"Journey"
39+
},
40+
"v:Parent":"tcs:Entity",
41+
"v:Range":"unknown",
42+
"v:Type":"owl:Class"
43+
},
44+
{
45+
"v:Abstract":"unknown",
46+
"v:Comment":{
47+
"@language":"en",
48+
"@value":"A station where municipal bicycles are deposited"
49+
},
50+
"v:Domain":"unknown",
51+
"v:Element":"http://195.201.12.87:6365/pybike/schema#Station",
52+
"v:Label":{
53+
"@language":"en",
54+
"@value":"Bike Station"
55+
},
56+
"v:Parent":"tcs:Entity",
57+
"v:Range":"unknown",
58+
"v:Type":"owl:Class"
59+
},
60+
{
61+
"v:Abstract":"unknown",
62+
"v:Comment":"unknown",
63+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
64+
"v:Element":"http://195.201.12.87:6365/pybike/schema#duration",
65+
"v:Label":{
66+
"@language":"en",
67+
"@value":"Journey Duration"
68+
},
69+
"v:Parent":"unknown",
70+
"v:Range":"xsd:integer",
71+
"v:Type":"owl:DatatypeProperty"
72+
},
73+
{
74+
"v:Abstract":"unknown",
75+
"v:Comment":"unknown",
76+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
77+
"v:Element":"http://195.201.12.87:6365/pybike/schema#end_station",
78+
"v:Label":{
79+
"@language":"en",
80+
"@value":"End Station"
81+
},
82+
"v:Parent":"unknown",
83+
"v:Range":"http://195.201.12.87:6365/pybike/schema#Station",
84+
"v:Type":"owl:ObjectProperty"
85+
},
86+
{
87+
"v:Abstract":"unknown",
88+
"v:Comment":"unknown",
89+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
90+
"v:Element":"http://195.201.12.87:6365/pybike/schema#end_time",
91+
"v:Label":{
92+
"@language":"en",
93+
"@value":"Time Ended"
94+
},
95+
"v:Parent":"unknown",
96+
"v:Range":"xsd:dateTime",
97+
"v:Type":"owl:DatatypeProperty"
98+
},
99+
{
100+
"v:Abstract":"unknown",
101+
"v:Comment":"unknown",
102+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
103+
"v:Element":"http://195.201.12.87:6365/pybike/schema#journey_bicycle",
104+
"v:Label":{
105+
"@language":"en",
106+
"@value":"Bicycle Used"
107+
},
108+
"v:Parent":"unknown",
109+
"v:Range":"http://195.201.12.87:6365/pybike/schema#Bicycle",
110+
"v:Type":"owl:ObjectProperty"
111+
},
112+
{
113+
"v:Abstract":"unknown",
114+
"v:Comment":"unknown",
115+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
116+
"v:Element":"http://195.201.12.87:6365/pybike/schema#start_station",
117+
"v:Label":{
118+
"@language":"en",
119+
"@value":"Start Station"
120+
},
121+
"v:Parent":"unknown",
122+
"v:Range":"http://195.201.12.87:6365/pybike/schema#Station",
123+
"v:Type":"owl:ObjectProperty"
124+
},
125+
{
126+
"v:Abstract":"unknown",
127+
"v:Comment":"unknown",
128+
"v:Domain":"http://195.201.12.87:6365/pybike/schema#Journey",
129+
"v:Element":"http://195.201.12.87:6365/pybike/schema#start_time",
130+
"v:Label":{
131+
"@language":"en",
132+
"@value":"Time Started"
133+
},
134+
"v:Parent":"unknown",
135+
"v:Range":"xsd:dateTime",
136+
"v:Type":"owl:DatatypeProperty"
137+
}
138+
]

0 commit comments

Comments
 (0)