306 |
306 |
self.append("xml_nodes B where A.nodeid = B.parentnodeid ");
|
307 |
307 |
self.append("and B.nodeid in ");
|
308 |
308 |
self.append("(select distinct nodeid from xml_nodes where parentnodeid in ");
|
309 |
|
self.append("(select nodeid from xml_index where UPPER(path) like '");
|
|
309 |
self.append("(select nodeid from xml_index where path like '");
|
310 |
310 |
boolean firstfield = true;
|
311 |
311 |
//put the returnfields into the query
|
312 |
312 |
//the for loop allows for multiple fields
|
... | ... | |
315 |
315 |
if(firstfield)
|
316 |
316 |
{
|
317 |
317 |
firstfield = false;
|
318 |
|
self.append(((String)returnFieldList.elementAt(i)).toUpperCase());
|
|
318 |
self.append((String)returnFieldList.elementAt(i));
|
319 |
319 |
self.append("' ");
|
320 |
320 |
}
|
321 |
321 |
else
|
322 |
322 |
{
|
323 |
|
self.append("or UPPER(path) like '");
|
324 |
|
self.append(((String)returnFieldList.elementAt(i)).toUpperCase());
|
|
323 |
self.append("or path like '");
|
|
324 |
self.append((String)returnFieldList.elementAt(i));
|
325 |
325 |
self.append("' ");
|
326 |
326 |
}
|
327 |
327 |
}
|
... | ... | |
330 |
330 |
self.append(query.printSQL());
|
331 |
331 |
self.append(")");
|
332 |
332 |
self.append(" AND B.nodetype = 'TEXT'");
|
333 |
|
|
|
333 |
|
334 |
334 |
return self.toString();
|
335 |
335 |
}
|
336 |
336 |
|
... | ... | |
557 |
557 |
|
558 |
558 |
/**
|
559 |
559 |
* '$Log$
|
|
560 |
* 'Revision 1.12 2000/08/23 17:29:05 berkley
|
|
561 |
* 'added support for the returnfield parameter
|
|
562 |
* '-QuerySpecification now sets a flag (containsExtendedSQL) when there are returnfield items in the pathquery document.
|
|
563 |
* 'the accessor method containsExtendedSQL() can be called by other classes to check for extended return parameters
|
|
564 |
* '-getReturnFields returns a Vector of the names of each specified return field.
|
|
565 |
* '-printExtendedSQL returns a string of the extra SQL statements required for the query.
|
|
566 |
* '
|
|
567 |
* '-a calling class should first check containsExtendedSQL to make sure that there are extra fields being returned, then call printExtendedSQL to
|
|
568 |
* 'insert the extra SQL into the query. (Note that this is how DBQuery implements this.)
|
|
569 |
* '
|
560 |
570 |
* 'Revision 1.11 2000/08/14 20:53:34 jones
|
561 |
571 |
* 'Added "release" keyword to all metacat source files so that the release
|
562 |
572 |
* 'number will be evident in software distributions.
|
changed the field names to be case-sensitive in the returnfields