Revision 624
Added by berkley almost 24 years ago
src/edu/ucsb/nceas/metacat/DBQuery.java | ||
---|---|---|
144 | 144 |
String fieldname = null; |
145 | 145 |
String fielddata = null; |
146 | 146 |
String relation = null; |
147 |
int rev = 0; |
|
147 | 148 |
StringBuffer document = null; |
148 | 149 |
Vector returndocVec = new Vector(); |
149 | 150 |
|
... | ... | |
159 | 160 |
// Get the XML query and covert it into a SQL statment |
160 | 161 |
QuerySpecification qspec = new QuerySpecification(xmlquery, |
161 | 162 |
parserName, |
162 |
util.getOption("accNumberSeparator"));
|
|
163 |
util.getOption("accNumSeparator")); |
|
163 | 164 |
//System.out.println(qspec.printSQL()); |
164 | 165 |
pstmt = conn.prepareStatement( qspec.printSQL() ); |
165 | 166 |
|
... | ... | |
179 | 180 |
doctitle = rs.getString(4); |
180 | 181 |
createDate = rs.getString(5); |
181 | 182 |
updateDate = rs.getString(6); |
183 |
rev = rs.getInt(7); |
|
182 | 184 |
//System.out.println("vec.size = " + returndocVec.size()); |
183 | 185 |
if(returndocVec.size() != 0 && !returndocVec.contains(doctype)) |
184 | 186 |
{ //there are returndocs to match (backtracking can now be performed). |
... | ... | |
235 | 237 |
|
236 | 238 |
document = new StringBuffer(); |
237 | 239 |
//System.out.println("packagdoctype: " + util.getOption("packagedoctype")); |
238 |
if(!doctype.equals(util.getOption("packagedoctype"))) |
|
240 |
//if(!doctype.equals(util.getOption("packagedoctype")))
|
|
239 | 241 |
{ |
240 |
document.append("<docid>").append(docid).append("</docid>"); |
|
242 |
String completeDocid = docid + util.getOption("accNumSeparator"); |
|
243 |
completeDocid += rev; |
|
244 |
document.append("<docid>").append(completeDocid).append("</docid>"); |
|
241 | 245 |
if (docname != null) { |
242 | 246 |
document.append("<docname>" + docname + "</docname>"); |
243 | 247 |
} |
Also available in: Unified diff
removed package doctype filtering from the resultset.