AlignFrame alignFrame = null;
WebserviceInfo wsInfo = null;
AlignmentView input = null;
+ AlignedCodonFrame[] codonframe = null;
boolean jobComplete = false;
+
abstract class WSJob
{
/**
abstract void StartJob(WSJob job);
abstract void parseResult();
+
+ protected void propagateDatasetMappings(Alignment al)
+ {
+ if (codonframe!=null)
+ {
+ SequenceI[] alignment = al.getSequencesArray();
+ for (int sq = 0; sq<alignment.length; sq++)
+ {
+ for (int i=0; i<codonframe.length; i++)
+ {
+ if (codonframe[i]!=null &&
+ codonframe[i].involvesSequence(alignment[sq]))
+ {
+ al.addCodonFrame(codonframe[i]);
+ codonframe[i] = null;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @param alignFrame reference for copying mappings across
+ * @param wsInfo gui attachment point
+ * @param input input data for the calculation
+ * @param webServiceName name of service
+ * @param wsUrl url of the service being invoked
+ */
+ public WSThread(AlignFrame alignFrame, WebserviceInfo wsinfo,
+ AlignmentView input, String webServiceName,
+ String wsUrl)
+ {
+ this(alignFrame, wsinfo, input, wsUrl);
+ WebServiceName = webServiceName;
+ }
+
+ /**
+ *
+ * @param alframe - reference for copying mappings across
+ * @param wsinfo2 - gui attachment point
+ * @param alview - input data for the calculation
+ * @param wsurl2 - url of the service being invoked
+ */
+ public WSThread(AlignFrame alframe, WebserviceInfo wsinfo2,
+ AlignmentView alview, String wsurl2)
+ {
+ super();
+ this.alignFrame = alframe;
+ this.wsInfo = wsinfo2;
+ this.input = alview;
+ WsUrl = wsurl2;
+ if (alignFrame!=null)
+ {
+ AlignedCodonFrame[] cf = alignFrame.getViewport().getAlignment().getCodonFrames();
+ codonframe = new AlignedCodonFrame[cf.length];
+ System.arraycopy(cf, 0, codonframe, 0, cf.length);
+ }
+ }
}