changeset 30:80b5628f17d8

modified ClaimModel/getInfo action
author one
date Wed, 03 Oct 2012 14:27:44 +0900
parents fbb232e78422
children 995be14b30a2
files app/controllers/Claim.java app/models/ClaimModel.java app/models/TPGraph.java conf/routes target/scala-2.9.1/cache/compile/copy-resources target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$1.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$3.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$5.class target/scala-2.9.1/classes/Routes$$anonfun$routes$1.class target/scala-2.9.1/classes/Routes$.class target/scala-2.9.1/classes/Routes.class target/scala-2.9.1/classes/controllers/ReverseApplication.class target/scala-2.9.1/classes/controllers/ReverseAssets.class target/scala-2.9.1/classes/controllers/javascript/ReverseApplication.class target/scala-2.9.1/classes/controllers/javascript/ReverseAssets.class target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$hello$1.class target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$index$1.class target/scala-2.9.1/classes/controllers/ref/ReverseApplication.class target/scala-2.9.1/classes/controllers/ref/ReverseAssets$$anonfun$at$1.class target/scala-2.9.1/classes/controllers/ref/ReverseAssets.class target/scala-2.9.1/classes/routes target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5.class target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1.class target/scala-2.9.1/classes_managed/Routes$.class target/scala-2.9.1/classes_managed/Routes.class target/scala-2.9.1/classes_managed/controllers/ReverseApplication.class target/scala-2.9.1/classes_managed/controllers/ReverseAssets.class target/scala-2.9.1/classes_managed/controllers/javascript/ReverseApplication.class target/scala-2.9.1/classes_managed/controllers/javascript/ReverseAssets.class target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$hello$1.class target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$index$1.class target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication.class target/scala-2.9.1/classes_managed/controllers/ref/ReverseAssets$$anonfun$at$1.class target/scala-2.9.1/classes_managed/controllers/ref/ReverseAssets.class target/scala-2.9.1/src_managed/main/controllers/routes.java target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala target/scala-2.9.1/src_managed/main/routes_routing.scala test/RequestTest.java
diffstat 46 files changed, 209 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- a/app/controllers/Claim.java	Wed Oct 03 13:28:00 2012 +0900
+++ b/app/controllers/Claim.java	Wed Oct 03 14:27:44 2012 +0900
@@ -40,7 +40,7 @@
 		newClaim.setClaimProperties(toulmin, type);
 
 		String[] users = toStringArray(usersJson);
-		tpGraph.setLabelToUsers(newClaim, users, NodeModel.L_REQUEST);
+		tpGraph.setLabelStatusToUsers(newClaim, users, NodeModel.L_REQUEST, NodeModel.FAIL);
 		tpGraph.setLabelToRootClaim(newClaim);
 		
 		return created();
@@ -75,7 +75,7 @@
 		newClaim.setClaimProperties(toulmin, type);
 
 		String[] users = toStringArray(usersJson);
-		tpGraph.setLabelToUsers(newClaim, users, NodeModel.L_REQUEST);
+		tpGraph.setLabelStatusToUsers(newClaim, users, NodeModel.L_REQUEST, NodeModel.FAIL);
 		tpGraph.setLabelToRootClaim(newClaim);
 
 		ClaimModel mentionV = new ClaimModel(graph.getVertex(id));
@@ -104,13 +104,15 @@
 		Vertex v = graph.getVertex(id);
 		if (v == null) return badRequest("Consensus id "+ id +" is not found.");
 		ClaimModel consensusRoot = new ClaimModel(v);
-
+		ObjectNode consensusObj = consensusRoot.getClaimInfoFromGraph();
+		
+		JsonNode jobj = consensusObj.findValue(NodeModel.TOULMIN);
 		
 		
 		
-		
-		
-		return ok();
+		ObjectNode result = Json.newObject();
+		result.put("message",jobj.toString());
+		return ok(result);
 	}
 	
 	
--- a/app/models/ClaimModel.java	Wed Oct 03 13:28:00 2012 +0900
+++ b/app/models/ClaimModel.java	Wed Oct 03 14:27:44 2012 +0900
@@ -17,22 +17,53 @@
 		super(vertex);
 	}
 	
