source: java/ModDepotAccess/src/net/oni2/moddepot/model/TaxonomyVocabulary.java@ 1189

Last change on this file since 1189 was 748, checked in by alloc, 12 years ago

java lib: Mod depot access

File size: 1.2 KB
RevLine 
[748]1package net.oni2.moddepot.model;
2
3import org.json.JSONException;
4import org.json.JSONObject;
5
6/**
7 * @author Christian Illy
8 */
9public class TaxonomyVocabulary {
10 private int vid;
11 private String name;
12 private String machine_name;
13 private String description;
14 private int hierarchy;
15 private String uri;
16
17 /**
18 * @param json
19 * JSONObject containing the item
20 * @throws JSONException
21 * If a key can't be found
22 */
23 public TaxonomyVocabulary(JSONObject json) throws JSONException {
24 vid = json.getInt("vid");
25 name = json.getString("name");
26 machine_name = json.getString("machine_name");
27 description = json.getString("description");
28 hierarchy = json.getInt("hierarchy");
29 uri = json.getString("uri");
30 }
31
32 /**
33 * @return the vocabulary ID (vid)
34 */
35 public int getVid() {
36 return vid;
37 }
38
39 /**
40 * @return the name
41 */
42 public String getName() {
43 return name;
44 }
45
46 /**
47 * @return the machine_name
48 */
49 public String getMachine_name() {
50 return machine_name;
51 }
52
53 /**
54 * @return the description
55 */
56 public String getDescription() {
57 return description;
58 }
59
60 /**
61 * @return the hierarchy level
62 */
63 public int getHierarchy() {
64 return hierarchy;
65 }
66
67 /**
68 * @return the uri
69 */
70 public String getUri() {
71 return uri;
72 }
73}
Note: See TracBrowser for help on using the repository browser.