Revision 899
Added by berkley over 22 years ago
QuerySpecification.java | ||
---|---|---|
30 | 30 |
|
31 | 31 |
package edu.ucsb.nceas.metacat; |
32 | 32 |
|
33 |
import edu.ucsb.nceas.dbadapter.*; |
|
34 |
|
|
33 | 35 |
import java.io.*; |
34 | 36 |
import java.util.Stack; |
35 | 37 |
import java.util.Vector; |
... | ... | |
76 | 78 |
private String currentPathexpr; |
77 | 79 |
private String parserName = null; |
78 | 80 |
private String accNumberSeparator = null; |
81 |
private static final AbstractDatabase dbAdapter = MetaCatUtil.dbAdapter; |
|
79 | 82 |
|
83 |
|
|
80 | 84 |
/** |
81 | 85 |
* construct an instance of the QuerySpecification class |
82 | 86 |
* |
... | ... | |
558 | 562 |
self.append("xml_nodes x, xml_nodes y, xml_nodes z "); |
559 | 563 |
self.append("where s.parentnodeid = rel.parentnodeid "); |
560 | 564 |
self.append("and rel.parentnodeid = o.parentnodeid "); |
561 |
self.append("and x.parentnodeid in rel.nodeid ");
|
|
562 |
self.append("and y.parentnodeid in o.nodeid ");
|
|
563 |
self.append("and z.parentnodeid in s.nodeid ");
|
|
565 |
self.append("and x.parentnodeid in (rel.nodeid) ");
|
|
566 |
self.append("and y.parentnodeid in (o.nodeid) ");
|
|
567 |
self.append("and z.parentnodeid in (s.nodeid) ");
|
|
564 | 568 |
//self.append("and z.nodedata like '%"); |
565 | 569 |
//self.append(docid); |
566 | 570 |
//self.append("%'"); |
... | ... | |
585 | 589 |
self.append("xml_nodes x, xml_nodes y, xml_nodes z "); |
586 | 590 |
self.append("where s.parentnodeid = rel.parentnodeid "); |
587 | 591 |
self.append("and rel.parentnodeid = o.parentnodeid "); |
588 |
self.append("and x.parentnodeid in rel.nodeid ");
|
|
589 |
self.append("and y.parentnodeid in o.nodeid ");
|
|
590 |
self.append("and z.parentnodeid in s.nodeid ");
|
|
592 |
self.append("and x.parentnodeid in (rel.nodeid) ");
|
|
593 |
self.append("and y.parentnodeid in (o.nodeid) ");
|
|
594 |
self.append("and z.parentnodeid in (s.nodeid) ");
|
|
591 | 595 |
self.append("and z.docid like '").append(docid).append("'"); |
592 | 596 |
|
593 | 597 |
return self.toString(); |
... | ... | |
612 | 616 |
self.append("xml_nodes x, xml_nodes y, xml_nodes z "); |
613 | 617 |
self.append("where s.parentnodeid = rel.parentnodeid "); |
614 | 618 |
self.append("and rel.parentnodeid = o.parentnodeid "); |
615 |
self.append("and x.parentnodeid in rel.nodeid ");
|
|
616 |
self.append("and y.parentnodeid in o.nodeid ");
|
|
617 |
self.append("and z.parentnodeid in s.nodeid ");
|
|
619 |
self.append("and x.parentnodeid in (rel.nodeid) ");
|
|
620 |
self.append("and y.parentnodeid in (o.nodeid) ");
|
|
621 |
self.append("and z.parentnodeid in (s.nodeid) ");
|
|
618 | 622 |
self.append("and (z.nodedata like '"); |
619 | 623 |
self.append(subDocidURL); |
620 | 624 |
self.append("' or y.nodedata like '"); |
Also available in: Unified diff
made a ton of changes related to keeping oracle SQL code out of the main classes. fixed a bug where the timing of the index thread was off so when it went to index a document, the document was not already in xml_documents thus breaking the FK relation between xml_documents and xml_index. I think that bug might be the reason for the blank resultset screens in morpho. made the postgres implementation much more robust.