for (String dssids : dsses.keySet())
{
AlignFrame _af = dsses.get(dssids);
- String jfileName = MessageManager.formatMessage("label.dataset_for", new String[]{fileName,_af.getTitle()});
+ String jfileName = fileName + " Dataset for " + _af.getTitle();
if (!jfileName.endsWith(".xml"))
{
jfileName = jfileName + ".xml";
}
else
{
- recoverDatasetFor(vamsasSet, al);
+ // recover dataset - passing on flag indicating if this a 'viewless'
+ // sequence set (a.k.a. a stored dataset for the project)
+ recoverDatasetFor(vamsasSet, al, object.getJalviewModelSequence()
+ .getViewportCount() == 0);
}
// ///////////////////////////////
}
}
- private void recoverDatasetFor(SequenceSet vamsasSet, Alignment al)
+ private void recoverDatasetFor(SequenceSet vamsasSet, Alignment al,
+ boolean ignoreUnrefed)
{
jalview.datamodel.Alignment ds = getDatasetFor(vamsasSet.getDatasetId());
Vector dseqs = null;
for (int i = 0, iSize = vamsasSet.getSequenceCount(); i < iSize; i++)
{
Sequence vamsasSeq = vamsasSet.getSequence(i);
- ensureJalviewDatasetSequence(vamsasSeq, ds, dseqs);
+ ensureJalviewDatasetSequence(vamsasSeq, ds, dseqs, ignoreUnrefed);
}
// create a new dataset
if (ds == null)
* vector to add new dataset sequence to
*/
private void ensureJalviewDatasetSequence(Sequence vamsasSeq,
- AlignmentI ds, Vector dseqs)
+ AlignmentI ds, Vector dseqs, boolean ignoreUnrefed)
{
// JBP TODO: Check this is called for AlCodonFrames to support recovery of
// xRef Codon Maps
{
dsq = sq.getDatasetSequence();
}
-
+ if (sq == null && ignoreUnrefed)
+ {
+ return;
+ }
String sqid = vamsasSeq.getDsseqid();
if (dsq == null)
{