Revision 8162
Added by Jing Tao about 11 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
1438 | 1438 |
throws InvalidToken, ServiceFailure, NotAuthorized, NotImplemented, |
1439 | 1439 |
NotFound { |
1440 | 1440 |
if(engine != null && engine.equals(EnabledQueryEngines.PATHQUERYENGINE)) { |
1441 |
if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.PATHQUERYENGINE)) { |
|
1442 |
throw new NotImplemented("0000", "MNodeService.query - the query engine "+engine +" hasn't been implemented or has been disabled."); |
|
1443 |
} |
|
1441 | 1444 |
QueryEngineDescription qed = new QueryEngineDescription(); |
1442 | 1445 |
qed.setName(EnabledQueryEngines.PATHQUERYENGINE); |
1443 | 1446 |
qed.setQueryEngineVersion("1.0"); |
... | ... | |
1518 | 1521 |
//System.out.println("====== user is "+user); |
1519 | 1522 |
//System.out.println("====== groups are "+groups); |
1520 | 1523 |
if (engine != null && engine.equals(EnabledQueryEngines.PATHQUERYENGINE)) { |
1524 |
if(!EnabledQueryEngines.getInstance().isEnabled(EnabledQueryEngines.PATHQUERYENGINE)) { |
|
1525 |
throw new NotImplemented("0000", "MNodeService.query - the query engine "+engine +" hasn't been implemented or has been disabled."); |
|
1526 |
} |
|
1521 | 1527 |
try { |
1522 | 1528 |
DBQuery queryobj = new DBQuery(); |
1523 | 1529 |
|
Also available in: Unified diff
Add code to throw an exception if the pathquery is not enabled.
We also need to disable building index if the pathquery is disabled.