Search in sources :

Example 1 with OWLOntology

use of org.nextprot.api.rdf.domain.OWLOntology in project nextprot-api by calipho-sib.

the class SchemaDaoImpl method findAllOntology.

@Override
public List<OWLOntology> findAllOntology() {
    SqlParameterSource params = new MapSqlParameterSource();
    List<OWLOntology> ontologies = new NamedParameterJdbcTemplate(dsLocator.getDataSource()).query(sqlDictionary.getSQLQuery("schema-ontology-list"), params, new ParameterizedRowMapper<OWLOntology>() {

        @Override
        public OWLOntology mapRow(ResultSet resultSet, int row) throws SQLException {
            OWLOntology ontology = new OWLOntology();
            ontology.setOntology(resultSet.getString("ontology"));
            ontology.setDescription(resultSet.getString("description"));
            ontology.setName(resultSet.getString("name"));
            return ontology;
        }
    });
    return ontologies;
}
Also used : MapSqlParameterSource(org.springframework.jdbc.core.namedparam.MapSqlParameterSource) SqlParameterSource(org.springframework.jdbc.core.namedparam.SqlParameterSource) MapSqlParameterSource(org.springframework.jdbc.core.namedparam.MapSqlParameterSource) NamedParameterJdbcTemplate(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate) SQLException(java.sql.SQLException) OWLOntology(org.nextprot.api.rdf.domain.OWLOntology) ResultSet(java.sql.ResultSet)

Aggregations

ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 OWLOntology (org.nextprot.api.rdf.domain.OWLOntology)1 MapSqlParameterSource (org.springframework.jdbc.core.namedparam.MapSqlParameterSource)1 NamedParameterJdbcTemplate (org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate)1 SqlParameterSource (org.springframework.jdbc.core.namedparam.SqlParameterSource)1