Mercurial > hg > Members > nobuyasu > Consensus
changeset 26:ad7cfb1f9d03
modified checkconsensus
line wrap: on
line diff
--- a/app/models/TPGraph.java Wed Oct 03 03:40:51 2012 +0900 +++ b/app/models/TPGraph.java Wed Oct 03 03:52:03 2012 +0900 @@ -116,7 +116,6 @@ Iterator<Object> iter = set.iterator(); while(iter.hasNext()) { Object childId = iter.next(); - System.out.println("childId = "+childId); Object parentId; while ( (parentId = checkUpperVertex(childId)) != null){ if (set.contains(parentId)) {
--- a/target/.history Wed Oct 03 03:40:51 2012 +0900 +++ b/target/.history Wed Oct 03 03:52:03 2012 +0900 @@ -2,3 +2,4 @@ ~ run run ~ run +~ run
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$3$$anonfun$apply$4.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/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/ReverseAssets$$anonfun$at$1.class has changed
--- a/target/scala-2.9.1/classes/routes Wed Oct 03 03:40:51 2012 +0900 +++ b/target/scala-2.9.1/classes/routes Wed Oct 03 03:52:03 2012 +0900 @@ -11,7 +11,7 @@ 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) # test action POST /hello controllers.Application.hello()
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/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/ReverseAssets$$anonfun$at$1.class has changed
--- a/target/scala-2.9.1/src_managed/main/controllers/routes.java Wed Oct 03 03:40:51 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/controllers/routes.java Wed Oct 03 03:52:03 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:59e0af1cf1b7de16f307bf871a5f5dfd5d4ad215 -// @DATE:Tue Oct 02 11:52:43 JST 2012 +// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9 +// @DATE:Wed Oct 03 02:51:34 JST 2012 package controllers;
--- a/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala Wed Oct 03 03:40:51 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/routes_reverseRouting.scala Wed Oct 03 03:52:03 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:59e0af1cf1b7de16f307bf871a5f5dfd5d4ad215 -// @DATE:Tue Oct 02 11:52:43 JST 2012 +// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9 +// @DATE:Wed Oct 03 02:51:34 JST 2012 import play.core._ import play.core.Router._ @@ -15,6 +15,7 @@ // @LINE:22 // @LINE:18 // @LINE:17 +// @LINE:14 // @LINE:13 // @LINE:11 // @LINE:10 @@ -24,6 +25,7 @@ // @LINE:6 package controllers { +// @LINE:14 // @LINE:13 class ReverseClaim { @@ -35,6 +37,12 @@ Call("POST", "/claims/create") } + +// @LINE:14 +def createMention(mentionType:String, id:String) = { + Call("POST", "/claims/" + implicitly[PathBindable[String]].unbind("mentionType", mentionType) + "/" + implicitly[PathBindable[String]].unbind("id", id) + "/create") +} + @@ -140,6 +148,7 @@ // @LINE:22 // @LINE:18 // @LINE:17 +// @LINE:14 // @LINE:13 // @LINE:11 // @LINE:10 @@ -149,6 +158,7 @@ // @LINE:6 package controllers.javascript { +// @LINE:14 // @LINE:13 class ReverseClaim { @@ -165,6 +175,17 @@ """ ) + +// @LINE:14 +def createMention = JavascriptReverseRoute( + "controllers.Claim.createMention", + """ + function(mentionType,id) { + return _wA({method:"POST", url:"/claims/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("mentionType", mentionType) + "/" + (""" + implicitly[PathBindable[String]].javascriptUnbind + """)("id", id) + "/create"}) + } + """ +) + @@ -315,6 +336,7 @@ // @LINE:22 // @LINE:18 // @LINE:17 +// @LINE:14 // @LINE:13 // @LINE:11 // @LINE:10 @@ -324,6 +346,7 @@ // @LINE:6 package controllers.ref { +// @LINE:14 // @LINE:13 class ReverseClaim { @@ -335,6 +358,12 @@ controllers.Claim.crateClaim(), HandlerDef(this, "controllers.Claim", "crateClaim", Seq()) ) + +// @LINE:14 +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])) +) +
--- a/target/scala-2.9.1/src_managed/main/routes_routing.scala Wed Oct 03 03:40:51 2012 +0900 +++ b/target/scala-2.9.1/src_managed/main/routes_routing.scala Wed Oct 03 03:52:03 2012 +0900 @@ -1,6 +1,6 @@ // @SOURCE:/Users/aotokage/workspace/Consensus/conf/routes -// @HASH:59e0af1cf1b7de16f307bf871a5f5dfd5d4ad215 -// @DATE:Tue Oct 02 11:52:43 JST 2012 +// @HASH:18c4a2571c38e53750b3b1ef9f8731961460e5c9 +// @DATE:Wed Oct 03 02:51:34 JST 2012 import play.core._ import play.core.Router._ @@ -42,18 +42,22 @@ val controllers_Claim_crateClaim6 = Route("POST", PathPattern(List(StaticPart("/claims/create")))) +// @LINE:14 +val controllers_Claim_createMention7 = Route("POST", PathPattern(List(StaticPart("/claims/"),DynamicPart("mentionType", """[^/]+"""),StaticPart("/"),DynamicPart("id", """[^/]+"""),StaticPart("/create")))) + + // @LINE:17 -val controllers_Application_hello7 = Route("POST", PathPattern(List(StaticPart("/hello")))) +val controllers_Application_hello8 = Route("POST", PathPattern(List(StaticPart("/hello")))) // @LINE:18 -val controllers_Application_test8 = Route("GET", PathPattern(List(StaticPart("/test")))) +val controllers_Application_test9 = Route("GET", PathPattern(List(StaticPart("/test")))) // @LINE:22 -val controllers_Assets_at9 = Route("GET", PathPattern(List(StaticPart("/assets/"),DynamicPart("file", """.+""")))) +val controllers_Assets_at10 = 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)"""),("""POST""","""/claims/create""","""controllers.Claim.crateClaim()"""),("""POST""","""/hello""","""controllers.Application.hello()"""),("""GET""","""/test""","""controllers.Application.test()"""),("""GET""","""/assets/$file<.+>""","""controllers.Assets.at(path:String = "/public", file:String)""")) +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)""")) def routes:PartialFunction[RequestHeader,Handler] = { @@ -114,8 +118,16 @@ } +// @LINE:14 +case controllers_Claim_createMention7(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_hello7(params) => { +case controllers_Application_hello8(params) => { call { invokeHandler(_root_.controllers.Application.hello(), HandlerDef(this, "controllers.Application", "hello", Nil)) } @@ -123,7 +135,7 @@ // @LINE:18 -case controllers_Application_test8(params) => { +case controllers_Application_test9(params) => { call { invokeHandler(_root_.controllers.Application.test(), HandlerDef(this, "controllers.Application", "test", Nil)) } @@ -131,7 +143,7 @@ // @LINE:22 -case controllers_Assets_at9(params) => { +case controllers_Assets_at10(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/target/streams/compile/sources/$global/out Wed Oct 03 03:40:51 2012 +0900 +++ b/target/streams/compile/sources/$global/out Wed Oct 03 03:52:03 2012 +0900 @@ -1,4 +1,4 @@ -in /Users/aotokage/workspace/Consensus/conf/routes - PlayException: Compilation error [HTTP Verb expected] +in /Users/aotokage/workspace/Consensus/conf/routes - PlayException: Compilation error [Identifier expected] at sbt.PlayCommands$$anonfun$52.apply(PlayCommands.scala:433) at sbt.PlayCommands$$anonfun$52.apply(PlayCommands.scala:423) at sbt.Scoped$$anonfun$hf3$1.apply(Structure.scala:474) @@ -23,4 +23,4 @@ at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) -[0m[[31merror[0m] [0m{file:/Users/aotokage/workspace/Consensus/}Consensus/compile:[31msources[0m: in /Users/aotokage/workspace/Consensus/conf/routes - PlayException: Compilation error [HTTP Verb expected][0m +[0m[[31merror[0m] [0m{file:/Users/aotokage/workspace/Consensus/}Consensus/compile:[31msources[0m: in /Users/aotokage/workspace/Consensus/conf/routes - PlayException: Compilation error [Identifier expected][0m
--- a/test/RequestTest.java Wed Oct 03 03:40:51 2012 +0900 +++ b/test/RequestTest.java Wed Oct 03 03:52:03 2012 +0900 @@ -28,23 +28,23 @@ createUser(user2); createUser(user3); - + String[] users1 = {user2,user3}; +// createClaim(user1, users1); + String[] users2 = {user2}; +// createClaim(user1, users2); - String[] users = {user2,user3}; - createClaim(user1, users); - createClaim(user1, users); getUser(user1); getUserInfo(user1,"claims/"); - String[] users2 = {user1}; + String[] users3 = {user1}; - createMention(user2, users2, NodeModel.L_QUESTION, "5"); - createMention(user3, users2, NodeModel.L_REFUTATION, "5"); + createMention(user2, users3, NodeModel.L_QUESTION, "5"); + createMention(user3, users3, NodeModel.L_REFUTATION, "5"); - createMention(user2, users2, NodeModel.L_QUESTION, "10"); - createMention(user3, users2, NodeModel.L_REFUTATION, "10"); + createMention(user2, users3, NodeModel.L_QUESTION, "10"); + createMention(user3, users3, NodeModel.L_REFUTATION, "10"); getUserInfo(user1,"claims/");