Revision 744
Added by Matt Jones almost 23 years ago
DBQuery.java | ||
---|---|---|
555 | 555 |
StringBuffer query = new StringBuffer(); |
556 | 556 |
Enumeration elements; |
557 | 557 |
Enumeration keys; |
558 |
String doctype = null; |
|
559 | 558 |
String filterDoctype = null; |
560 | 559 |
String casesensitive = null; |
561 | 560 |
String searchmode = null; |
... | ... | |
574 | 573 |
|
575 | 574 |
if (params.containsKey("returndoctype")) |
576 | 575 |
{ |
577 |
doctype = ((String[])params.get("returndoctype"))[0]; |
|
576 |
String[] returnDoctypes = ((String[])params.get("returndoctype")); |
|
577 |
for(int i=0; i<returnDoctypes.length; i++) |
|
578 |
{ |
|
579 |
String doctype = (String)returnDoctypes[i]; |
|
580 |
|
|
581 |
if (!doctype.equals("any") && |
|
582 |
!doctype.equals("ANY") && |
|
583 |
!doctype.equals("") ) |
|
584 |
{ |
|
585 |
query.append("<returndoctype>").append(doctype); |
|
586 |
query.append("</returndoctype>"); |
|
587 |
} |
|
588 |
} |
|
578 | 589 |
} |
579 |
else |
|
580 |
{ |
|
581 |
doctype = "ANY"; |
|
582 |
} |
|
583 |
|
|
590 |
|
|
584 | 591 |
if (params.containsKey("filterdoctype")) |
585 | 592 |
{ |
586 | 593 |
String[] filterDoctypes = ((String[])params.get("filterdoctype")); |
... | ... | |
621 | 628 |
} |
622 | 629 |
} |
623 | 630 |
|
624 |
// back trace to doctype |
|
625 |
if (!doctype.equals("any") && |
|
626 |
!doctype.equals("ANY") && |
|
627 |
!doctype.equals("") ) |
|
628 |
{ |
|
629 |
query.append("<returndoctype>"); |
|
630 |
query.append(doctype).append("</returndoctype>"); |
|
631 |
} |
|
632 |
|
|
633 | 631 |
//allows the dynamic switching of boolean operators |
634 | 632 |
if (params.containsKey("operator")) |
635 | 633 |
{ |
Also available in: Unified diff
Added ability to process multiple "returndoc" elements in
a pathquery document. Now, any query hit will be back traced to an
associated package if that package is listed in one of the
"returndoctype" elements.