Ignore:
Timestamp:
08/13/13 11:18:07 (11 years ago)
Author:
olhsha
Message:

correction getting the list of annotation IDs, where annotations are filtered by link, text, etc. So far body is considered as a text (got from xmls list of elements, vis get(0)). NOT TESTED yet!

Getting sourceIDs of the sources referreing to a given link

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/dao/impl/JdbcSourceDao.java

    r3365 r3367  
    260260    @Override
    261261    public List<Number> getSourcesForLink(String link){
    262       String sql = "SELECT "+source_id+" FROM "+sourceTableName+ "WHERE "+link_uri+" LIKE '%"+link+"%'";
    263       List<Number> result = getSimpleJdbcTemplate().query(sql, internalIDRowMapper);
     262      StringBuilder sql = new StringBuilder("SELECT ");
     263      sql.append(source_id).append(" FROM ").append(sourceTableName).append(" WHERE ").append(link_uri).append(" LIKE '%").append(link).append("%'");
     264      List<Number> result = getSimpleJdbcTemplate().query(sql.toString(), internalIDRowMapper);
    264265      return result;
    265266    }
Note: See TracChangeset for help on using the changeset viewer.