Revision 2762
Added by sgarg about 19 years ago
src/edu/ucsb/nceas/metacat/NodeRecord.java | ||
---|---|---|
33 | 33 |
* A utility class that encapsulates a node and its data |
34 | 34 |
*/ |
35 | 35 |
public class NodeRecord { |
36 |
public long nodeid = -1; |
|
37 |
public long parentnodeid = -1; |
|
38 |
public long nodeindex = -1; |
|
39 |
public String nodename = null; |
|
40 |
public String nodeprefix = null; |
|
41 |
public String nodetype = null; |
|
42 |
public String nodedata = null; |
|
36 |
private long nodeid = -1; |
|
37 |
private long parentnodeid = -1; |
|
38 |
private long nodeindex = -1; |
|
39 |
private String nodename = null; |
|
40 |
private String nodeprefix = null; |
|
41 |
private String nodetype = null; |
|
42 |
private String nodedata = null; |
|
43 |
private float nodedatanumerical = -1; |
|
43 | 44 |
private Logger logMetacat = Logger.getLogger(NodeRecord.class); |
44 | 45 |
|
45 | 46 |
/** |
... | ... | |
57 | 58 |
this.nodedata = nodedata; |
58 | 59 |
} |
59 | 60 |
|
61 |
|
|
62 |
public NodeRecord(long nodeid, long parentnodeid, long nodeindex, |
|
63 |
String nodetype, String nodename, String nodeprefix, |
|
64 |
String nodedata, float nodedatanumerical) { |
|
65 |
this.nodeid = nodeid; |
|
66 |
this.parentnodeid = parentnodeid; |
|
67 |
this.nodeindex = nodeindex; |
|
68 |
this.nodename = nodename; |
|
69 |
this.nodeprefix = nodeprefix; |
|
70 |
this.nodetype = nodetype; |
|
71 |
this.nodedata = nodedata; |
|
72 |
this.nodedatanumerical = nodedatanumerical; |
|
73 |
} |
|
74 |
|
|
60 | 75 |
/** Get functions*/ |
61 | 76 |
public long getNodeId() |
62 | 77 |
{ |
... | ... | |
92 | 107 |
{ |
93 | 108 |
return nodedata; |
94 | 109 |
} |
95 |
|
|
110 |
|
|
111 |
public float getNodeDataNumerical() |
|
112 |
{ |
|
113 |
return nodedatanumerical; |
|
114 |
} |
|
96 | 115 |
/** Method compare two records */ |
97 | 116 |
public boolean contentEquals(NodeRecord record) |
98 | 117 |
{ |
Also available in: Unified diff
1. Changed teh access modifier from public to private for variables
2. Added a new variable for nodedatanumerical
3. added a new constructor