-		
 	public ObjectNode getClaimInfoFromGraph() {
-		
 		ObjectNode property = Json.newObject();
 		property.put(TYPE, Json.toJson(getProperty(TYPE)));
 		property.put(STATUS, Json.toJson(getProperty(STATUS)));
 		property.put(TOULMIN, Json.toJson(getProperty(TOULMIN)));
 		
-		property.put(L_AUTHOR, Json.toJson(getAuthor()));
-		property.put(MENTIONS, Json.toJson(getMentions()));
+		property.put(L_AUTHOR, Json.toJson(getAuthorId()));
+		property.put(MENTIONS, Json.toJson(getMentionsId()));
 		property.put(USERS, Json.toJson(getUsers()));
-		
 		return property;
 	}
 	
-	public Object getAuthor() {
+	public JsonNode getClaimMentions() {
+		
+		
+		
+		return null;
+	}
+	
+	private JsonNode getClaimMention() {
+		
+		return null;
+	}
+	
+	public Object[] getInfoArray(String... labels) {
+		GremlinPipeline<Vertex,Vertex> pipe = new GremlinPipeline<Vertex,Vertex>();
+		pipe.start(vertex).out(labels);
+		ArrayList<Object> array = new ArrayList<Object>();
+		for (Vertex v : pipe) array.add(v.getId());
+		if (array.size() == 0) return null;
+		return array.toArray();
+	}
+
+	public Object[] getMentionsId() {
+		return getInfoArray(L_QUESTION,L_REFUTATION,L_SUGGESTION);
+	}
+	
+	public Object[] getUsers() {
+		return getInfoArray(L_REQUEST);
+	}
+
+
+	public Object[] getRequestUsersId() {
+		return getInfoArray(NodeModel.REQUESTS);
+	}
+	
+	public Object getAuthorId() {
 		GremlinPipeline<Vertex,Vertex> pipe = new GremlinPipeline<Vertex,Vertex>();
 		pipe.start(vertex).out(L_AUTHOR);
 		if (pipe.hasNext()) return null;
@@ -40,23 +71,6 @@
 		return authorV.getId();
 	}
 	
-	public Object[] getMentions() {
-		GremlinPipeline<Vertex,Vertex> pipe = new GremlinPipeline<Vertex,Vertex>();
-		pipe.start(vertex).out(L_QUESTION,L_REFUTATION,L_SUGGESTION);
-		ArrayList<Object> array = new ArrayList<Object>();
-		for (Vertex v : pipe) array.add(v.getId());
-		if (array.size() == 0) return null;
-		return array.toArray();
-	}
-	
-	public Object[] getUsers() {
-		GremlinPipeline<Vertex,Vertex> pipe = new GremlinPipeline<Vertex,Vertex>();
-		pipe.start(vertex).out(L_REQUEST);
-		ArrayList<Object> array = new ArrayList<Object>();
-		for (Vertex v : pipe) array.add(v.getId());
-		if (array.size() == 0) return null;
-		return array.toArray();
-	}
 	
 	
 	
--- a/app/models/TPGraph.java	Wed Oct 03 13:28:00 2012 +0900
+++ b/app/models/TPGraph.java	Wed Oct 03 14:27:44 2012 +0900
@@ -109,6 +109,16 @@
 		return true;
 	}
 	
+	public Boolean setLabelStatusToUsers(ClaimModel claim, String[] users, String label, String status) {	
+		for (String userName: users) {
+			Vertex userVertex = graph.getVertex(userName);
+			if (userVertex == null) return false;
+			Edge edge = setLabel(claim.getVertex(), userVertex, label);
+			edge.setProperty(NodeModel.STATUS, status);
+		}
+		return true;
+	}
+	
 	public Edge setLabelMention(ClaimModel fromClaim, ClaimModel toClaim, String label) {
 		return setLabel(fromClaim.getVertex(), toClaim.getVertex(), label);		
 	}
