JAL-2089 patch broken merge to master for Release 2.10.0b1
[jalview.git] / src / jalview / ext / paradise / Annotate3D.java
index 55c3c1d..5b75206 100644 (file)
@@ -45,13 +45,20 @@ import org.json.simple.parser.ParseException;
  * 
  * @author jimp
  * 
- *         History: v1.0 revised from original due to refactoring of
- *         paradise-ubmc.u-strasbg.fr/webservices/annotate3d to
- *         http://arn-ibmc.in2p3.fr/api/compute/2d?tool=rnaview
+ * @version v1.0 revised from original due to refactoring of
+ *          paradise-ubmc.u-strasbg.fr/webservices/annotate3d to
+ *          http://arn-ibmc.in2p3.fr/api/compute/2d?tool=rnaview <br/>
+ *          See also testing URL from fjossinet:<br/>
+ *          http://charn2-ibmc.u-strasbg.fr:8080/api/compute/2d <br/>
+ *          If in doubt, check against the REST client at:
+ *          https://github.com/fjossinet/RNA-Science
+ *          -Toolbox/blob/master/pyrna/restclient.py
  */
 public class Annotate3D
 {
-  private static String twoDtoolsURL = "http://arn-ibmc.in2p3.fr/api/compute/2d";
+  // also test with
+  // "http://charn2-ibmc.u-strasbg.fr:8080/api/compute/2d";
+  private static String twoDtoolsURL = "http://arn-ibmc.in2p3.fr/api/compute/2d?tool=rnaview";
 
   private static ContentHandler createContentHandler()
   {
@@ -137,7 +144,8 @@ public class Annotate3D
     // return processJsonResponseFor(HttpClientUtils.doHttpUrlPost(twoDtoolsURL,
     // vals));
     ArrayList<Reader> readers = new ArrayList<Reader>();
-    final BufferedReader postResponse = HttpClientUtils.doHttpUrlPost(twoDtoolsURL, vals, 0, 0);
+    final BufferedReader postResponse = HttpClientUtils.doHttpUrlPost(
+            twoDtoolsURL, vals, 0, 0);
     readers.add(postResponse);
     return readers.iterator();
 
@@ -190,14 +198,16 @@ public class Annotate3D
         @Override
         public void remove()
         {
-          throw new Error(MessageManager.getString("error.not_implemented_remove"));
+          throw new Error(
+                  MessageManager.getString("error.not_implemented_remove"));
 
         }
 
         @Override
         protected Object clone() throws CloneNotSupportedException
         {
-          throw new CloneNotSupportedException(MessageManager.getString("error.not_implemented_clone"));
+          throw new CloneNotSupportedException(
+                  MessageManager.getString("error.not_implemented_clone"));
         }
 
         @Override
@@ -218,7 +228,10 @@ public class Annotate3D
       };
     } catch (Exception foo)
     {
-      throw new Exception(MessageManager.getString("exception.couldnt_parse_responde_from_annotated3d_server"), foo);
+      throw new Exception(
+              MessageManager
+                      .getString("exception.couldnt_parse_responde_from_annotated3d_server"),
+              foo);
     }
 
   }