Revision 465
Added by berkley over 23 years ago
DocumentImpl.java | ||
---|---|---|
52 | 52 |
private String docid = null; |
53 | 53 |
private String docname = null; |
54 | 54 |
private String doctype = null; |
55 |
private String doctitle = null; |
|
56 |
private String createdate = null; |
|
57 |
private String updatedate = null; |
|
55 | 58 |
private String system_id = null; |
56 | 59 |
private long rootnodeid; |
57 | 60 |
private ElementNode rootNode = null; |
58 |
private String doctitle = null; |
|
59 | 61 |
private TreeSet nodeRecordList = null; |
60 | 62 |
|
61 | 63 |
/** |
... | ... | |
67 | 69 |
*/ |
68 | 70 |
public DocumentImpl(Connection conn, String docid) throws McdbException |
69 | 71 |
{ |
70 |
try { |
|
72 |
try {
|
|
71 | 73 |
this.conn = conn; |
72 | 74 |
this.docid = docid; |
73 | 75 |
|
... | ... | |
144 | 146 |
public long getRootNodeID() { |
145 | 147 |
return rootnodeid; |
146 | 148 |
} |
149 |
|
|
150 |
/** |
|
151 |
* get the creation date |
|
152 |
*/ |
|
153 |
public String getCreateDate() { |
|
154 |
return createdate; |
|
155 |
} |
|
156 |
|
|
157 |
/** |
|
158 |
* get the update date |
|
159 |
*/ |
|
160 |
public String getUpdateDate() { |
|
161 |
return updatedate; |
|
162 |
} |
|
147 | 163 |
|
148 | 164 |
/** |
149 | 165 |
* Get the document identifier (docid) |
... | ... | |
151 | 167 |
public String getDocID() { |
152 | 168 |
return docid; |
153 | 169 |
} |
170 |
|
|
171 |
/** |
|
172 |
*get the document title |
|
173 |
*/ |
|
174 |
public String getDocTitle() { |
|
175 |
return doctitle; |
|
176 |
} |
|
154 | 177 |
|
155 | 178 |
|
156 | 179 |
/** |
... | ... | |
338 | 361 |
|
339 | 362 |
try { |
340 | 363 |
pstmt = |
341 |
conn.prepareStatement("SELECT docname,doctype,rootnodeid " + |
|
342 |
"FROM xml_documents " + |
|
364 |
conn.prepareStatement("SELECT docname, doctype, rootnodeid,doctitle, " + |
|
365 |
"date_created, date_updated " + |
|
366 |
"FROM xml_documents " + |
|
343 | 367 |
"WHERE docid LIKE ?"); |
344 | 368 |
// Bind the values to the query |
345 | 369 |
pstmt.setString(1, docid); |
... | ... | |
351 | 375 |
this.docname = rs.getString(1); |
352 | 376 |
this.doctype = rs.getString(2); |
353 | 377 |
this.rootnodeid = rs.getLong(3); |
378 |
this.doctitle = rs.getString(4); |
|
379 |
this.createdate = rs.getString(5); |
|
380 |
this.updatedate = rs.getString(6); |
|
354 | 381 |
} |
355 | 382 |
pstmt.close(); |
356 | 383 |
|
... | ... | |
516 | 543 |
* |
517 | 544 |
* @param title the new title for the document |
518 | 545 |
*/ |
546 |
|
|
519 | 547 |
public void setTitle( String title ) { |
520 | 548 |
this.doctitle = title; |
521 | 549 |
try { |
Also available in: Unified diff
Added backtrack functionality. Backtracking works by passing a returndoc parameter. There can be more than one. If a document that is hit by a query is not of type returndoc then it searches the database for a related file of type returndoc. If one is found it is displayed, if no relation is found, the original is displayed.
Support was also added for an index of relations. the table xml_relation handles the all of the relation indexing.