Changeset 3926


Ignore:
Timestamp:
May 11, 2016, 2:00:56 PM (5 years ago)
Author:
olle
Message:

Refs #525. INCA importer updated by removing or commenting out debug output to server log file, unless the information concerns a caught exception or other error, not reported otherwise:

  1. Java servlet class/file IncaServlet.java in src/net/sf/basedb/reggie/servlet/ updated by removing or commenting out debug output to server log file, unless the information concerns a caught exception or other error, not reported otherwise.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/servlet/IncaServlet.java

    r3925 r3926  
    214214        boolean importCheckOnly = Values.getBoolean(req.getParameter("importcheckonly"), false);
    215215        boolean simpleCheckOnly = Values.getBoolean(req.getParameter("simplecheckonly"), false);
    216 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" *** Start *** incaExportDateStr = " + incaExportDateStr + " importCheckOnly = " + importCheckOnly + " simpleCheckOnly = " + simpleCheckOnly);
     216//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" *** Start *** incaExportDateStr = " + incaExportDateStr + " importCheckOnly = " + importCheckOnly + " simpleCheckOnly = " + simpleCheckOnly);
    217217        if (!importCheckOnly)
    218218        {
     
    269269        // Get list of unprocessed data for INCA file
    270270        List<UnprocessedIncaFile> unprocIncaFiles = fetchUnprocessedIncaFiles(req);
    271 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Data for " + unprocIncaFiles.size() + " files read.");
     271//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Data for " + unprocIncaFiles.size() + " files read.");
    272272        // Get first file in list
    273273        UnprocessedIncaFile unprocIncaFile = null;
     
    425425        if (!simpleCheckOnly)
    426426        {
    427 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" potentialIncaImportLines.size() = " + potentialIncaImportLines.size());
     427//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" potentialIncaImportLines.size() = " + potentialIncaImportLines.size());
    428428          // Perform mapping of potential INCA import lines to database
    429429          LineDatabaseMappingResult lineDatabaseMappingResult = lineDatabaseMapping(dc, potentialIncaImportLines, pnoBioSourceIdHM, incaLateralityHM, excludeLineList, importHeaderIndexList, headerList, incaAnnoNameAnnoTypeHM, progress, progressTestFraction, progressOffset);
     
    466466          int numDataLinesForImport = rawIncaCases.size();
    467467          jsonIncaFileProp.put("numDataLinesForImport", numDataLinesForImport);
    468 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Case mapping done: numDataLinesForImport = " + numDataLinesForImport);
     468//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Case mapping done: numDataLinesForImport = " + numDataLinesForImport);
    469469
    470470          // Store data for processed INCA file in IncaFile object
     
    497497        }
    498498        int numMissingIncaHeaders = missingIncaHeadersList.size();
    499 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" numMissingIncaHeaders = " + numMissingIncaHeaders);
     499//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" numMissingIncaHeaders = " + numMissingIncaHeaders);
    500500
    501501        //
     
    520520            List<Integer> fileHeaderIndexList = incaFile.getHeaderIndexList();
    521521            List<RawIncaCase> rawIncaCases = incaFile.getRawIncaCases();
    522 //System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" fileNo = " + fileNo + " rawIncaCases.size() = " + rawIncaCases.size());
    523522
    524523            // Process data for file
     
    601600            }
    602601          }
    603 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" importCaseIdList.size() = " + importCaseIdList.size() + " incaCaseList.size() = " + incaCaseList.size());
     602//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" importCaseIdList.size() = " + importCaseIdList.size() + " incaCaseList.size() = " + incaCaseList.size());
    604603
    605604          //
    606605          // Perform import
    607606          //
    608 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Calling dc.commit() without any changes having been made");
    609607          dc.commit();
    610608          // Get new DbControl for use with AnnotationBatcher
     
    641639          // Add list of annotation types to be used by batcher
    642640          batcher.addAnnotationTypes(batcherAnnoTypeList);
    643 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Annotation types added to batcher");
     641//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Annotation types added to batcher");
    644642          for (int caseIndex = 0; caseIndex < incaCaseList.size(); caseIndex++)
    645643          {
     
    730728          int numDataLinesForImport = rawIncaCases.size();
    731729
    732 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Import: numEntriesChangedInExportImportDates = " + numEntriesChangedInExportImportDates + " Calling dc.commit()");
     730//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Import: numEntriesChangedInExportImportDates = " + numEntriesChangedInExportImportDates + " Calling dc.commit()");
    733731          dc.commit();
    734732          message = "" + numIncaAnnotationsChanged + " INCA annotations updated for " + numEntriesChanged + " cases from " + numDataLinesForImport + " lines from one file.";
    735733          message += " " + numIncaExportImportDateAnnotationsChanged + " INCA date annotations updated for " + numEntriesChangedInExportImportDates + " cases.";
    736 System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Import: message = " + message);
     734//System.out.println(new Date() + " doPost(): cmd = \"" + cmd + "\" Import: message = " + message);
    737735          jsonMessages.add(message);
    738736          // Progress reporting
     
    956954      }
    957955    }
    958 System.out.println(new Date() + " fetchPersonalNumberBioSourceIdHashMap(): bioSourceList.size() = " + bioSourceList.size() + " pnoBioSourceIdHM.size() = " + pnoBioSourceIdHM.size());
     956//System.out.println(new Date() + " fetchPersonalNumberBioSourceIdHashMap(): bioSourceList.size() = " + bioSourceList.size() + " pnoBioSourceIdHM.size() = " + pnoBioSourceIdHM.size());
    959957    return pnoBioSourceIdHM;
    960958  }
     
    13101308            catch (Exception e)
    13111309            {                 
    1312 System.out.println(new Date() + " lineDatabaseMapping(): i = " + i + " patID = " + tempPatientId + " ##### BAD VALUE: annotationTypeName = " + at.getName() + " j = " + j + " annoValueType = " + annoValueType + " valueStr = " + valueStr + " Exception e: " + e);
    13131310              badValueFound = true;
    13141311              // Store info on offending value
     
    13311328                if (intValue != null && !enumValueList.contains(intValue))
    13321329                {                         
    1333 System.out.println(new Date() + " lineDatabaseMapping(): i = " + i + " patID = " + tempPatientId + " ##### BAD VALUE: annotationTypeName = " + at.getName() + " j = " + j + " annoValueType = " + annoValueType + " valueStr = " + valueStr + " intValue = " + intValue + " enumValueList = " + enumValueList);
    13341330                  badValueFound = true;
    13351331                  // Store info on offending value
     
    13621358        }
    13631359      }
     1360/*
    13641361      if (i % 1000 == 0)
    13651362      {
    13661363System.out.println(new Date() + " lineDatabaseMapping(): i = " + i + " excludeLineList.size() = " + excludeLineList.size());
    13671364      }
     1365*/
    13681366      // Progress reporting
    13691367      localProgressFraction = (float)i/numLines;
Note: See TracChangeset for help on using the changeset viewer.