Skip to content

Commit

Permalink
typo in headers and some wrong data
Browse files Browse the repository at this point in the history
  • Loading branch information
langens-jonathan committed Sep 5, 2016
1 parent ed1050b commit 2e0510c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,22 @@ insert
<http://mu.semte.ch/vocabularies/core/uuid> "JONATHAN";
<http://mu.semte.ch/vocabularies/account/status> <http://mu.semte.ch/vocabularies/account/status/active>;
graphs:hasAccessToGraph <http://mu.semte.ch/graphs/graph1>, <http://mu.semte.ch/graphs/personalGraph1>;
graphs:hasNodes <http://mu.semte.ch/nodes/1>, <http://mu.semte.ch/nodes/2>.
<http://mu.semte.ch/nodes/1> graphs:forGraph <http://mu.semte.ch/graphs/graph1>.
graphs:hasNode <http://mu.semte.ch/nodes/1>, <http://mu.semte.ch/nodes/2>.
<http://mu.semte.ch/nodes/1> graphs:forGraph <http://mu.semte.ch/graphs/graph1>; <http://mu.semte.ch/vocabularies/graphs/hasParent> <http://mu.semte.ch/nodes/2>.
<http://mu.semte.ch/nodes/2> graphs:forGraph <http://mu.semte.ch/graphs/personalGraph1>.
<http://mu.semte.ch/sessions/0c2e05a5-0b52-419c-a99a-394c30979706> <http://mu.semte.ch/vocabularies/session/account> <http://mu.semte.ch/users/jonathan>;
<http://mu.semte.ch/vocabularies/core/uuid> "SESSIONJONATHAN".
<http://mu.semte.ch/graphs/graph1> 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.
<http://mu.semte.ch/graphs/personalGraph1> 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.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public ResponseEntity<String> preProcessQuery(HttpServletRequest request, HttpSe
Enumeration<String> 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"));
}
Expand Down Expand Up @@ -371,12 +371,12 @@ private String getGraphName(String userUUID)
private String getUserUUIDFromSession(String sessionID)
{
String getuseruuid = "\n" +
"select ?user-uuid\n" +
"from <http://mu.semte.ch/application>\n" +
"select ?useruuid\n" +
"from <http://mu.semte.ch/graphs>\n" +
"where\n" +
"{\n" +
"<" + sessionID + "> <http://mu.semte.ch/vocabularies/session/account> ?user-uri .\n" +
"?user-uri <http://mu.semte.ch/vocabularies/core/uuid> ?user-uuid .\n" +
"<" + sessionID + "> <http://mu.semte.ch/vocabularies/session/account> ?useruri .\n" +
"?useruri <http://mu.semte.ch/vocabularies/core/uuid> ?useruuid .\n" +
"}";

System.out.println(getuseruuid);
Expand All @@ -393,7 +393,7 @@ private String getUserUUIDFromSession(String sessionID)
for (Object tripleMap : l) {
Map<String, Object> cTripleMap = (Map<String, Object>) tripleMap;

Map<String, Object> sMap = (Map<String, Object>) cTripleMap.get("user-uuid");
Map<String, Object> sMap = (Map<String, Object>) cTripleMap.get("useruuid");
return (String) sMap.get("value");
}
}catch (Exception e)
Expand Down
Binary file modified target/SCOPES-ENDPOINT-1.0-SNAPSHOT.war
Binary file not shown.

0 comments on commit 2e0510c

Please sign in to comment.