new ColumnDescription(MOONS_COLUMN, ValueType.NUMBER, "Number of Moons")
};
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
DataSourceRequest dsRequest = null;
try {
// Extract the request parameters.
dsRequest = new DataSourceRequest(req);
// NOTE: If you want to work in restricted mode, which means that only
// requests from the same domain can access the data source, you should
// uncomment the following call.
//
// DataSourceHelper.verifyAccessApproved(dsRequest);
// Split the query.
QueryPair query = DataSourceHelper.splitQuery(dsRequest.getQuery(), Capabilities.SELECT);
// Generate the data table.
DataTable data = generateMyDataTable(query.getDataSourceQuery(), req);
// Apply the completion query to the data table.
DataTable newData = DataSourceHelper.applyQuery(query.getCompletionQuery(), data,
dsRequest.getUserLocale());
DataSourceHelper.setServletResponse(newData, dsRequest, resp);
} catch (RuntimeException rte) {
log.error("A runtime exception has occured", rte);
ResponseStatus status = new ResponseStatus(StatusType.ERROR, ReasonType.INTERNAL_ERROR,