--- a/conf/routes	Wed Oct 03 13:28:00 2012 +0900
+++ b/conf/routes	Wed Oct 03 14:27:44 2012 +0900
@@ -11,10 +11,13 @@
 GET		/users/claims/:name		controllers.User.getUserClaims(name: String)
 
 GET		/claims/browse/:id		controllers.Claim.getClaimInfo(id: String)
+GET		/claims/consensus/:id		controllers.Claim.getClaimTree(id: String)
 
 POST	/claims/create			controllers.Claim.crateClaim()
 POST	/claims/:mentionType/:id/create			controllers.Claim.createMention(mentionType: String ,id: String)
 
+
+
 # test action
 POST	   /hello				controllers.Application.hello()
 GET		/test					controllers.Application.test()
Binary file target/scala-2.9.1/cache/compile/copy-resources has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$1.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$3.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1$$anonfun$apply$5.class has changed
Binary file target/scala-2.9.1/classes/Routes$$anonfun$routes$1.class has changed
Binary file target/scala-2.9.1/classes/Routes$.class has changed
Binary file target/scala-2.9.1/classes/Routes.class has changed
Binary file target/scala-2.9.1/classes/controllers/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes/controllers/ReverseAssets.class has changed
Binary file target/scala-2.9.1/classes/controllers/javascript/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes/controllers/javascript/ReverseAssets.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$hello$1.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseApplication$$anonfun$index$1.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseAssets$$anonfun$at$1.class has changed
Binary file target/scala-2.9.1/classes/controllers/ref/ReverseAssets.class has changed
--- a/target/scala-2.9.1/classes/routes	Wed Oct 03 13:28:00 2012 +0900
+++ b/target/scala-2.9.1/classes/routes	Wed Oct 03 14:27:44 2012 +0900
@@ -10,9 +10,14 @@
 GET		/users/consensus/:name		controllers.User.getUserConsensus(name: String)
 GET		/users/claims/:name		controllers.User.getUserClaims(name: String)
 
+GET		/claims/browse/:id		controllers.Claim.getClaimInfo(id: String)
+GET		/claims/consensus/:id		controllers.Claim.getClaimTree(id: String)
+
 POST	/claims/create			controllers.Claim.crateClaim()
 POST	/claims/:mentionType/:id/create			controllers.Claim.createMention(mentionType: String ,id: String)
 
+
+
 # test action
 POST	   /hello				controllers.Application.hello()
 GET		/test					controllers.Application.test()
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1$$anonfun$apply$2.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$1.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$3.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5$$anonfun$apply$6.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1$$anonfun$apply$5.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$$anonfun$routes$1.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes$.class has changed
Binary file target/scala-2.9.1/classes_managed/Routes.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ReverseAssets.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/javascript/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/javascript/ReverseAssets.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$hello$1.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication$$anonfun$index$1.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseApplication.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseAssets$$anonfun$at$1.class has changed
Binary file target/scala-2.9.1/classes_managed/controllers/ref/ReverseAssets.class has changed
--- a/target/scala-2.9.1/src_managed/main/controllers/routes.java	Wed Oct 03 13:28:00 2012 +0900
+++ b/target/scala-2.9.1/src_managed/main/controllers/routes.java	Wed Oct 03 14:27:44 2012 +0900
@@ -1,6 +1,6 @@
 // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes
-// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9
-// @DATE:Wed Oct 03 02:51:34 JST 2012
+// @HASH:4e0ef425af6fa19939155c7491434fa337e3afc9
+// @DATE:Wed Oct 03 13:57:35 JST 2012
 
 package controllers;
 
--- a/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala	Wed Oct 03 13:28:00 2012 +0900
+++ b/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala	Wed Oct 03 14:27:44 2012 +0900
@@ -1,6 +1,6 @@
 // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes
-// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9
-// @DATE:Wed Oct 03 02:51:34 JST 2012
+// @HASH:4e0ef425af6fa19939155c7491434fa337e3afc9
+// @DATE:Wed Oct 03 13:57:35 JST 2012
 
 import play.core._
 import play.core.Router._
