diff --git a/README.md b/README.md index 6b97ade..b784f67 100644 --- a/README.md +++ b/README.md @@ -46,20 +46,22 @@ insert "JONATHAN"; ; graphs:hasAccessToGraph , ; - graphs:hasNodes , . - graphs:forGraph . + graphs:hasNode , . + graphs:forGraph ; . graphs:forGraph . ; "SESSIONJONATHAN". mu:uuid "GRAPH1"; -foaf:name "http://mu.semte.ch/application"; +graphs:graphName "http://mu.semte.ch/application"; graphs:graphType "hive"; +graphs:graphQuery ""; a graphs:Graph. mu:uuid "PERSONALGRAPH1"; -foaf:name "http://langens.jonathan/Personal-Graph-1"; +graphs:graphName "http://langens.jonathan/Personal-Graph-1"; graphs:graphType "personal"; +graphs:graphQuery ""; a graphs:Graph. } diff --git a/src/main/java/scopes_service/query_pre_processor/web/RootController.java b/src/main/java/scopes_service/query_pre_processor/web/RootController.java index 0d92b2d..b235f41 100644 --- a/src/main/java/scopes_service/query_pre_processor/web/RootController.java +++ b/src/main/java/scopes_service/query_pre_processor/web/RootController.java @@ -297,7 +297,7 @@ public ResponseEntity preProcessQuery(HttpServletRequest request, HttpSe Enumeration hn = request.getHeaderNames(); while(hn.hasMoreElements()) { - if(hn.nextElement().equals("MU-SESSION-ID")) + if(hn.nextElement().toUpperCase().equals("MU-SESSION-ID")) { userUUID = this.getUserUUIDFromSession(request.getHeader("MU-SESSION-ID")); } @@ -371,12 +371,12 @@ private String getGraphName(String userUUID) private String getUserUUIDFromSession(String sessionID) { String getuseruuid = "\n" + - "select ?user-uuid\n" + - "from \n" + + "select ?useruuid\n" + + "from \n" + "where\n" + "{\n" + - "<" + sessionID + "> ?user-uri .\n" + - "?user-uri ?user-uuid .\n" + + "<" + sessionID + "> ?useruri .\n" + + "?useruri ?useruuid .\n" + "}"; System.out.println(getuseruuid); @@ -393,7 +393,7 @@ private String getUserUUIDFromSession(String sessionID) for (Object tripleMap : l) { Map cTripleMap = (Map) tripleMap; - Map sMap = (Map) cTripleMap.get("user-uuid"); + Map sMap = (Map) cTripleMap.get("useruuid"); return (String) sMap.get("value"); } }catch (Exception e) diff --git a/target/SCOPES-ENDPOINT-1.0-SNAPSHOT.war b/target/SCOPES-ENDPOINT-1.0-SNAPSHOT.war index c264d73..9b1dfcc 100644 Binary files a/target/SCOPES-ENDPOINT-1.0-SNAPSHOT.war and b/target/SCOPES-ENDPOINT-1.0-SNAPSHOT.war differ