Changeset 33515

Show
Ignore:
Timestamp:
24.09.2019 19:50:40 (3 weeks ago)
Author:
ak19
Message:

Removed an unused function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs3-extensions/maori-lang-detection/src/org/greenstone/atea/CCWETProcessor.java

    r33503 r33515  
    334334     
    335335    } 
    336     /* 
    337     public boolean isInDiscardFilter(String url) { 
    338     String discardFilterFile = "url-discard-filter.txt"; // in conf folder 
    339  
    340     try ( 
    341          BufferedReader reader = new BufferedReader(new InputStreamReader(org.greenstone.atea.CCWETProcessor.class.getClassLoader().getResourceAsStream(discardFilterFile), "UTF-8")); 
    342          ) { 
    343         String filter = null; 
    344         while((filter = reader.readLine()) != null) { 
    345         if(filter.trim().equals("")) { 
    346             continue; 
    347         } 
    348         //System.err.println("Got filter: " + filter); 
    349         if(filter.startsWith("^") && filter.endsWith("$") && url.equals(filter.substring(1, filter.length()-1))) { 
    350             System.err.println("*** Discarding url " + url + "\n\tas it MATCHES filter " + filter); 
    351         } 
    352         else if(filter.startsWith("^") && url.startsWith(filter.substring(1))) { 
    353             System.err.println("*** Discarding url " + url + "\n\tas it STARTS WITH filter " + filter); 
    354             return true; 
    355         } 
    356         else if(filter.endsWith("$") && url.endsWith(filter.substring(0, filter.length()-1))) { 
    357             System.err.println("*** Discarding url " + url + "\n\tas it ENDS WITH filter " + filter); 
    358             return true; 
    359         } 
    360         else if(url.contains(filter)) { 
    361             System.err.println("*** Discarding url " + url + "\n\tas it CONTAINS filter " + filter); 
    362             return true; 
    363         } 
    364                  
    365         } 
    366          
    367     } catch (IOException ioe) { 
    368         ioe.printStackTrace(); 
    369         System.err.println("\n@@@@@@@@@ Error reading from " + discardFilterFile); 
    370     } 
    371  
    372     return false; 
    373     }*/ 
    374336 
    375337    /** Maintain a count of all WET files processed. */