14
|
1 package models;
|
|
2
|
|
3 import org.codehaus.jackson.node.ObjectNode;
|
|
4
|
|
5 import play.libs.Json;
|
|
6
|
|
7 import com.tinkerpop.blueprints.Vertex;
|
|
8
|
|
9 public class ClaimModel extends NodeModel {
|
|
10
|
|
11
|
|
12
|
|
13
|
|
14 public ClaimModel(Vertex vertex) {
|
|
15 super(vertex);
|
|
16 }
|
|
17
|
|
18
|
|
19 public void setClaimProperties(String author, String title, String contents, String q,
|
|
20 String d, String w, String b, String r, String users, String type) {
|
|
21
|
|
22
|
|
23
|
|
24 ObjectNode toulmin = Json.newObject();
|
|
25 toulmin.put(TITLE, title);
|
|
26 toulmin.put(CONTENTS, contents);
|
|
27 toulmin.put(QUALIFIER, q);
|
|
28 toulmin.put(DATA, d);
|
|
29 toulmin.put(WARRANT, w);
|
|
30 toulmin.put(BACKING, b);
|
|
31 toulmin.put(REBUTTLE, r);
|
|
32
|
|
33 setProperty(AUTHOR,author);
|
|
34 setProperty(USERS, users);
|
|
35 setProperty(TYPE, type);
|
|
36 setProperty(MENTIONS, null);
|
|
37 setProperty(STATUS, FAIL);
|
|
38 setProperty(TOULMIN, toulmin);
|
|
39
|
|
40
|
|
41
|
|
42
|
|
43 }
|
|
44
|
|
45
|
|
46
|
|
47
|
|
48
|
|
49 }
|