getCalcName() can be used to identify services that run the calculator.
when an alternative calculator (different host or parameters) is created
the old ones sharing the name can be stopped.
public interface AlignCalcWorkerI
{
/**
+ * Returns the name of this calculation used to identify the service running
+ * this worker.
+ *
+ * @return calculator name
+ */
+ public default String getCalcName()
+ {
+ return null;
+ }
+
+ /**
* Answers true if this worker updates the given annotation (regardless of its
* current state)
*
* Removes any annotation(s) managed by this worker from the alignment
*/
void removeAnnotation();
-
+
/**
* The main calculation happens here
- * @throws Throwable
+ *
+ * @throws Throwable
*/
public void run() throws Throwable;
-
+
/**
* Answers true if the worker should be deleted entirely when its annotation
* is deleted from the display, or false if it should continue to run. Some
calcMan.registerWorker(this);
}
+ @Override
+ public String getCalcName()
+ {
+ return "Column Counter Set";
+ }
+
/**
* method called under control of AlignCalcManager to recompute the annotation
* when the alignment changes
}
@Override
+ public String getCalcName()
+ {
+ return "Complement Consensus";
+ }
+
+ @Override
protected AlignmentAnnotation getConsensusAnnotation()
{
return alignViewport.getComplementConsensusAnnotation();
}
@Override
+ public String getCalcName()
+ {
+ return "Consensus";
+ }
+
+ @Override
public void run()
{
AlignmentAnnotation consensus = getConsensusAnnotation();
int alWidth;
@Override
+ public String getCalcName()
+ {
+ return "Conservation";
+ }
+
+ @Override
public void run()
{
if ((alignViewport == null) || (calcMan == null)
super(alignViewport, alignPanel);
}
+ @Override
+ public String getCalcName()
+ {
+ return "Information";
+ }
+
/**
* Recomputes Information annotations for any HMM consensus sequences (for
* alignment and/or groups)
private long nseq = -1;
@Override
+ public String getCalcName()
+ {
+ return "Struc Consensus";
+ }
+
+ @Override
public void run()
{
if (alignViewport.isClosed())
JobStateSummary job = null;
WebserviceInfo info = null;
List<SequenceI> seqs = null;
-
+
+ @Override
+ public String getCalcName()
+ {
+ return service.getName();
+ }
+
@Override public void startUp() throws Throwable
{
if (alignViewport.isClosed())
var result = getLastResult();
return (result instanceof Throwable) ? (Throwable) result : null;
}
-
- public int getCallCount() {
+
+ public int getCallCount()
+ {
return callCount;
}
}
@Override
+ public String getCalcName()
+ {
+ return "Mock";
+ }
+
+ @Override
public boolean involves(AlignmentAnnotation annot)
{
if (annotation == null)