Revision 1542
Added by Jing Tao almost 22 years ago
src/edu/ucsb/nceas/metacat/SubTree.java | ||
---|---|---|
40 | 40 |
*/ |
41 | 41 |
public class SubTree implements Comparator |
42 | 42 |
{ |
43 |
private String docId = null;
|
|
44 |
private String subTreeId = null;
|
|
45 |
private String startElementName = null;
|
|
46 |
private long startNodeId = -1;
|
|
47 |
private long endNodeId = -1;
|
|
43 |
protected String docId = null;
|
|
44 |
protected String subTreeId = null;
|
|
45 |
protected String startElementName = null;
|
|
46 |
protected long startNodeId = -1;
|
|
47 |
protected long endNodeId = -1;
|
|
48 | 48 |
private Stack subTreeNodeStack = null; |
49 | 49 |
|
50 | 50 |
/** |
... | ... | |
80 | 80 |
{ |
81 | 81 |
return this.subTreeNodeStack; |
82 | 82 |
} |
83 |
|
|
84 |
/** |
|
85 |
* Set subtree node stack |
|
86 |
*/ |
|
87 |
public void setSubTreeNodeStack(Stack myStack) |
|
88 |
{ |
|
89 |
this.subTreeNodeStack = myStack; |
|
90 |
} |
|
83 | 91 |
|
84 | 92 |
/** Set the a docId */ |
85 | 93 |
public void setDocId(String myId) |
... | ... | |
152 | 160 |
} |
153 | 161 |
|
154 | 162 |
/* Put a subtree node into a stack, on top is the start point of subtree*/ |
155 |
private Stack getSubTreeNodeList() throws McdbException
|
|
163 |
public Stack getSubTreeNodeList() throws McdbException
|
|
156 | 164 |
{ |
165 |
Stack nodeRecordList = new Stack(); |
|
166 |
// make sure it works |
|
167 |
if ( docId == null || startNodeId == -1 || endNodeId == -1) |
|
168 |
{ |
|
169 |
return nodeRecordList; |
|
170 |
} |
|
157 | 171 |
PreparedStatement pstmt = null; |
158 | 172 |
DBConnection dbconn = null; |
159 | 173 |
int serialNumber = -1; |
160 |
Stack nodeRecordList = new Stack(); |
|
174 |
|
|
161 | 175 |
long nodeid = 0; |
162 | 176 |
long parentnodeid = 0; |
163 | 177 |
long nodeindex = 0; |
Also available in: Unified diff
Add a field to this class.