use of org.jaxrx.core.JaxRxException in project sirix by sirixdb.
the class SirixMediator method query.
@Override
public StreamingOutput query(final String query, final ResourcePath path) throws JaxRxException {
StreamingOutput response;
final int depth = path.getDepth();
switch(depth) {
case 1:
response = database.performQueryOnResource(path.getResourcePath(), query, path.getQueryParameter());
break;
case 2:
response = nodeIdResource.performQueryOnResource(path.getResource(0), Long.valueOf(path.getResource(1)), query, path.getQueryParameter());
break;
default:
throw new JaxRxException(405, NOTALLOWEDSTRING);
}
return response;
}
Aggregations