annotate app/models/ClaimModel.java @ 14:792fdb0c10bf

add ClaimModel.java
author one
date Tue, 02 Oct 2012 11:40:20 +0900
parents
children 7cdc9d19834f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
1 package models;
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
2
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
3 import org.codehaus.jackson.node.ObjectNode;
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
4
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
5 import play.libs.Json;
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
6
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
7 import com.tinkerpop.blueprints.Vertex;
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
8
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
9 public class ClaimModel extends NodeModel {
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
10
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
11
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
12
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
13
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
14 public ClaimModel(Vertex vertex) {
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
15 super(vertex);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
16 }
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
17
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
18
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
19 public void setClaimProperties(String author, String title, String contents, String q,
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
20 String d, String w, String b, String r, String users, String type) {
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
21
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
22
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
23
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
24 ObjectNode toulmin = Json.newObject();
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
25 toulmin.put(TITLE, title);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
26 toulmin.put(CONTENTS, contents);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
27 toulmin.put(QUALIFIER, q);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
28 toulmin.put(DATA, d);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
29 toulmin.put(WARRANT, w);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
30 toulmin.put(BACKING, b);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
31 toulmin.put(REBUTTLE, r);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
32
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
33 setProperty(AUTHOR,author);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
34 setProperty(USERS, users);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
35 setProperty(TYPE, type);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
36 setProperty(MENTIONS, null);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
37 setProperty(STATUS, FAIL);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
38 setProperty(TOULMIN, toulmin);
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
39
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
40
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
41
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
42
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
43 }
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
44
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
45
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
46
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
47
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
48
792fdb0c10bf add ClaimModel.java
one
parents:
diff changeset
49 }