/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* @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()
{
}
@Override
- public boolean startObjectEntry(String key) throws ParseException,
- IOException
+ public boolean startObjectEntry(String key)
+ throws ParseException, IOException
{
// TODO Auto-generated method stub
return false;
}
@Override
- public boolean primitive(Object value) throws ParseException,
- IOException
+ public boolean primitive(Object value)
+ throws ParseException, IOException
{
// TODO Auto-generated method stub
return false;
// 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();
;
if (sval == null)
{
- System.err
- .println("DEVELOPER WARNING: Annotate3d didn't return a '2D' tag in its response. Consider checking output of server. Response was :"
+ System.err.println(
+ "DEVELOPER WARNING: Annotate3d didn't return a '2D' tag in its response. Consider checking output of server. Response was :"
+ val.toString());
sval = "";
}
- return new StringReader(
- (sval instanceof JSONObject) ? ((JSONObject) sval)
- .toString() : sval.toString());
+ return new StringReader((sval instanceof JSONObject)
+ ? ((JSONObject) sval).toString()
+ : sval.toString());
}
};
} catch (Exception foo)
{
- throw new Exception(
- MessageManager
- .getString("exception.couldnt_parse_responde_from_annotated3d_server"),
+ throw new Exception(MessageManager.getString(
+ "exception.couldnt_parse_responde_from_annotated3d_server"),
foo);
}