Skip to content

Commit 74df5e8

Browse files
author
cimmino
committed
bug fixing
1 parent a836404 commit 74df5e8

File tree

20 files changed

+34
-9
lines changed

20 files changed

+34
-9
lines changed

src/main/java/client/VicinityAgoraClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class VicinityAgoraClient implements VicinityClient {
4242
*/
4343
public VicinityAgoraClient(String jsonTed, Set<String> neighbours, String query){
4444
Model ted = JenaUtils.parseRDF(jsonTed, VicinityOntology.JSONLD);
45-
filteredStaticRDF = ted;//filterTedByNeighbours(ted, neighbours);
45+
filteredStaticRDF = filterTedByNeighbours(ted, neighbours);
4646
queryString = query;
4747
this.virtualizer = new RDFVirtualizer();
4848
}

src/main/java/client/tmp/VicinityClientImpl.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,16 @@ public static void main(String[] args) throws UnirestException {
7373
"prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n" +
7474
"prefix map: <http://iot.linkeddata.es/def/wot-mappings#> \n" +
7575
"\n" +
76-
"SELECT DISTINCT ?p ?o WHERE {\n" + //
76+
"SELECT DISTINCT ?s WHERE {\n" + //
7777
" ?s rdf:type wot:Thing . \n" +
78-
" ?s ?p ?o . \n" +
7978
"}";
8079

8180

8281
long startTime = System.currentTimeMillis();
8382
// Retrieve from the Gateway API Services using a secured channel (datails)
8483
Map<String, String> headers = new HashMap<String, String>();
85-
//headers.put("Content-Type", "application/ld+json"); .headers(headers)
86-
String jsonTED = Unirest.post("http://vicinity-gateway-services.vicinity.linkeddata.es/discovery").headers(headers).body(query).asString().getBody().toString();
84+
//headers.put("Content-Type", "application/ld+json"); .headers(headers) /vicinity-
85+
String jsonTED = Unirest.post("http://gateway-services.vicinity.linkeddata.es/discovery").headers(headers).body(query).asString().getBody();
8786
System.out.println(">"+jsonTED);
8887
Set<String> neighbours = new HashSet<String>();
8988
// production CERTH
@@ -145,8 +144,5 @@ public static void main(String[] args) throws UnirestException {
145144
System.out.println("->"+elapsedTime/60000);
146145
}
147146

148-
public static String get(String iri) {
149-
System.out.println(iri);
150-
return "{}";
151-
}
147+
152148
}
13 KB
Binary file not shown.
582 Bytes
Binary file not shown.
4.14 KB
Binary file not shown.
5.73 KB
Binary file not shown.
1.97 KB
Binary file not shown.
7.05 KB
Binary file not shown.
11.5 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Generated by Maven
2+
#Wed Oct 31 10:58:28 CET 2018
3+
version=0.6.3
4+
groupId=vicinity.oeg.vicinity-open-gateway-api-distributed-query-client
5+
artifactId=vicinity-open-gateway-api-distributed-query-client

0 commit comments

Comments
 (0)