use of org.apache.jackrabbit.webdav.search.QueryGrammerSet in project jackrabbit by apache.
the class SearchResourceImpl method getQueryGrammerSet.
//-------------------------------------------< SearchResource interface >---
/**
* @see SearchResource#getQueryGrammerSet()
*/
public QueryGrammerSet getQueryGrammerSet() {
QueryGrammerSet qgs = new QueryGrammerSet();
try {
QueryManager qMgr = getRepositorySession().getWorkspace().getQueryManager();
String[] langs = qMgr.getSupportedQueryLanguages();
for (String lang : langs) {
// Note: Existing clients already assume that the
// query languages returned in the DASL header are
// not prefixed with any namespace, so we probably
// shouldn't use an explicit namespace here.
qgs.addQueryLanguage(lang, Namespace.EMPTY_NAMESPACE);
}
} catch (RepositoryException e) {
log.debug(e.getMessage());
}
return qgs;
}
Aggregations