JAL-3210 Barebones gradle/buildship/eclipse. See README
[jalview.git] / src / jalview / ws / sifts / SiftsClient.java
index bf4d970..d065666 100644 (file)
@@ -82,22 +82,6 @@ public class SiftsClient implements SiftsClientI
    */
   private static File mockSiftsFile;
 
-  private static final int BUFFER_SIZE = 4096;
-
-  public static final int UNASSIGNED = Integer.MIN_VALUE;
-
-  private static final int PDB_RES_POS = 0;
-
-  private static final int PDB_ATOM_POS = 1;
-
-  private static final int PDBE_POS = 2;
-
-  private static final String NOT_OBSERVED = "Not_Observed";
-
-  protected static final String SIFTS_FTP_BASE_URL = "http://ftp.ebi.ac.uk/pub/databases/msd/sifts/xml/";
-
-  protected final static String NEWLINE = System.lineSeparator();
-
   private Entry siftsEntry;
 
   private StructureFile pdb;
@@ -116,6 +100,22 @@ public class SiftsClient implements SiftsClientI
    */
   private jalview.datamodel.Mapping seqFromPdbMapping;
 
+  private static final int BUFFER_SIZE = 4096;
+
+  public static final int UNASSIGNED = Integer.MIN_VALUE;
+
+  private static final int PDB_RES_POS = 0;
+
+  private static final int PDB_ATOM_POS = 1;
+
+  private static final int PDBE_POS = 2;
+
+  private static final String NOT_OBSERVED = "Not_Observed";
+
+  private static final String SIFTS_FTP_BASE_URL = "http://ftp.ebi.ac.uk/pub/databases/msd/sifts/xml/";
+
+  private final static String NEWLINE = System.lineSeparator();
+
   private String curSourceDBRef;
 
   private HashSet<String> curDBRefAccessionIdsString;
@@ -400,7 +400,7 @@ public class SiftsClient implements SiftsClientI
   @Override
   public HashSet<String> getAllMappingAccession()
   {
-    HashSet<String> accessions = new HashSet<>();
+    HashSet<String> accessions = new HashSet<String>();
     List<Entity> entities = siftsEntry.getEntity();
     for (Entity entity : entities)
     {
@@ -467,7 +467,7 @@ public class SiftsClient implements SiftsClientI
     entity = getEntityById(entityId);
     String originalSeq = AlignSeq.extractGaps(
             jalview.util.Comparison.GapChars, seq.getSequenceAsString());
-    HashMap<Integer, int[]> mapping = new HashMap<>();
+    HashMap<Integer, int[]> mapping = new HashMap<Integer, int[]>();
     DBRefEntryI sourceDBRef;
     sourceDBRef = getValidSourceDBRef(seq);
     // TODO ensure sequence start/end is in the same coordinate system and
@@ -479,7 +479,7 @@ public class SiftsClient implements SiftsClientI
       seqCoordSys = CoordinateSys.PDB;
     }
 
-    HashSet<String> dbRefAccessionIdsString = new HashSet<>();
+    HashSet<String> dbRefAccessionIdsString = new HashSet<String>();
     for (DBRefEntry dbref : seq.getDBRefs())
     {
       dbRefAccessionIdsString.add(dbref.getAccessionId().toLowerCase());
@@ -489,7 +489,7 @@ public class SiftsClient implements SiftsClientI
     curDBRefAccessionIdsString = dbRefAccessionIdsString;
     curSourceDBRef = sourceDBRef.getAccessionId();
 
-    TreeMap<Integer, String> resNumMap = new TreeMap<>();
+    TreeMap<Integer, String> resNumMap = new TreeMap<Integer, String>();
     List<Segment> segments = entity.getSegment();
     SegmentHelperPojo shp = new SegmentHelperPojo(seq, mapping, resNumMap,
             omitNonObserved, nonObservedShiftIndex,pdbeNonObserved);
@@ -668,9 +668,9 @@ public class SiftsClient implements SiftsClientI
         }
         if (!isObserved)
         {
-          ++pdbeNonObservedCount; // TODO this value is never used
+          ++pdbeNonObservedCount;
         }
-        if (seqCoordSys == CoordinateSys.PDB) // FIXME: is seqCoordSys ever PDBe
+        if (seqCoordSys == seqCoordSys.PDB) // FIXME: is seqCoordSys ever PDBe
                                             // ???
         {
           // if the sequence has a primary reference to the PDB, then we are
@@ -850,7 +850,7 @@ public class SiftsClient implements SiftsClientI
   private Set<String> getResidueAnnotaitons(Residue residue,
           ResidueDetailType type)
   {
-    HashSet<String> foundAnnotations = new HashSet<>();
+    HashSet<String> foundAnnotations = new HashSet<String>();
     List<ResidueDetail> resDetails = residue.getResidueDetail();
     for (ResidueDetail resDetail : resDetails)
     {
@@ -995,10 +995,6 @@ public class SiftsClient implements SiftsClientI
 
     public int resCount;
 
-    protected SiftsEntitySortPojo()
-    {
-    }
-
     @Override
     public int compareTo(SiftsEntitySortPojo o)
     {
@@ -1048,7 +1044,6 @@ public class SiftsClient implements SiftsClientI
     {
       return pdbeNonObserved;
     }
-
     public SequenceI getSeq()
     {
       return seq;