JAL-3383 JAL-3397 JAL-3253-applet IntervalStore options
[jalview.git] / src / jalview / io / vamsas / Sequencefeature.java
index 363f6f1..dab840e 100644 (file)
@@ -97,10 +97,8 @@ public class Sequencefeature extends Rangetype
     DataSetAnnotations dsa = (DataSetAnnotations) vobj;
     if (dsa.getSeqRefCount() != 1)
     {
-      Cache.log
-              .warn("Not binding "
-                      + dsa.getVorbaId()
-                      + " to Sequence Feature - has multiple dataset sequence references.");
+      Cache.log.warn("Not binding " + dsa.getVorbaId()
+              + " to Sequence Feature - has multiple dataset sequence references.");
       return;
     }
     jalview.datamodel.SequenceFeature sf = (jalview.datamodel.SequenceFeature) jvobj;
@@ -130,8 +128,8 @@ public class Sequencefeature extends Rangetype
     if (dsa.getSeqRefCount() != 1)
     {
       replaceJvObjMapping(feature, null);
-      Cache.log
-              .warn("Binding of annotation to jalview feature has changed. Removing binding and recreating.");
+      Cache.log.warn(
+              "Binding of annotation to jalview feature has changed. Removing binding and recreating.");
       doSync(); // re-verify bindings.
     }
     else
@@ -158,10 +156,8 @@ public class Sequencefeature extends Rangetype
     {
       // conflicting update from document - we cannot map this feature anymore.
       replaceJvObjMapping(feature, null);
-      Cache.log
-              .warn("annotation ("
-                      + dsa.getVorbaId()
-                      + " bound to jalview feature cannot be mapped. Removing binding, deleting feature, and deleting feature.");
+      Cache.log.warn("annotation (" + dsa.getVorbaId()
+              + " bound to jalview feature cannot be mapped. Removing binding, deleting feature, and deleting feature.");
       // - consider deleting the feature ?
       dsSeq.deleteFeature(feature);
       // doSync();
@@ -202,8 +198,8 @@ public class Sequencefeature extends Rangetype
     vSeg.setInclusive(true);
     if (dsa.getSegCount() > 1)
     {
-      Cache.log
-              .debug("About to destroy complex annotation in vamsas document mapped to sequence feature ("
+      Cache.log.debug(
+              "About to destroy complex annotation in vamsas document mapped to sequence feature ("
                       + dsa.getVorbaId() + ")");
     }
     dsa.setSeg(new Seg[] { vSeg });
@@ -236,7 +232,7 @@ public class Sequencefeature extends Rangetype
     if (feature.otherDetails != null)
     {
       Iterator<String> iter = feature.otherDetails.keySet().iterator();
-      Vector props = dsa.getPropertyAsReference();
+      Vector<?> props = dsa.getPropertyAsReference();
       while (iter.hasNext())
       {
         String key = iter.next();
@@ -256,7 +252,8 @@ public class Sequencefeature extends Rangetype
           else if (vlu instanceof Integer)
           {
             valid = true;
-            nprop.setType(uk.ac.vamsas.objects.utils.Properties.INTEGERTYPE);
+            nprop.setType(
+                    uk.ac.vamsas.objects.utils.Properties.INTEGERTYPE);
           }
           else if (vlu instanceof Float)
           {
@@ -293,10 +290,11 @@ public class Sequencefeature extends Rangetype
     String featureType = dseta.getType();
     if (dseta.getScoreCount() > 0)
     {
-      Enumeration scr = dseta.enumerateScore();
+      @SuppressWarnings("unchecked")
+      Enumeration<Score> scr = dseta.enumerateScore();
       while (scr.hasMoreElements())
       {
-        Score score = (Score) scr.nextElement();
+        Score score = scr.nextElement();
         if (score.getName().equals(featureType))
         {
           theScore = score.getContent();
@@ -328,10 +326,11 @@ public class Sequencefeature extends Rangetype
     }
     if (dseta.getScoreCount() > 0)
     {
-      Enumeration scr = dseta.enumerateScore();
+      @SuppressWarnings("unchecked")
+      Enumeration<Score> scr = dseta.enumerateScore();
       while (scr.hasMoreElements())
       {
-        Score score = (Score) scr.nextElement();
+        Score score = scr.nextElement();
         if (!score.getName().equals(sf.getType()))
         {
           sf.setValue(score.getName(), "" + score.getContent());
@@ -339,10 +338,11 @@ public class Sequencefeature extends Rangetype
       }
     }
     // other details
-    Enumeration props = dseta.enumerateProperty();
+    @SuppressWarnings("unchecked")
+    Enumeration<Property> props = dseta.enumerateProperty();
     while (props.hasMoreElements())
     {
-      Property p = (Property) props.nextElement();
+      Property p = props.nextElement();
       Object val = null;
       if (Properties.isValid(p))
       {