JAL-3949 - refactor logging from jalview.bin.Cache to jalview.bin.Console
[jalview.git] / src / jalview / io / vamsas / DatastoreItem.java
index e20f51e..a65e775 100644 (file)
@@ -25,7 +25,7 @@ import java.util.Hashtable;
 import java.util.IdentityHashMap;
 import java.util.Vector;
 
-import jalview.bin.Cache;
+import jalview.bin.Console;
 import jalview.io.VamsasAppDatastore;
 import jalview.log.JLoggerLog4j;
 import jalview.util.MessageManager;
@@ -74,9 +74,9 @@ public abstract class DatastoreItem
     {
       return cdoc.getObject((VorbaId) jv2vobj.get(jvobj));
     }
-    if (Cache.isDebugEnabled())
+    if (Console.isDebugEnabled())
     {
-      Cache.debug(
+      Console.debug(
               "Returning null VorbaID binding for jalview object " + jvobj);
     }
     return null;
@@ -95,7 +95,7 @@ public abstract class DatastoreItem
     if (id == null)
     {
       id = cdoc.registerObject(vobj);
-      Cache.debug(
+      Console.debug(
               "Registering new object and returning null for getvObj2jv");
       return null;
     }
@@ -122,7 +122,7 @@ public abstract class DatastoreItem
       if (id == null || vobj.getVorbaId() == null
               || cdoc.getObject(id) != vobj)
       {
-        Cache.error("Failed to get id for "
+        Console.error("Failed to get id for "
                 + (vobj.isRegisterable() ? "registerable"
                         : "unregisterable")
                 + " object " + vobj);
@@ -131,7 +131,7 @@ public abstract class DatastoreItem
     if (vobj2jv.containsKey(vobj.getVorbaId())
             && !(vobj2jv.get(vobj.getVorbaId())).equals(jvobj))
     {
-      Cache.debug(
+      Console.debug(
               "Warning? Overwriting existing vamsas id binding for "
                       + vobj.getVorbaId(),
               new Exception(MessageManager.getString(
@@ -140,7 +140,7 @@ public abstract class DatastoreItem
     else if (jv2vobj.containsKey(jvobj)
             && !((VorbaId) jv2vobj.get(jvobj)).equals(vobj.getVorbaId()))
     {
-      Cache.debug(
+      Console.debug(
               "Warning? Overwriting existing jalview object binding for "
                       + jvobj,
               new Exception(MessageManager.getString(
@@ -153,7 +153,7 @@ public abstract class DatastoreItem
      * bindjvvobj")); }
      */
     // we just update the hash's regardless!
-    Cache.debug("Binding " + vobj.getVorbaId() + " to " + jvobj);
+    Console.debug("Binding " + vobj.getVorbaId() + " to " + jvobj);
     vobj2jv.put(vobj.getVorbaId(), jvobj);
     // JBPNote - better implementing a hybrid invertible hash.
     jv2vobj.put(jvobj, vobj.getVorbaId());
@@ -171,7 +171,7 @@ public abstract class DatastoreItem
   {
     if (this.jvobj != null && this.vobj != null)
     {
-      Cache.debug("updating dsobj registry. (" + this.getClass().getName()
+      Console.debug("updating dsobj registry. (" + this.getClass().getName()
               + ")");
     }
     this.jvobj = jvobj;