JAL-1807 explicit imports (jalview.io.*)
[jalview.git] / src / jalview / io / VamsasAppDatastore.java
index 7df7cb2..7608e51 100644 (file)
@@ -23,6 +23,7 @@ package jalview.io;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
 import jalview.datamodel.GraphLine;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
@@ -33,6 +34,7 @@ import jalview.io.vamsas.Datasetsequence;
 import jalview.io.vamsas.DatastoreItem;
 import jalview.io.vamsas.DatastoreRegistry;
 import jalview.io.vamsas.Rangetype;
+import jalview.util.MapList;
 import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 
@@ -285,8 +287,8 @@ public class VamsasAppDatastore
   {
     try
     {
-      jalview.datamodel.AlignmentI jal = av.getAlignment();
-      jalview.datamodel.AlignmentI jds = jal.getDataset();
+      AlignmentI jal = av.getAlignment();
+      AlignmentI jds = jal.getDataset();
       boolean nw = false;
       VAMSAS root = null; // will be resolved based on Dataset Parent.
       // /////////////////////////////////////////
@@ -538,7 +540,7 @@ public class VamsasAppDatastore
       // SAVE ANNOTATIONS
       if (jal.getAlignmentAnnotation() != null)
       {
-        jalview.datamodel.AlignmentAnnotation[] aa = jal
+        AlignmentAnnotation[] aa = jal
                 .getAlignmentAnnotation();
         java.util.HashMap AlSeqMaps = new HashMap(); // stores int maps from
         // alignment columns to
@@ -667,7 +669,7 @@ public class VamsasAppDatastore
               }
               setAnnotationType(an, aa[i]);
 
-              if (aa[i].graph != jalview.datamodel.AlignmentAnnotation.NO_GRAPH)
+              if (aa[i].graph != AlignmentAnnotation.NO_GRAPH)
               {
                 an.setGraph(true);
                 an.setGroup(Integer.toString(aa[i].graphGroup));
@@ -1041,7 +1043,7 @@ public class VamsasAppDatastore
       // of
       // utf8
       // translation
-      if (alan.graph != jalview.datamodel.AlignmentAnnotation.NO_GRAPH)
+      if (alan.graph != AlignmentAnnotation.NO_GRAPH)
       {
         ae.addValue(alan.annotations[a].value);
       }
@@ -1323,7 +1325,7 @@ public class VamsasAppDatastore
               @Override
               public JarInputStream getJarInputStream() throws IOException
               {
-                jalview.bin.Cache.log
+                Cache.log
                         .debug("Returning client input stream for Jalview from Vamsas Document.");
                 return new JarInputStream(cappdata.getClientInputStream());
               }
@@ -1371,7 +1373,7 @@ public class VamsasAppDatastore
             @Override
             public JarInputStream getJarInputStream() throws IOException
             {
-              jalview.bin.Cache.log
+              Cache.log
                       .debug("Returning user input stream for Jalview from Vamsas Document.");
               return new JarInputStream(cappdata.getUserInputStream());
             }
@@ -1532,14 +1534,14 @@ public class VamsasAppDatastore
       } catch (Exception e)
       {
         // TODO raise GUI warning if user requests it.
-        jalview.bin.Cache.log
+        Cache.log
                 .error("Couldn't update jalview client application data. Giving up - local settings probably lost.",
                         e);
       }
     }
     else
     {
-      jalview.bin.Cache.log
+      Cache.log
               .error("Couldn't access client application data for vamsas session. This is probably a vamsas client bug.");
     }
   }
