Changeset 33941

Show
Ignore:
Timestamp:
18.02.2020 15:18:00 (3 months ago)
Author:
ak19
Message:

1. Uppercase 3rd field (Y/N/? field) read back in from file before being written out again, in case any manual editing of the file outside the program took place. 2. Uppercase 3rd field after reading from std input, saves having to test if condition of uppercased values and ensures that what's written out is uppercase.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/maori-lang-detection/src/org/greenstone/atea/ManualURLInspection.java

    r33940 r33941  
    128128            // if(terminate) on Ctrl-D, don't stop processing csv records 
    129129            // Instead, copy remaining records of input csv file into output csv file 
    130              
     130            isReallyInMRI = isReallyInMRI.toUpperCase(); 
    131131            csvWriter.printRecord(url, countryCode, isReallyInMRI); 
    132132            csvWriter.flush(); 
     
    162162            } 
    163163            while(!done && ((isReallyInMRI = systemIn.readLine()) != null)) { 
     164             
     165            isReallyInMRI = isReallyInMRI.toUpperCase(); 
    164166             
    165167            //logger.debug("@@ Got: |" + isReallyInMRI + "|"); 
     
    176178            }            
    177179             
    178             if(isReallyInMRI.toUpperCase().equals("Y") 
    179                || isReallyInMRI.toUpperCase().equals("N") 
    180                || isReallyInMRI.equals("?")) { 
     180             
     181            if(isReallyInMRI.equals("Y") || isReallyInMRI.equals("N") || isReallyInMRI.equals("?")) { 
    181182                done = true; 
    182183                //break;