use of org.nextprot.api.rdf.domain.OWLDatabase in project nextprot-api by calipho-sib.
the class SchemaDaoImpl method findAllDatabase.
@Override
public List<OWLDatabase> findAllDatabase() {
SqlParameterSource params = new MapSqlParameterSource();
List<OWLDatabase> databases = new NamedParameterJdbcTemplate(dsLocator.getDataSource()).query(sqlDictionary.getSQLQuery("schema-database-list"), params, new ParameterizedRowMapper<OWLDatabase>() {
@Override
public OWLDatabase mapRow(ResultSet resultSet, int row) throws SQLException {
OWLDatabase database = new OWLDatabase();
database.setName(resultSet.getString("name"));
database.setDescription(resultSet.getString("description"));
database.setURL(resultSet.getString("url"));
database.setCategory(resultSet.getString("category"));
return database;
}
});
return databases;
}
use of org.nextprot.api.rdf.domain.OWLDatabase in project nextprot-api by calipho-sib.
the class SchemaDaoImpl method findAllProvenance.
/**
* same as findAllDatabase() union identifier type names as pseudo database name
*/
@Override
public List<OWLDatabase> findAllProvenance() {
SqlParameterSource params = new MapSqlParameterSource();
List<OWLDatabase> databases = new NamedParameterJdbcTemplate(dsLocator.getDataSource()).query(sqlDictionary.getSQLQuery("schema-provenance-list"), params, new ParameterizedRowMapper<OWLDatabase>() {
@Override
public OWLDatabase mapRow(ResultSet resultSet, int row) throws SQLException {
OWLDatabase database = new OWLDatabase();
database.setName(resultSet.getString("name"));
database.setDescription(resultSet.getString("description"));
database.setURL(resultSet.getString("url"));
database.setCategory(resultSet.getString("category"));
return database;
}
});
return databases;
}
Aggregations