@@ -12,9 +12,11 @@
 import Router.queryString
 
 
+// @LINE:27
+// @LINE:23
 // @LINE:22
-// @LINE:18
 // @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 // @LINE:11
@@ -25,6 +27,8 @@
 // @LINE:6
 package controllers {
 
+// @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 class ReverseClaim {
@@ -32,32 +36,44 @@
 
 
  
-// @LINE:13
+// @LINE:16
 def crateClaim() = {
    Call("POST", "/claims/create")
 }
                                                         
  
 // @LINE:14
+def getClaimTree(id:String) = {
+   Call("GET", "/claims/consensus/" + implicitly[PathBindable[String]].unbind("id", id))
+}
+                                                        
+ 
+// @LINE:17
 def createMention(mentionType:String, id:String) = {
    Call("POST", "/claims/" + implicitly[PathBindable[String]].unbind("mentionType", mentionType) + "/" + implicitly[PathBindable[String]].unbind("id", id) + "/create")
 }
                                                         
+ 
+// @LINE:13
+def getClaimInfo(id:String) = {
+   Call("GET", "/claims/browse/" + implicitly[PathBindable[String]].unbind("id", id))
+}
+                                                        
 
                       
     
 }
                             
 
-// @LINE:18
-// @LINE:17
+// @LINE:23
+// @LINE:22
 // @LINE:6
 class ReverseApplication {
     
 
 
  
-// @LINE:18
+// @LINE:23
 def test() = {
    Call("GET", "/test")
 }
@@ -69,7 +85,7 @@
 }
                                                         
  
-// @LINE:17
+// @LINE:22
 def hello() = {
    Call("POST", "/hello")
 }
@@ -80,13 +96,13 @@
 }
                             
 
