Ignore:
Timestamp:
2005-05-16T11:02:50+12:00 (19 years ago)
Author:
kjdon
Message:

merged from branch ant-install-branch: merge 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/metadata/METSStructureSet.java

    r8742 r9874  
    1010
    1111import java.sql.SQLException;
     12import java.sql.Statement;
    1213import java.sql.ResultSet;
    1314
     
    157158    GS3SQLWhereItem whereItem = new GS3SQLWhereItem("DocID", "=", document.getID().toString());
    158159    select.setWhere(new GS3SQLWhere(whereItem));
    159     connection.execute(select.toString());
    160 
     160   
    161161    // start going through the matching metadata blocks
    162162    try {
    163         ResultSet resultSet = connection.getResultSet();
    164         resultSet.first();
    165         do {
    166         METSStructure structure = METSStructure.readSQL(document, connection, resultSet);
    167         if (structure != null) {
    168             set.addStructure(structure);
    169         }
    170         } while (resultSet.next());
     163        Statement statement = connection.createStatement();
     164        ResultSet resultSet = statement.executeQuery(select.toString());
     165        if (resultSet.first()) {
     166        do {
     167            METSStructure structure = METSStructure.readSQL(document, connection, resultSet);
     168            if (structure != null) {
     169            set.addStructure(structure);
     170            }
     171        } while (resultSet.next());
     172        }
     173        statement.close();
    171174    }
    172175    catch (SQLException sqlEx) {
    173         System.out.println(sqlEx);
     176        System.err.println("METSStructureSet.readSQL(): "+sqlEx);
    174177        System.exit(1);
    175178    }
Note: See TracChangeset for help on using the changeset viewer.