resultsLeft = resultsUnion;
}
results = resultsLeft;
}
else if ( node instanceof CQLTermNode ) {
CQLTermNode term = (CQLTermNode)node;
boolean exactMatch = term.getRelation().getBase().equals("==");
CQLRelation relation = term.getRelation();
String index = term.getIndex();
if ( index.startsWith("tb.title") ) {
results.addAll(doSearch(request, response, SearchType.byTitle, errors, term.getTerm(),exactMatch,relation));
} else if ( index.equals("tb.identifier.study") ) {
results.addAll(doSearch(request, response, SearchType.byID, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("dcterms.contributor") ) {
results.addAll(doSearch(request, response, SearchType.byAuthorName, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("dcterms.abstract") ) {
results.addAll(doSearch(request, response, SearchType.inAbstract, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("dcterms.subject") ) {
results.addAll(doSearch(request, response, SearchType.byKeyword, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("dcterms.bibliographicCitation") ) {
results.addAll(doSearch(request, response, SearchType.inCitation, errors, term.getTerm(),exactMatch,relation));
} else if ( index.equals("tb.identifier.study.tb1") ) {
results.addAll(doSearch(request, response, SearchType.byLegacyID, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("prism.publicationName") ) {
results.addAll(doSearch(request, response, SearchType.byJournal, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("dc.date") ) {
results.addAll(doSearch(request,response, SearchType.byLastModifiedDate, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("prism.creationDate") ) {
results.addAll(doSearch(request,response, SearchType.byCreationDate, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("prism.publicationDate") ) {
results.addAll(doSearch(request,response, SearchType.byPublicationDate, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("prism.modificationDate") ) {
results.addAll(doSearch(request,response, SearchType.byLastModifiedDate, errors, term.getTerm(),exactMatch,relation));
} else if ( index.startsWith("prism.doi") ) {
results.addAll(doSearch(request,response,SearchType.byDOI, errors, term.getTerm(), exactMatch,relation));
}
else {
// issue warnings
addMessage(request, "Unsupported index: " + index);
}