-// @LINE:22
+// @LINE:27
 class ReverseAssets {
     
 
 
  
-// @LINE:22
+// @LINE:27
 def at(file:String) = {
    Call("GET", "/assets/" + implicitly[PathBindable[String]].unbind("file", file))
 }
@@ -145,9 +161,11 @@
                     
 
 
+// @LINE:27
+// @LINE:23
 // @LINE:22
-// @LINE:18
 // @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 // @LINE:11
@@ -158,6 +176,8 @@
 // @LINE:6
 package controllers.javascript {
 
+// @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 class ReverseClaim {
@@ -165,7 +185,7 @@
 
 
  
-// @LINE:13
+// @LINE:16
 def crateClaim = JavascriptReverseRoute(
    "controllers.Claim.crateClaim",
    """
@@ -177,6 +197,17 @@
                                                         
  
 // @LINE:14
+def getClaimTree = JavascriptReverseRoute(
+   "controllers.Claim.getClaimTree",
+   """
+      function(id) {
+      return _wA({method:"GET", url:"/claims/consensus/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("id", id)})
+      }
+   """
+)
+                                                        
+ 
+// @LINE:17
 def createMention = JavascriptReverseRoute(
    "controllers.Claim.createMention",
    """
@@ -186,21 +217,32 @@
    """
 )
                                                         
+ 
+// @LINE:13
+def getClaimInfo = JavascriptReverseRoute(
+   "controllers.Claim.getClaimInfo",
+   """
+      function(id) {
+      return _wA({method:"GET", url:"/claims/browse/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("id", id)})
+      }
+   """
+)
+                                                        
 
                       
     
 }
                             
 
-// @LINE:18
-// @LINE:17
+// @LINE:23
+// @LINE:22
 // @LINE:6
 class ReverseApplication {
     
 
 
  
-// @LINE:18
+// @LINE:23
 def test = JavascriptReverseRoute(
    "controllers.Application.test",
    """
@@ -222,7 +264,7 @@
 )
                                                         
  
-// @LINE:17
+// @LINE:22
 def hello = JavascriptReverseRoute(
    "controllers.Application.hello",
    """
@@ -238,13 +280,13 @@
 }
                             
 
-// @LINE:22
+// @LINE:27
 class ReverseAssets {
     
 
 
  
-// @LINE:22
+// @LINE:27
 def at = JavascriptReverseRoute(
    "controllers.Assets.at",
    """
@@ -333,9 +375,11 @@
                     
 
 
+// @LINE:27
+// @LINE:23
 // @LINE:22
-// @LINE:18
 // @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 // @LINE:11
@@ -346,6 +390,8 @@
 // @LINE:6
 package controllers.ref {
 
+// @LINE:17
+// @LINE:16
 // @LINE:14
 // @LINE:13
 class ReverseClaim {
@@ -353,32 +399,44 @@
 
 
  
-// @LINE:13
+// @LINE:16
 def crateClaim() = new play.api.mvc.HandlerRef(
    controllers.Claim.crateClaim(), HandlerDef(this, "controllers.Claim", "crateClaim", Seq())
 )
                               
  
 // @LINE:14
+def getClaimTree(id:String) = new play.api.mvc.HandlerRef(
+   controllers.Claim.getClaimTree(id), HandlerDef(this, "controllers.Claim", "getClaimTree", Seq(classOf[String]))
+)
+                              
+ 
+// @LINE:17
 def createMention(mentionType:String, id:String) = new play.api.mvc.HandlerRef(
    controllers.Claim.createMention(mentionType, id), HandlerDef(this, "controllers.Claim", "createMention", Seq(classOf[String], classOf[String]))
 )
                               
+ 
+// @LINE:13
+def getClaimInfo(id:String) = new play.api.mvc.HandlerRef(
+   controllers.Claim.getClaimInfo(id), HandlerDef(this, "controllers.Claim", "getClaimInfo", Seq(classOf[String]))
+)
+                              
 
                       
     
 }
                             
 
-// @LINE:18
-// @LINE:17
+// @LINE:23
+// @LINE:22
 // @LINE:6
 class ReverseApplication {
     
 
 
  
-// @LINE:18
+// @LINE:23
 def test() = new play.api.mvc.HandlerRef(
    controllers.Application.test(), HandlerDef(this, "controllers.Application", "test", Seq())
 )
@@ -390,7 +448,7 @@
 )
                               
  
-// @LINE:17
+// @LINE:22
 def hello() = new play.api.mvc.HandlerRef(
    controllers.Application.hello(), HandlerDef(this, "controllers.Application", "hello", Seq())
 )
@@ -401,13 +459,13 @@
 }
                             
 
-// @LINE:22
+// @LINE:27
 class ReverseAssets {
     
 
 
  
-// @LINE:22
+// @LINE:27
 def at(path:String, file:String) = new play.api.mvc.HandlerRef(
    controllers.Assets.at(path, file), HandlerDef(this, "controllers.Assets", "at", Seq(classOf[String], classOf[String]))
 )
--- a/target/scala-2.9.1/src_managed/main/routes_routing.scala	Wed Oct 03 13:28:00 2012 +0900
+++ b/target/scala-2.9.1/src_managed/main/routes_routing.scala	Wed Oct 03 14:27:44 2012 +0900
@@ -1,6 +1,6 @@
 // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes
-// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9
-// @DATE:Wed Oct 03 02:51:34 JST 2012
+// @HASH:4e0ef425af6fa19939155c7491434fa337e3afc9
+// @DATE:Wed Oct 03 13:57:35 JST 2012
 
 import play.core._
 import play.core.Router._
@@ -39,25 +39,33 @@
                     
 
 // @LINE:13
-val controllers_Claim_crateClaim6 = Route("POST", PathPattern(List(StaticPart("/claims/create"))))
+val controllers_Claim_getClaimInfo6 = Route("GET", PathPattern(List(StaticPart("/claims/browse/"),DynamicPart("id", """[^/]+"""))))
                     
 
 // @LINE:14
-val controllers_Claim_createMention7 = Route("POST", PathPattern(List(StaticPart("/claims/"),DynamicPart("mentionType", """[^/]+"""),StaticPart("/"),DynamicPart("id", """[^/]+"""),StaticPart("/create"))))
+val controllers_Claim_getClaimTree7 = Route("GET", PathPattern(List(StaticPart("/claims/consensus/"),DynamicPart("id", """[^/]+"""))))
+                    
+
+// @LINE:16
+val controllers_Claim_crateClaim8 = Route("POST", PathPattern(List(StaticPart("/claims/create"))))
                     
 
 // @LINE:17
-val controllers_Application_hello8 = Route("POST", PathPattern(List(StaticPart("/hello"))))
-                    
-
-// @LINE:18
-val controllers_Application_test9 = Route("GET", PathPattern(List(StaticPart("/test"))))
+val controllers_Claim_createMention9 = Route("POST", PathPattern(List(StaticPart("/claims/"),DynamicPart("mentionType", """[^/]+"""),StaticPart("/"),DynamicPart("id", """[^/]+"""),StaticPart("/create"))))
                     
 
 // @LINE:22
-val controllers_Assets_at10 = Route("GET", PathPattern(List(StaticPart("/assets/"),DynamicPart("file", """.+"""))))
+val controllers_Application_hello10 = Route("POST", PathPattern(List(StaticPart("/hello"))))
+                    
+
+// @LINE:23
+val controllers_Application_test11 = Route("GET", PathPattern(List(StaticPart("/test"))))
                     
-def documentation = List(("""GET""","""/""","""controllers.Application.index()"""),("""PUT""","""/users/create/$name<[^/]+>""","""controllers.User.createUser(name:String)"""),("""GET""","""/users/browse/$name<[^/]+>""","""controllers.User.getUser(name:String)"""),("""GET""","""/users/requests/$name<[^/]+>""","""controllers.User.getUserRequests(name:String)"""),("""GET""","""/users/consensus/$name<[^/]+>""","""controllers.User.getUserConsensus(name:String)"""),("""GET""","""/users/claims/$name<[^/]+>""","""controllers.User.getUserClaims(name:String)"""),("""POST""","""/claims/create""","""controllers.Claim.crateClaim()"""),("""POST""","""/claims/$mentionType<[^/]+>/$id<[^/]+>/create""","""controllers.Claim.createMention(mentionType:String, id:String)"""),("""POST""","""/hello""","""controllers.Application.hello()"""),("""GET""","""/test""","""controllers.Application.test()"""),("""GET""","""/assets/$file<.+>""","""controllers.Assets.at(path:String = "/public", file:String)"""))
+
+// @LINE:27
+val controllers_Assets_at12 = Route("GET", PathPattern(List(StaticPart("/assets/"),DynamicPart("file", """.+"""))))
+                    
+def documentation = List(("""GET""","""/""","""controllers.Application.index()"""),("""PUT""","""/users/create/$name<[^/]+>""","""controllers.User.createUser(name:String)"""),("""GET""","""/users/browse/$name<[^/]+>""","""controllers.User.getUser(name:String)"""),("""GET""","""/users/requests/$name<[^/]+>""","""controllers.User.getUserRequests(name:String)"""),("""GET""","""/users/consensus/$name<[^/]+>""","""controllers.User.getUserConsensus(name:String)"""),("""GET""","""/users/claims/$name<[^/]+>""","""controllers.User.getUserClaims(name:String)"""),("""GET""","""/claims/browse/$id<[^/]+>""","""controllers.Claim.getClaimInfo(id:String)"""),("""GET""","""/claims/consensus/$id<[^/]+>""","""controllers.Claim.getClaimTree(id:String)"""),("""POST""","""/claims/create""","""controllers.Claim.crateClaim()"""),("""POST""","""/claims/$mentionType<[^/]+>/$id<[^/]+>/create""","""controllers.Claim.createMention(mentionType:String, id:String)"""),("""POST""","""/hello""","""controllers.Application.hello()"""),("""GET""","""/test""","""controllers.Application.test()"""),("""GET""","""/assets/$file<.+>""","""controllers.Assets.at(path:String = "/public", file:String)"""))
              
     
 def routes:PartialFunction[RequestHeader,Handler] = {        
@@ -111,39 +119,55 @@
                     
 
 // @LINE:13
-case controllers_Claim_crateClaim6(params) => {
+case controllers_Claim_getClaimInfo6(params) => {
+   call(params.fromPath[String]("id", None)) { (id) =>
+        invokeHandler(_root_.controllers.Claim.getClaimInfo(id), HandlerDef(this, "controllers.Claim", "getClaimInfo", Seq(classOf[String])))
+   }
+}
+                    
+
+// @LINE:14
+case controllers_Claim_getClaimTree7(params) => {
+   call(params.fromPath[String]("id", None)) { (id) =>
+        invokeHandler(_root_.controllers.Claim.getClaimTree(id), HandlerDef(this, "controllers.Claim", "getClaimTree", Seq(classOf[String])))
+   }
+}
+                    
+
+// @LINE:16
+case controllers_Claim_crateClaim8(params) => {
    call { 
         invokeHandler(_root_.controllers.Claim.crateClaim(), HandlerDef(this, "controllers.Claim", "crateClaim", Nil))
    }
 }
                     
 
-// @LINE:14
-case controllers_Claim_createMention7(params) => {
+// @LINE:17
+case controllers_Claim_createMention9(params) => {
    call(params.fromPath[String]("mentionType", None), params.fromPath[String]("id", None)) { (mentionType, id) =>
         invokeHandler(_root_.controllers.Claim.createMention(mentionType, id), HandlerDef(this, "controllers.Claim", "createMention", Seq(classOf[String], classOf[String])))
    }
 }
                     
 
-// @LINE:17
-case controllers_Application_hello8(params) => {
+// @LINE:22
+case controllers_Application_hello10(params) => {
    call { 
         invokeHandler(_root_.controllers.Application.hello(), HandlerDef(this, "controllers.Application", "hello", Nil))
    }
 }
                     
 
-// @LINE:18
-case controllers_Application_test9(params) => {
+// @LINE:23
+case controllers_Application_test11(params) => {
    call { 
         invokeHandler(_root_.controllers.Application.test(), HandlerDef(this, "controllers.Application", "test", Nil))
    }
 }
                     
 
-// @LINE:22
-case controllers_Assets_at10(params) => {
+// @LINE:27
+case controllers_Assets_at12(params) => {
    call(Param[String]("path", Right("/public")), params.fromPath[String]("file", None)) { (path, file) =>
         invokeHandler(_root_.controllers.Assets.at(path, file), HandlerDef(this, "controllers.Assets", "at", Seq(classOf[String], classOf[String])))
    }
--- a/test/RequestTest.java	Wed Oct 03 13:28:00 2012 +0900
+++ b/test/RequestTest.java	Wed Oct 03 14:27:44 2012 +0900
@@ -48,13 +48,27 @@
 		
 		getUserInfo(user3,"claims/");
 		getUserInfo(user3,"consensus/");
-		
+
+
 		for (int i=0; i<user1Claim.size(); i++ ) {
-			getClaimInfo(user1Claim.get(i).asInt());
+			int id = user1Claim.get(i).asInt(); 
+//			getClaimInfo(user1Claim.get(i).asInt());
+			getClaimTree(id); 
 		}
 
 	}
 
+	public static JsonNode getClaimTree(int id) {
+		final String uri = SERVER_ROOT_URI + "/claims/consensus/"+id;
+		WebResource resource = Client.create().resource(uri);
+		ClientResponse response = resource.get(ClientResponse.class);
+		System.out.println(String.format("GET on [%s], status code [%d]", uri, response.getStatus()));
+		String resStr = response.getEntity(String.class);
+		System.out.println(resStr);
+		return Json.parse(resStr);
+	}
+	
+	
 	public static JsonNode getClaimInfo(int id) {
 		final String uri = SERVER_ROOT_URI + "/claims/browse/"+id;
 		WebResource resource = Client.create().resource(uri);
@@ -63,7 +77,6 @@
 		String resStr = response.getEntity(String.class);
 		System.out.println(resStr);
 		return Json.parse(resStr);
-		
 	}
 	
 	public static void createMention(String author, String[] users, String type, Object id) {