@@ -73,20 +73,25 @@ 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 ?s WHERE {\n " + //
77- " ?s rdf:type wot:Thing . \n " +
78- "}" ;
76+ "select distinct ?thing ?clazz ?value where {\n " +
77+ " ?thing rdf:type wot:Thing .\n " +
78+ " ?thing core:represents ?object .\n " +
79+ " ?object rdf:type ?clazz .\n " +
80+ " ?thing wot:providesInteractionPattern ?pattern .\n " +
81+ " ?pattern core:hasValue ?valueResource .\n " +
82+ //" optional { ?valueResource core:literalValue ?value .} \n" +
83+ "} LIMIT 5" ;
7984
8085
8186 long startTime = System .currentTimeMillis ();
8287 // Retrieve from the Gateway API Services using a secured channel (datails)
8388 Map <String , String > headers = new HashMap <String , String >();
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 ();
89+ //headers.put("Content-Type", "application/ld+json"); .headers(headers) /vicinity- advanced-discovery
90+ String jsonTED = Unirest .post ("http://localhost:8081/advanced- discovery?neighbors=dXBtLXd-lYXRoZX-Itc2VydmljZQ " ).headers (headers ).body (query ).asString ().getBody ();
8691 System .out .println (">" +jsonTED );
8792 Set <String > neighbours = new HashSet <String >();
8893 // production CERTH
89- neighbours .add ("c8269833-578d-42c0-814c-1b24d644b350" );
94+ /* neighbours.add("c8269833-578d-42c0-814c-1b24d644b350");
9095 neighbours.add("6967e210-e1e8-4a1d-9fd8-4a40cd8df41b");
9196 neighbours.add("3d3bcd90-27cc-4f07-91d6-f76d36c789c1");
9297 // Dev
@@ -119,7 +124,7 @@ public static void main(String[] args) throws UnirestException {
119124 neighbours.add("34730b62-097a-4bde-a298-e0bcbcab2bd1");
120125 neighbours.add("6f7b08b2-fd41-4037-870a-a530cf14b9ae");
121126 neighbours.add("4f75dd67-9bc1-41db-be2c-7e1829dd4d48");
122- neighbours .add ("636c2fde-50d4-4fb2-9fa0-d758591d19b0" );
127+ neighbours.add("636c2fde-50d4-4fb2-9fa0-d758591d19b0");*/
123128 // Our vas
124129 neighbours .add ("dXBtLXd-lYXRoZX-Itc2VydmljZQ" );
125130 // -- Init the client
0 commit comments