1 package gov.nasa.pds.ltdt.gui;
2
3 import gov.nasa.pds.tools.dict.Definition;
4
5 import java.net.URL;
6 /***
7 * A structure to hold the "value" portion for KeywordInfo
8 * @author jwang
9 *
10 */
11 public class KeywordProperty {
12
13 String identifier = null;
14
15 int kwdType = 0;
16 Definition kwdDef = null;
17 URL dictURL = null;
18
19 boolean modifiedFlag = false;
20 boolean newFlag = false;
21
22 /***
23 * Constructor
24 *
25 */
26 public KeywordProperty () {
27
28 }
29
30 /***
31 * Constructor
32 * @param id Identifier. The actaul value of "NEME =" in
33 * data dictionary, which may or may not contain namespace.
34 * @param type Type of keyword (object, element, or group)
35 * @param def Detailed definition for this keyword
36 * @param u Location of parent data dictionary in URL format (file://xxx or http://xxx)
37 */
38 public KeywordProperty(String id, int type, Definition def, URL u) {
39
40 identifier = id;
41 kwdType = type;
42 kwdDef = def;
43 dictURL = u;
44 }
45
46
47 public void setIdentifier(String i) {
48 identifier= i;
49 }
50
51
52
53
54
55 public void setKwdType (int type) {
56 kwdType = type;
57 }
58
59 public void setKwdDef (Definition def) {
60 kwdDef = def;
61 }
62
63 public void setDictURL (URL u) {
64 dictURL = u;
65 }
66
67 public String getIdentifier () {
68 return identifier;
69 }
70
71
72
73
74
75 public int getKwdType () {
76 return kwdType;
77 }
78
79 public Definition getKwdDef () {
80 return kwdDef;
81 }
82
83 public URL getDictURL () {
84 return dictURL;
85 }
86
87 public void setModified() {
88 modifiedFlag = true;
89 }
90
91 public boolean isModified() {
92 return modifiedFlag;
93 }
94
95 public void setNew () {
96 newFlag = true;
97 }
98
99 public boolean isNew () {
100 return newFlag;
101 }
102 }