/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
try
{
jalview.datamodel.AlignmentI jal = av.getAlignment();
+ jalview.datamodel.AlignmentI jds = jal.getDataset();
boolean nw = false;
VAMSAS root = null; // will be resolved based on Dataset Parent.
// /////////////////////////////////////////
// SAVE THE DATASET
DataSet dataset = null;
- if (jal.getDataset() == null)
+ if (jds == null)
{
Cache.log.warn("Creating new dataset for an alignment.");
jal.setDataset(null);
+ jds = jal.getDataset();
}
+
// try and get alignment and association for sequence set id
Alignment alignment = (Alignment) getjv2vObj(av.getSequenceSetId());
dataset = (DataSet) alignment.getV_parent();
} else {
// is the dataset already registered
- dataset = (DataSet) getjv2vObj(jal.getDataset());
+ dataset = (DataSet) getjv2vObj(jds);
}
if (dataset == null)
// it might be that one of the dataset sequences does actually have a
// binding, so search for it indirectly. If it does, then the local jalview dataset
// must be merged with the existing vamsas dataset.
- jalview.datamodel.SequenceI[] jdatset = jal.getDataset()
- .getSequencesArray();
+ jalview.datamodel.SequenceI[] jdatset = jds.getSequencesArray();
for (int i = 0; i < jdatset.length; i++)
{
Vobject vbound = getjv2vObj(jdatset[i]);
root = cdoc.getVamsasRoots()[0]; // default vamsas root for modifying.
dataset = new DataSet();
root.addDataSet(dataset);
- bindjvvobj(jal.getDataset(), dataset);
+ bindjvvobj(jds, dataset);
dataset.setProvenance(dummyProvenance());
// dataset.getProvenance().addEntry(provEntry);
nw = true;