Project

General

Profile

« Previous | Next » 

Revision 5796

Added by berkley almost 14 years ago

fixing generateSystemMetadata

View differences:

src/edu/ucsb/nceas/metacat/dataone/CrudService.java
236 236
        for(int i=0; i<l.size(); i++)
237 237
        { //for each id, add a system metadata doc
238 238
            String localId = l.get(i);
239
            //System.out.println("Creating SystemMetadata for localId " + localId);
239
            System.out.println("Creating SystemMetadata for localId " + localId);
240 240
            //get the document
241 241
            try
242 242
            {
src/edu/ucsb/nceas/metacat/IdentifierManager.java
223 223
    {
224 224
        Vector<String> ids = new Vector<String>();
225 225
        //String sql = "select docid from identifier where guid in (select guid from systemmetadata)"; 
226
        String sql = "select docid from xml_documents where docid not " +
227
            "in (select docid from identifier where guid in (select guid from systemmetadata)) " +
228
            "and doctype not like '" + DATAONE_SM_DOCTYPE + "'";
226
        //String sql = "select docid from xml_documents where docid not " +
227
        //    "in (select docid from identifier where guid in (select guid from systemmetadata)) " +
228
        //    "and doctype not like '" + DATAONE_SM_DOCTYPE + "'";
229
        String sql = "select docid from xml_documents where docid not in " +
230
            "(select docid from systemmetadata) and (docid not in " +
231
            "(select docid from identifier where guid in (select guid from systemmetadata)))";
229 232
        DBConnection dbConn = null;
230 233
        int serialNumber = -1;
231 234
        try 
......
240 243
            while (rs.next()) 
241 244
            {
242 245
                String localid = rs.getString(1);
246
                System.out.println("id to add SM for: " + localid);
243 247
                ids.add(localid);
244 248
            } 
245 249
            stmt.close();

Also available in: Unified diff