diff app/models/ClaimModel.java @ 92:35eeb04a788d draft

create getLatestClaimTree action. modified createMention action and viewer.html.
author one
date Tue, 12 Mar 2013 16:18:51 +0900
parents bb547f2a3c88
children 52b0c88a0b1b
line wrap: on
line diff
--- a/app/models/ClaimModel.java	Mon Mar 11 06:42:35 2013 +0900
+++ b/app/models/ClaimModel.java	Tue Mar 12 16:18:51 2013 +0900
@@ -21,6 +21,10 @@
 	}
 
 	public void setClaimProperties(JsonNode toulmin, String type) {
+		setClaimProperties(toulmin, type, Long.toString(System.currentTimeMillis()));
+	}
+	
+	public void setClaimProperties(JsonNode toulmin, String type, String timestamp) {
 		String title = toulmin.findPath(TITLE).getTextValue();
 		String contents = toulmin.findPath(CONTENTS).getTextValue();
 		String q = toulmin.findPath(QUALIFIER).getTextValue(); // Qualifier
@@ -44,7 +48,7 @@
 		if (getProperty(STATUS) == null) {
 			setProperty(STATUS, UNKNOWN); // Default Status is unknown.
 		}
-		setProperty(TIMESTAMP, Long.toString(System.currentTimeMillis()));
+		setProperty(TIMESTAMP, timestamp);
 		setProperty(TOULMIN, t);
 	}