private void setVotableResource(final DataSetApplication datasetApp, final SimpleSpectralAccessInputParameters inputParameters,
          final ResourceModel model, final String dictionaryName) {
    
    final List<Field> fieldList = new ArrayList<Field>();
    final List<String> columnList = new ArrayList<String>();
    DatabaseRequest databaseRequest = null;

    try {
      // Get the concepts from the dictionary
      List<ColumnConceptMappingDTO> mappingList = getDicoFromConfiguration(datasetApp, dictionaryName);

      mappingList = checkRequiredMapping(mappingList, inputParameters.getVerb());

      // Get query parameters
      final DatabaseRequestParameters dbParams = setQueryParameters(datasetApp, model, inputParameters, mappingList);
      databaseRequest = DatabaseRequestFactory.getDatabaseRequest(dbParams);
      // Execute query
      databaseRequest.createRequest();

      LOG.log(Level.FINEST, "DB request: {0}", databaseRequest.getRequestAsString());
      
      //Fill the template with query status and param
      fillInfosParamAboutQuery(model);
      
      // complete data model with fields
      setFields(fieldList, columnList, mappingList);
      dataModel.put("fields", fieldList);
      dataModel.put("sqlColAlias", columnList);
      Map conceptColAlias = new HashMap();
       for (ColumnConceptMappingDTO map:mappingList) {
          conceptColAlias.put(map.getColumnAlias(), map.getConcept().getPropertyFromName("ucd").getValue());
      }
      dataModel.put("mappingColAliasConceptSql", conceptColAlias);
     
      // Complete data model with data
      final int count = (databaseRequest.getCount() > dbParams.getPaginationExtend()) ? dbParams.getPaginationExtend() : databaseRequest.getCount();
      dataModel.put("nrows", count);
      final ConverterChained converterChained = datasetApp.getConverterChained();
      
      final TemplateSequenceModel rows = new DatabaseRequestModel(databaseRequest, converterChained);
      ((DatabaseRequestModel) rows).setSize(count);
      dataModel.put("rows", rows);

    } catch (SitoolsException ex) {
      try {
        if (Util.isSet(databaseRequest)) {
          databaseRequest.close();
        }
      } catch (SitoolsException ex1) {
          LOG.log(Level.FINER, null, ex1);
      } finally {
        final List<Info> infos = new ArrayList<Info>();
        LOG.log(Level.FINEST, "ERROR: {0}", ex.getMessage());
        setVotableError(infos, "Query", "Error in query", "Error in input query: " + ex.getMessage());
        if (!infos.isEmpty()) {
          this.dataModel.put("infos", infos);
        }
      }
    }
  }