JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / ext / so / SequenceOntology.java
index a4c195f..5a86fa1 100644 (file)
@@ -82,10 +82,10 @@ public class SequenceOntology implements SequenceOntologyI
    */
   public SequenceOntology()
   {
-    termsFound = new ArrayList<String>();
-    termsNotFound = new ArrayList<String>();
-    termsByDescription = new HashMap<String, Term>();
-    termIsA = new HashMap<Term, List<Term>>();
+    termsFound = new ArrayList<>();
+    termsNotFound = new ArrayList<>();
+    termsByDescription = new HashMap<>();
+    termIsA = new HashMap<>();
 
     loadOntologyZipFile("so-xp-simple.obo");
   }
@@ -102,8 +102,8 @@ public class SequenceOntology implements SequenceOntologyI
     try
     {
       String zipFile = ontologyFile + ".zip";
-      InputStream inStream = this.getClass().getResourceAsStream(
-              "/" + zipFile);
+      InputStream inStream = this.getClass()
+              .getResourceAsStream("/" + zipFile);
       zipStream = new ZipInputStream(new BufferedInputStream(inStream));
       ZipEntry entry;
       while ((entry = zipStream.getNextEntry()) != null)
@@ -151,8 +151,8 @@ public class SequenceOntology implements SequenceOntologyI
    * @throws ParseException
    * @throws IOException
    */
-  protected void loadOboFile(InputStream is) throws ParseException,
-          IOException
+  protected void loadOboFile(InputStream is)
+          throws ParseException, IOException
   {
     BufferedReader oboFile = new BufferedReader(new InputStreamReader(is));
     OboParser parser = new OboParser();
@@ -404,7 +404,7 @@ public class SequenceOntology implements SequenceOntologyI
    */
   protected synchronized void findParents(Term childTerm)
   {
-    List<Term> result = new ArrayList<Term>();
+    List<Term> result = new ArrayList<>();
     for (Triple triple : ontology.getTriples(childTerm, null, isA))
     {
       Term parent = triple.getObject();