import java.util.Locale;
-import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+ "</a><br>See Console output for details.";
rj.setAllowedServerExceptions(0);// unrecoverable;
rj.error = true;
- Cache.log.fatal("Unexpected REST Job " + getStage(stg)
+ Console.fatal("Unexpected REST Job " + getStage(stg)
+ "exception for URL " + rj.rsd.postUrl);
throw (he);
} catch (IOException e)
+ "Job. <br>Problematic url was <a href=\""
+ request.getURI() + "\">" + request.getURI()
+ "</a><br>See Console output for details.";
- Cache.log.warn("IO Exception for REST Job " + getStage(stg)
+ Console.warn("IO Exception for REST Job " + getStage(stg)
+ "exception for URL " + rj.rsd.postUrl);
throw (e);
{
case 200:
rj.running = false;
- Cache.log.debug("Processing result set.");
+ Console.debug("Processing result set.");
processResultSet(rj, response, request);
break;
-
case 202:
markJobAsRunning(rj);
break;
-
case 201:
// Created - redirect may be present. Fallthrough to 302
case 302:
default:
// Some other response. Probably need to pop up the content in a window.
// TODO: deal with all other HTTP response codes from server.
- Cache.log.warn("Unhandled response status when " + getStage(stg)
+ Console.warn("Unhandled response status when " + getStage(stg)
+ "for " + postUrl + ": " + response.getStatusLine());
rj.error = true;
rj.setAllowedServerExceptions(0);
+ "</a><br/>Filtered response content below:<br/>");
} catch (IOException e)
{
- Cache.log.debug("IOException when consuming unhandled response",
- e);
+ Console.debug("IOException when consuming unhandled response", e);
}
;
}
{
if (loc.length > 1)
{
- Cache.log
- .warn("Ignoring additional "
+ Console.warn("Ignoring additional "
+ (loc.length - 1)
+ " location(s) provided in response header ( next one is '"
+ loc[1].getValue() + "' )");
}
}
}
-
/**
* job has completed. Something valid should be available from con
*
{
job.setSubjobComplete(true);
job.setAllowedServerExceptions(-1);
- Cache.log.error("Exception when trying to start Rest Job.", ex);
+ Console.error("Exception when trying to start Rest Job.", ex);
}
}
{
// crazy users will see this message
// TODO: finish this! and remove the message below!
- Cache.log.warn("Rest job result parser is currently INCOMPLETE!");
+ Console.warn("Rest job result parser is currently INCOMPLETE!");
int validres = 0;
for (RestJob rj : (RestJob[]) jobs)
{
String ln = null;
try
{
- Cache.log.debug("Parsing data for job " + rj.getJobId());
+ Console.debug("Parsing data for job " + rj.getJobId());
rj.parseResultSet();
if (rj.hasResults())
{
validres++;
}
- Cache.log.debug("Finished parsing data for job " + rj.getJobId());
+ Console.debug("Finished parsing data for job " + rj.getJobId());
} catch (Error ex)
{
- Cache.log.warn(
+ Console.warn(
"Failed to finish parsing data for job " + rj.getJobId());
ex.printStackTrace();
} catch (Exception ex)
{
- Cache.log.warn(
+ Console.warn(
"Failed to finish parsing data for job " + rj.getJobId());
ex.printStackTrace();
} finally
/**
* alignment panels derived from each alignment set returned by service.
*/
- ArrayList<jalview.gui.AlignmentPanel> destPanels = new ArrayList<>();
+ ArrayList<jalview.gui.AlignmentPanel> destPanels = new ArrayList<jalview.gui.AlignmentPanel>();
/**
* list of instructions for how to process each distinct alignment set
* returned by the job set
*/
- ArrayList<AddDataTo> resultDest = new ArrayList<>();
+ ArrayList<AddDataTo> resultDest = new ArrayList<AddDataTo>();
/**
* when false, zeroth pane is panel derived from input deta.
*/
boolean vsepjobs = restClient.service.isVseparable();
// total number of distinct alignment sets generated by job set.
int numAlSets = 0, als = 0;
- List<AlignmentI> destAls = new ArrayList<>();
- List<jalview.datamodel.HiddenColumns> destColsel = new ArrayList<>();
- List<List<NewickFile>> trees = new ArrayList<>();
+ List<AlignmentI> destAls = new ArrayList<AlignmentI>();
+ List<jalview.datamodel.HiddenColumns> destColsel = new ArrayList<jalview.datamodel.HiddenColumns>();
+ List<List<NewickFile>> trees = new ArrayList<List<NewickFile>>();
do
{
if (alset.trees != null)
{
- trees.add(new ArrayList<>(alset.trees));
+ trees.add(new ArrayList<NewickFile>(alset.trees));
}
else
{
*/
int vrestjob = 0;
// Destination alignments for all result data.
- ArrayList<SequenceGroup> visgrps = new ArrayList<>();
- Hashtable<String, SequenceGroup> groupNames = new Hashtable<>();
+ ArrayList<SequenceGroup> visgrps = new ArrayList<SequenceGroup>();
+ Hashtable<String, SequenceGroup> groupNames = new Hashtable<String, SequenceGroup>();
ArrayList<AlignmentAnnotation> visAlAn = null;
for (nvertsep = 0; nvertsep < nvertseps; nvertsep++)
{
{
// TODO: decide if multiple multiple alignments returned by
// non-vseparable services are allowed.
- Cache.log.warn(
+ Console.warn(
"dealing with multiple alignment products returned by non-vertically separable service.");
}
// recover reference to last alignment created for this rest frame
}
else
{
- Cache.log.warn(
+ Console.warn(
"Couldn't resolve original sequence for new sequence.");
}
}
grass = groupNames.get(alan[nrj][an].groupRef.getName());
if (grass == null)
{
- Cache.log.error(
+ Console.error(
"Couldn't relocate group referemce for group "
+ alan[nrj][an].groupRef.getName());
}
}
if (visAlAn == null)
{
- visAlAn = new ArrayList<>();
+ visAlAn = new ArrayList<AlignmentAnnotation>();
}
AlignmentAnnotation visan = null;
for (AlignmentAnnotation v : visAlAn)
{
// TODO: process each newick file, lifting over sequence refs to
// current alignment, if necessary.
- Cache.log.error(
+ Console.error(
"Tree recovery from restjob not yet implemented.");
}
}
*/
public boolean isValid()
{
- ArrayList<String> _warnings = new ArrayList<>();
+ ArrayList<String> _warnings = new ArrayList<String>();
boolean validt = true;
if (jobs != null)
{