diff --git a/src/main/java/ca/utoronto/utm/mcs/Neo4jDAO.java b/src/main/java/ca/utoronto/utm/mcs/Neo4jDAO.java index 27ec9b4..65812da 100644 --- a/src/main/java/ca/utoronto/utm/mcs/Neo4jDAO.java +++ b/src/main/java/ca/utoronto/utm/mcs/Neo4jDAO.java @@ -29,7 +29,6 @@ public int addActor(String Name, String id) { query = String.format(query, id); Result result = this.session.run(query); if(result.hasNext()){ - System.out.println("Actor Found: " + id); return 400; } query = "CREATE (a:actor {Name: \"%s\", id: \"%s\"})"; @@ -44,7 +43,6 @@ public int addMovie(String Name, String id) { query = String.format(query, id); Result result = this.session.run(query); if(result.hasNext()){ - System.out.println("Movie Found: " + id); return 400; } query = "CREATE (m:movie {Name: \"%s\", id: \"%s\"})"; @@ -59,7 +57,6 @@ public int addRelationship(String actorId, String movieId) { query = String.format(query, actorId); Result result = this.session.run(query); if(!result.hasNext()){ - System.out.println("Actor not found: " + actorId); return 404; } @@ -67,7 +64,6 @@ public int addRelationship(String actorId, String movieId) { query = String.format(query, movieId); result = this.session.run(query); if(!result.hasNext()){ - System.out.println("Movie not found: " + movieId); return 404; } @@ -75,7 +71,6 @@ public int addRelationship(String actorId, String movieId) { query = String.format(query, actorId, movieId); result = this.session.run(query); if(result.hasNext()){ - System.out.println("Relationship Found: " + actorId +"->"+ movieId); return 400; } @@ -93,7 +88,6 @@ public String getActor(String id) throws JSONException { Result result = this.session.run(query); if(!result.hasNext()){ - System.out.println("No actor with this ID"); return "404"; } List resultValues = result.list(); @@ -118,9 +112,7 @@ public String getMovie(String movieId) throws JSONException { query = String.format(query, movieId); Result result = this.session.run(query); - System.out.println(result.hasNext()); if(!result.hasNext()){ - System.out.println("No movie with this ID"); return "404"; } List resultValues = result.list(); @@ -144,7 +136,6 @@ public String hasRelationship(String actorId, String movieId) throws JSONExcepti query = String.format(query, movieId); Result result = this.session.run(query); if(!result.hasNext()){ - System.out.println("No movie with this ID"); return "404"; } @@ -152,7 +143,6 @@ public String hasRelationship(String actorId, String movieId) throws JSONExcepti query = String.format(query, actorId); result = this.session.run(query); if(!result.hasNext()){ - System.out.println("No actor with this ID"); return "404"; } @@ -184,7 +174,6 @@ public String computeBaconNumber(String actorId) throws JSONException{ Result result = this.session.run(query); if(!result.hasNext()){ - System.out.println("No path"); return "404"; } Record record = result.next(); @@ -211,9 +200,7 @@ public String computeBaconPath(String actorId) throws JSONException { query = String.format(query, actorId, kevinBid); Result result = this.session.run(query); - System.out.println(result); if(!result.hasNext()){ - System.out.println("No path"); return "404"; } Record record = result.next(); diff --git a/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java b/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java index f592896..84141ee 100644 --- a/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java +++ b/src/main/java/ca/utoronto/utm/mcs/ReqHandler.java @@ -27,7 +27,6 @@ public void handle(HttpExchange exchange) throws IOException { URI requestURI = exchange.getRequestURI(); String request = requestURI.toString().split("/")[3]; - System.out.println(request); try { switch (exchange.getRequestMethod()) { case "GET":