Line | |
---|
1 | package net.oni2.aeinstaller.backend.depot.model;
|
---|
2 |
|
---|
3 | import net.oni2.aeinstaller.backend.depot.JSONHelpers;
|
---|
4 |
|
---|
5 | import org.json.JSONException;
|
---|
6 | import org.json.JSONObject;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * @author Christian Illy
|
---|
10 | */
|
---|
11 | public class NodeField_Body {
|
---|
12 | private String summary;
|
---|
13 | private String value;
|
---|
14 | private String safe_summary;
|
---|
15 | private String safe_value;
|
---|
16 | private int format;
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * @param json
|
---|
20 | * JSON object of body-entry to parse
|
---|
21 | * @throws JSONException
|
---|
22 | * On key not found / wrong type
|
---|
23 | */
|
---|
24 | public NodeField_Body(JSONObject json) throws JSONException {
|
---|
25 | summary = JSONHelpers.getStringOrNull(json, "summary");
|
---|
26 | value = JSONHelpers.getStringOrNull(json, "value");
|
---|
27 | safe_summary = JSONHelpers.getStringOrNull(json, "safe_summary");
|
---|
28 | safe_value = JSONHelpers.getStringOrNull(json, "safe_value");
|
---|
29 | format = json.getInt("format");
|
---|
30 | }
|
---|
31 |
|
---|
32 | /**
|
---|
33 | * @return the summary
|
---|
34 | */
|
---|
35 | public String getSummary() {
|
---|
36 | return summary;
|
---|
37 | }
|
---|
38 |
|
---|
39 | /**
|
---|
40 | * @return the value
|
---|
41 | */
|
---|
42 | public String getValue() {
|
---|
43 | return value;
|
---|
44 | }
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * @return the safe_summary
|
---|
48 | */
|
---|
49 | public String getSafe_summary() {
|
---|
50 | return safe_summary;
|
---|
51 | }
|
---|
52 |
|
---|
53 | /**
|
---|
54 | * @return the safe_value
|
---|
55 | */
|
---|
56 | public String getSafe_value() {
|
---|
57 | return safe_value;
|
---|
58 | }
|
---|
59 |
|
---|
60 | /**
|
---|
61 | * @return the format
|
---|
62 | */
|
---|
63 | public int getFormat() {
|
---|
64 | return format;
|
---|
65 | }
|
---|
66 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.