throws DataServiceFault {
Query query;
String configId = getConfigId(queryEl);
Config config = dataService.getConfig(configId);
if (config == null) {
throw new DataServiceFault("Invalid configId: " + configId + " in :- \n" + queryEl);
}
String sourceType = config.getType();
if (DataSourceTypes.RDBMS.equals(sourceType)
|| DataSourceTypes.JNDI.equals(sourceType)
|| DataSourceTypes.CARBON.equals(sourceType)) {
query = createSQLQuery(dataService, queryEl);
} else if (DataSourceTypes.CSV.equals(sourceType)) {
query = createCSVQuery(dataService, queryEl);
} else if (DataSourceTypes.EXCEL.equals(sourceType)) {
query = createExcelQuery(dataService, queryEl);
} else if (DataSourceTypes.GDATA_SPREADSHEET.equals(sourceType)) {
query = createGSpreadQuery(dataService, queryEl);
} else if (DataSourceTypes.RDF.equals(sourceType)) {
query = createSPARQLQuery(dataService, queryEl);
} else if (DataSourceTypes.WEB.equals(sourceType)) {
query = createWebQuery(dataService, queryEl);
} else {
throw new DataServiceFault("Invalid configType: " +
sourceType + " in :- \n" + queryEl);
}
return query;
}