import jalview.schemes.*;
import jalview.util.Platform;
import jalview.util.jarInputStreamProvider;
+import jalview.viewmodel.AlignmentViewport;
import jalview.ws.jws2.Jws2Discoverer;
import jalview.ws.jws2.dm.AAConSettings;
import jalview.ws.jws2.jabaws2.Jws2Instance;
return;
}
+ Hashtable<String,AlignFrame> dsses = new Hashtable<String,AlignFrame>();
+
try
{
}
int ap, apSize = af.alignPanels.size();
+
for (ap = 0; ap < apSize; ap++)
{
AlignmentPanel apanel = (AlignmentPanel) af.alignPanels
}
SaveState(apanel, fileName, jout);
+
+ String dssid = getDatasetIdRef(af.getViewport().getAlignment().getDataset());
+ if (!dsses.containsKey(dssid))
+ {
+ dsses.put(dssid, af);
+ }
+
}
}
}
+
+ writeDatasetFor(dsses, ""+jout.hashCode()+" "+uniqueSetSuffix, jout);
+
try
{
jout.flush();
int ap, apSize = af.alignPanels.size();
FileOutputStream fos = new FileOutputStream(jarFile);
JarOutputStream jout = new JarOutputStream(fos);
+ Hashtable<String,AlignFrame> dsses = new Hashtable<String,AlignFrame>();
for (ap = 0; ap < apSize; ap++)
{
AlignmentPanel apanel = (AlignmentPanel) af.alignPanels
jfileName = jfileName + ".xml";
}
SaveState(apanel, jfileName, jout);
+ String dssid = getDatasetIdRef(af.getViewport().getAlignment().getDataset());
+ if (!dsses.containsKey(dssid))
+ {
+ dsses.put(dssid, af);
+ }
}
-
+ writeDatasetFor(dsses, fileName, jout);
try
{
jout.flush();
}
}
+ private void writeDatasetFor(Hashtable<String, AlignFrame> dsses,
+ String fileName, JarOutputStream jout)
+ {
+
+ for (String dssids:dsses.keySet())
+ {
+ AlignFrame _af = dsses.get(dssids);
+ String jfileName = fileName + " Dataset for "+ _af.getTitle();
+ if (!jfileName.endsWith(".xml"))
+ {
+ jfileName = jfileName + ".xml";
+ }
+ SaveState(_af.alignPanel, jfileName, true, jout);
+ }
+ }
+
/**
* create a JalviewModel from an algnment view and marshall it to a
* JarOutputStream