JAL-3949 - refactor logging from jalview.bin.Cache to jalview.bin.Console
[jalview.git] / src / jalview / io / EMBLLikeFlatFile.java
index 8fba76c..e8ce34b 100644 (file)
@@ -12,7 +12,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.TreeMap;
 
-import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.FeatureProperties;
@@ -288,7 +288,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
       int slashPos = line.indexOf('/');
       if (slashPos == -1)
       {
-        Cache.error("Unexpected EMBL line ignored: " + line);
+        Console.error("Unexpected EMBL line ignored: " + line);
         line = nextLine();
         continue;
       }
@@ -318,7 +318,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
           data.codonStart = Integer.parseInt(featureValue.trim());
         } catch (NumberFormatException e)
         {
-          Cache.error("Invalid codon_start in XML for " + this.accession
+          Console.error("Invalid codon_start in XML for " + this.accession
                   + ": " + e.getMessage());
         }
       }
@@ -354,7 +354,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
     }
     else
     {
-      Cache.error("Ignoring CDS feature with no protein_id for "
+      Console.error("Ignoring CDS feature with no protein_id for "
               + sourceDb + ":" + accession);
     }
 
@@ -379,7 +379,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
   {
     if (this.accession == null || this.sequenceString == null)
     {
-      Cache.error("Failed to parse data from EMBL");
+      Console.error("Failed to parse data from EMBL");
       return;
     }
 
@@ -581,7 +581,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
        * workaround until we handle all 'location' formats fully
        * e.g. X53828.1:60..1058 or <123..>289
        */
-      Cache.error(String.format(
+      Console.error(String.format(
               "Implementation Notice: EMBLCDS location '%s'not properly supported yet"
                       + " - Making up the CDNA region of (%s:%s)... may be incorrect",
               data.cdsLocation, sourceDb, this.accession));
@@ -591,12 +591,12 @@ public abstract class EMBLLikeFlatFile extends AlignFile
       if (peptideLength * 3 == completeCodonsLength)
       {
         // this might occur for CDS sequences where no features are marked
-        Cache.warn("Assuming no stop codon at end of cDNA fragment");
+        Console.warn("Assuming no stop codon at end of cDNA fragment");
         mappedDnaEnd = dna.getEnd();
       }
       else if ((peptideLength + 1) * 3 == completeCodonsLength)
       {
-        Cache.warn("Assuming stop codon at end of cDNA fragment");
+        Console.warn("Assuming stop codon at end of cDNA fragment");
         mappedDnaEnd = dna.getEnd() - 3;
       }
 
@@ -670,7 +670,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
       return MappingUtils.rangeListToArray(ranges);
     } catch (ParseException e)
     {
-      Cache.warn(
+      Console.warn(
               String.format("Not parsing inexact CDS location %s in ENA %s",
                       location, accession));
       return new int[] {};
@@ -715,7 +715,7 @@ public abstract class EMBLLikeFlatFile extends AlignFile
       String[] tokens = line.split(WHITESPACE);
       if (tokens.length < 2)
       {
-        Cache.error("Ignoring bad EMBL line for " + this.accession
+        Console.error("Ignoring bad EMBL line for " + this.accession
                 + ": " + line);
         break;
       }