Revision 692
Added by bojilova almost 24 years ago
src/edu/ucsb/nceas/metacat/QuerySpecification.java | ||
---|---|---|
54 | 54 |
|
55 | 55 |
// Query data structures |
56 | 56 |
private String meta_file_id; |
57 |
private String querytitle; |
|
57 |
// DOCTITLE attr cleared from the db |
|
58 |
// private String querytitle; |
|
58 | 59 |
private Vector doctypeList; |
59 | 60 |
private Vector returnFieldList; |
60 | 61 |
private Vector ownerList; |
... | ... | |
265 | 266 |
String currentTag = currentNode.getTagName(); |
266 | 267 |
if (currentTag.equals("meta_file_id")) { |
267 | 268 |
meta_file_id = inputString; |
268 |
} else if (currentTag.equals("querytitle")) { |
|
269 |
querytitle = inputString; |
|
269 |
// DOCTITLE attr cleared from the db |
|
270 |
// } else if (currentTag.equals("querytitle")) { |
|
271 |
// querytitle = inputString; |
|
270 | 272 |
} else if (currentTag.equals("value")) { |
271 | 273 |
currentValue = inputString; |
272 | 274 |
} else if (currentTag.equals("pathexpr")) { |
... | ... | |
290 | 292 |
public String printSQL() { |
291 | 293 |
StringBuffer self = new StringBuffer(); |
292 | 294 |
|
293 |
self.append("SELECT docid,docname,doctype,doctitle,");
|
|
295 |
self.append("SELECT docid,docname,doctype,"); |
|
294 | 296 |
self.append("date_created, date_updated, rev "); |
295 | 297 |
self.append("FROM xml_documents WHERE docid IN ("); |
296 | 298 |
|
... | ... | |
492 | 494 |
{ |
493 | 495 |
StringBuffer self = new StringBuffer(); |
494 | 496 |
|
495 |
self.append("SELECT docid,docname,doctype,doctitle,");
|
|
497 |
self.append("SELECT docid,docname,doctype,"); |
|
496 | 498 |
self.append("date_created, date_updated "); |
497 | 499 |
self.append("FROM xml_documents WHERE docid IN ("); |
498 | 500 |
self.append(docid).append(")"); |
... | ... | |
504 | 506 |
* This should become a way to get the XML serialization of the query. |
505 | 507 |
*/ |
506 | 508 |
public String toString() { |
507 |
return "meta_file_id=" + meta_file_id + "\n" + |
|
508 |
"querytitle=" + querytitle + "\n" + query; |
|
509 |
return "meta_file_id=" + meta_file_id + "\n" + query; |
|
510 |
//DOCTITLE attr cleared from the db |
|
511 |
// return "meta_file_id=" + meta_file_id + "\n" + |
|
512 |
// "querytitle=" + querytitle + "\n" + query; |
|
509 | 513 |
} |
510 | 514 |
|
511 | 515 |
/** a utility class that represents a group of terms in a query */ |
src/edu/ucsb/nceas/metacat/MetacatReplication.java | ||
---|---|---|
430 | 430 |
sb.append("<documentinfo><docid>").append(docid); |
431 | 431 |
sb.append("</docid><docname>").append(doc.getDocname()); |
432 | 432 |
sb.append("</docname><doctype>").append(doc.getDoctype()); |
433 |
sb.append("</doctype><doctitle>").append(doc.getDocTitle()); |
|
434 |
sb.append("</doctitle><user_owner>").append(doc.getUserowner()); |
|
433 |
sb.append("</doctype>"); |
|
434 |
// DOCTITLE attr cleared from the db |
|
435 |
// sb.append("</doctype><doctitle>").append(doc.getDocTitle()); |
|
436 |
sb.append("<user_owner>").append(doc.getUserowner()); |
|
435 | 437 |
sb.append("</user_owner><user_updated>").append(doc.getUserupdated()); |
436 | 438 |
sb.append("</user_updated><public_access>").append(doc.getPublicaccess()); |
437 | 439 |
sb.append("</public_access><rev>").append(doc.getRev()); |
src/edu/ucsb/nceas/metacat/DBQuery.java | ||
---|---|---|
152 | 152 |
String docid = null; |
153 | 153 |
String docname = null; |
154 | 154 |
String doctype = null; |
155 |
String doctitle = null; |
|
155 |
// DOCTITLE attr cleared from the db |
|
156 |
// String doctitle = null; |
|
156 | 157 |
String createDate = null; |
157 | 158 |
String updateDate = null; |
158 | 159 |
String fieldname = null; |
... | ... | |
194 | 195 |
} |
195 | 196 |
docname = rs.getString(2); |
196 | 197 |
doctype = rs.getString(3); |
197 |
doctitle = rs.getString(4); |
|
198 |
createDate = rs.getString(5); |
|
199 |
updateDate = rs.getString(6); |
|
200 |
rev = rs.getInt(7); |
|
198 |
// DOCTITLE attr cleared from the db |
|
199 |
// doctitle = rs.getString(4); |
|
200 |
createDate = rs.getString(4); |
|
201 |
updateDate = rs.getString(5); |
|
202 |
rev = rs.getInt(6); |
|
201 | 203 |
|
202 | 204 |
//System.out.println("vec.size = " + returndocVec.size()); |
203 | 205 |
if(returndocVec.size() != 0 && !returndocVec.contains(doctype)) |
... | ... | |
244 | 246 |
docid = xmldoc.getDocID(); |
245 | 247 |
docname = xmldoc.getDocname(); |
246 | 248 |
doctype = xmldoc.getDoctype(); |
247 |
doctitle = xmldoc.getDocTitle(); |
|
249 |
// DOCTITLE attr cleared from the db |
|
250 |
// doctitle = xmldoc.getDocTitle(); |
|
248 | 251 |
createDate = xmldoc.getCreateDate(); |
249 | 252 |
updateDate = xmldoc.getUpdateDate(); |
250 | 253 |
//System.out.println("docname: " + docname + " doctype: " + doctype + |
... | ... | |
268 | 271 |
if (doctype != null) { |
269 | 272 |
document.append("<doctype>" + doctype + "</doctype>"); |
270 | 273 |
} |
271 |
if (doctitle != null) { |
|
272 |
document.append("<doctitle>" + doctitle + "</doctitle>"); |
|
273 |
} |
|
274 |
// DOCTITLE attr cleared from the db |
|
275 |
// if (doctitle != null) { |
|
276 |
// document.append("<doctitle>" + doctitle + "</doctitle>"); |
|
277 |
// } |
|
274 | 278 |
if(createDate != null) { |
275 | 279 |
document.append("<createdate>" + createDate + "</createdate>"); |
276 | 280 |
} |
... | ... | |
492 | 496 |
query.append("unspecified</meta_file_id>"); |
493 | 497 |
} |
494 | 498 |
|
495 |
query.append("<querytitle>"); |
|
496 |
if(params.containsKey("querytitle")) |
|
497 |
{ |
|
498 |
query.append(((String[])params.get("querytitle"))[0]); |
|
499 |
query.append("</querytitle>"); |
|
500 |
} |
|
501 |
else |
|
502 |
{ |
|
503 |
query.append("unspecified</querytitle>"); |
|
504 |
} |
|
499 |
// DOCTITLE attr cleared from the db |
|
500 |
// query.append("<querytitle>"); |
|
501 |
// if(params.containsKey("querytitle")) |
|
502 |
// { |
|
503 |
// query.append(((String[])params.get("querytitle"))[0]); |
|
504 |
// query.append("</querytitle>"); |
|
505 |
// } |
|
506 |
// else |
|
507 |
// { |
|
508 |
// query.append("unspecified</querytitle>"); |
|
509 |
// } |
|
505 | 510 |
|
506 | 511 |
if(params.containsKey("doctype")) |
507 | 512 |
{ |
... | ... | |
664 | 669 |
xmlquery.append("<?xml version=\"1.0\"?>\n"); |
665 | 670 |
xmlquery.append("<pathquery version=\"1.0\">"); |
666 | 671 |
xmlquery.append("<meta_file_id>Unspecified</meta_file_id>"); |
667 |
xmlquery.append("<querytitle>Unspecified</querytitle>"); |
|
672 |
// DOCTITLE attr cleared from the db |
|
673 |
// xmlquery.append("<querytitle>Unspecified</querytitle>"); |
|
668 | 674 |
|
669 | 675 |
if (!doctype.equals("any") && !doctype.equals("ANY")) { |
670 | 676 |
xmlquery.append("<returndoctype>"); |
src/edu/ucsb/nceas/metacat/DocumentImpl.java | ||
---|---|---|
523 | 523 |
this.rootnodeid = rs.getLong(3); |
524 | 524 |
// DOCTITLE attr cleared from the db |
525 | 525 |
// this.doctitle = rs.getString(4); |
526 |
this.createdate = rs.getString(5); |
|
527 |
this.updatedate = rs.getString(6); |
|
528 |
this.userowner = rs.getString(7); |
|
529 |
this.userupdated = rs.getString(8); |
|
530 |
this.serverlocation = rs.getInt(9); |
|
531 |
//this.publicaccess = rs.getInt(10); |
|
532 |
this.rev = rs.getInt(10); |
|
526 |
this.createdate = rs.getString(4); |
|
527 |
this.updatedate = rs.getString(5); |
|
528 |
this.userowner = rs.getString(6); |
|
529 |
this.userupdated = rs.getString(7); |
|
530 |
this.serverlocation = rs.getInt(8); |
|
531 |
this.rev = rs.getInt(9); |
|
533 | 532 |
} |
534 | 533 |
|
535 | 534 |
if (this.doctype != null) { |
... | ... | |
1078 | 1077 |
parser = XMLReaderFactory.createXMLReader(parserName); |
1079 | 1078 |
|
1080 | 1079 |
// Turn on validation |
1081 |
parser.setFeature("http://xml.org/sax/features/validation", false);
|
|
1080 |
parser.setFeature("http://xml.org/sax/features/validation", true);
|
|
1082 | 1081 |
// Turn off Including all external parameter entities |
1083 | 1082 |
// (the external DTD subset also) |
1084 | 1083 |
// Doesn't work well, probably the feature name is not correct |
Also available in: Unified diff
there were more mentions of DOCTITLE attr - cleared them