}
/**
- * DOCUMENT ME!
+ * Answers the sequence name, with '/start-end' appended if jvsuffix is true
*
- * @return DOCUMENT ME!
+ * @return
*/
@Override
public String getDisplayId(boolean jvsuffix)
{
- StringBuffer result = new StringBuffer(name);
- if (jvsuffix)
+ if (!jvsuffix)
{
- result.append("/" + start + "-" + end);
+ return name;
}
+ StringBuilder result = new StringBuilder(name);
+ result.append("/").append(start).append("-").append(end);
return result.toString();
}
public void setStart(int start)
{
this.start = start;
+ sequenceChanged();
}
/**
public List<AlignmentAnnotation> getAlignmentAnnotations(String calcId,
String label)
{
+ return getAlignmentAnnotations(calcId, label, null, true);
+ }
+
+ @Override
+ public List<AlignmentAnnotation> getAlignmentAnnotations(String calcId,
+ String label, String description)
+ {
+ return getAlignmentAnnotations(calcId, label, description, false);
+ }
+
+ private List<AlignmentAnnotation> getAlignmentAnnotations(String calcId,
+ String label, String description, boolean ignoreDescription)
+ {
List<AlignmentAnnotation> result = new ArrayList<>();
if (this.annotation != null)
{
for (AlignmentAnnotation ann : annotation)
{
- if (ann.calcId != null && ann.calcId.equals(calcId)
- && ann.label != null && ann.label.equals(label))
+ if ((ann.calcId != null && ann.calcId.equals(calcId))
+ && (ann.label != null && ann.label.equals(label))
+ && ((ignoreDescription && description == null)
+ || (ann.description != null
+ && ann.description.equals(description))))
+
{
result.add(ann);
}
List<SequenceFeature> result = getFeatures().findFeatures(startPos,
endPos, types);
- if (datasetSequence != null)
- {
- result = datasetSequence.getFeatures().findFeatures(startPos, endPos,
- types);
- }
- else
- {
- result = sequenceFeatureStore.findFeatures(startPos, endPos, types);
- }
/*
* if end column is gapped, endPos may be to the right,