}
if (newname == null)
{
- SequenceFeature sf[] = sq.getSequenceFeatures();
- for (int i = 0; sf != null && i < sf.length; i++)
+ List<SequenceFeature> features = sq.getFeatures()
+ .getPositionalFeatures(labelClass);
+ for (SequenceFeature feature : features)
{
- if (sf[i].getType().equals(labelClass))
+ if (newname == null)
+ {
+ newname = feature.getDescription();
+ }
+ else
{
- if (newname == null)
- {
- newname = new String(sf[i].getDescription());
- }
- else
- {
- newname = newname + "; " + sf[i].getDescription();
- }
+ newname = newname + "; " + feature.getDescription();
}
}
}