@@ -1668,7 +1670,7 @@ public class VamsasAppDatastore
               // annotations
               if (dsSeq == null)
               {
-                jalview.bin.Cache.log
+                Cache.log
                         .warn("Couldn't resolve jalview sequenceI for dataset object reference "
                                 + ((Vobject) dataset.getDataSetAnnotations(
                                         dsa).getSeqRef(0)).getVorbaId()
@@ -1711,7 +1713,7 @@ public class VamsasAppDatastore
             // TODO check this handles multiple views properly
             AlignmentViewport av = findViewport(alignment);
 
-            jalview.datamodel.AlignmentI jal = null;
+            AlignmentI jal = null;
             if (av != null)
             {
               // TODO check that correct alignment object is retrieved when
@@ -1753,7 +1755,7 @@ public class VamsasAppDatastore
                         .getAlignmentSequenceAnnotation();
                 for (int a = 0; a < vasannot.length; a++)
                 {
-                  jalview.datamodel.AlignmentAnnotation asa = (jalview.datamodel.AlignmentAnnotation) getvObj2jv(vasannot[a]); // TODO:
+                  AlignmentAnnotation asa = (AlignmentAnnotation) getvObj2jv(vasannot[a]); // TODO:
                   // 1:many
                   // jalview
                   // alignment
@@ -1839,7 +1841,7 @@ public class VamsasAppDatastore
 
               for (int j = 0; j < an.length; j++)
               {
-                jalview.datamodel.AlignmentAnnotation jan = (jalview.datamodel.AlignmentAnnotation) getvObj2jv(an[j]);
+                AlignmentAnnotation jan = (AlignmentAnnotation) getvObj2jv(an[j]);
                 if (jan != null)
                 {
                   // update or stay the same.
@@ -2185,8 +2187,8 @@ public class VamsasAppDatastore
    * @param annotation
    * @return unbound jalview alignment annotation object.
    */
-  private jalview.datamodel.AlignmentAnnotation getjAlignmentAnnotation(
-          jalview.datamodel.AlignmentI jal,
+  private AlignmentAnnotation getjAlignmentAnnotation(
+          AlignmentI jal,
           uk.ac.vamsas.objects.core.RangeAnnotation annotation)
   {
     if (annotation == null)
@@ -2255,7 +2257,7 @@ public class VamsasAppDatastore
         }
       }
     }
-    jalview.datamodel.AlignmentAnnotation jan = null;
+    AlignmentAnnotation jan = null;
     if (a_label == null || a_label.length() == 0)
     {
       a_label = annotation.getType();
@@ -2297,14 +2299,14 @@ public class VamsasAppDatastore
       {
         if (type == 0)
         {
-          type = jalview.datamodel.AlignmentAnnotation.BAR_GRAPH; // default
+          type = AlignmentAnnotation.BAR_GRAPH; // default
           // type of
           // value
           // annotation
           if (has[HASHPHOB])
           {
             // no hints - so we ensure HPHOB display is like this.
-            type = jalview.datamodel.AlignmentAnnotation.BAR_GRAPH;
+            type = AlignmentAnnotation.BAR_GRAPH;
           }
         }
         // make bounds and automatic description strings for jalview user's
@@ -2376,7 +2378,7 @@ public class VamsasAppDatastore
             }
           }
         }
-        jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr,
+        jan = new AlignmentAnnotation(a_label, a_descr,
                 arow, min, max, type);
       }
       else
@@ -2388,7 +2390,7 @@ public class VamsasAppDatastore
           // width - if it is not complete, then mark regions on the annotation
           // row.
         }
-        jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr,
+        jan = new AlignmentAnnotation(a_label, a_descr,
                 arow);
         jan.setThreshold(null);
         jan.annotationId = annotation.getVorbaId().toString(); // keep all the
@@ -2551,17 +2553,17 @@ public class VamsasAppDatastore
    * @param default unit for mapped
    * @return MapList
    */
-  private jalview.util.MapList parsemapType(MapType maprange, int localu,
+  private MapList parsemapType(MapType maprange, int localu,
           int mappedu)
   {
-    jalview.util.MapList ml = null;
+    MapList ml = null;
     int[] localRange = getMapping(maprange.getLocal());
     int[] mappedRange = getMapping(maprange.getMapped());
     long lu = maprange.getLocal().hasUnit() ? maprange.getLocal().getUnit()
             : localu;
     long mu = maprange.getMapped().hasUnit() ? maprange.getMapped()
             .getUnit() : mappedu;
-    ml = new jalview.util.MapList(localRange, mappedRange, (int) lu,
+    ml = new MapList(localRange, mappedRange, (int) lu,
             (int) mu);
     return ml;
   }
@@ -2590,7 +2592,7 @@ public class VamsasAppDatastore
    * @param ml
    * @param setUnits
    */
-  private void initMapType(MapType maprange, jalview.util.MapList ml,
+  private void initMapType(MapType maprange, MapList ml,
           boolean setUnits)
   {
     maprange.setLocal(new Local());
@@ -2707,7 +2709,7 @@ public class VamsasAppDatastore
     AlignmentViewport av = viewport;
     try
     {
-      jalview.datamodel.AlignmentI jal = av.getAlignment();
+      AlignmentI jal = av.getAlignment();
       // /////////////////////////////////////////
       // SAVE THE DATASET
       DataSet dataset = null;