import jalview.bin.Cache;
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.GraphLine;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.io.vamsas.DatastoreItem;
import jalview.io.vamsas.DatastoreRegistry;
import jalview.io.vamsas.Rangetype;
+import jalview.util.MapList;
import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
{
try
{
- jalview.datamodel.AlignmentI jal = av.getAlignment();
- jalview.datamodel.AlignmentI jds = jal.getDataset();
+ AlignmentI jal = av.getAlignment();
+ AlignmentI jds = jal.getDataset();
boolean nw = false;
VAMSAS root = null; // will be resolved based on Dataset Parent.
// /////////////////////////////////////////
// SAVE ANNOTATIONS
if (jal.getAlignmentAnnotation() != null)
{
- jalview.datamodel.AlignmentAnnotation[] aa = jal
+ AlignmentAnnotation[] aa = jal
.getAlignmentAnnotation();
java.util.HashMap AlSeqMaps = new HashMap(); // stores int maps from
// alignment columns to
}
setAnnotationType(an, aa[i]);
- if (aa[i].graph != jalview.datamodel.AlignmentAnnotation.NO_GRAPH)
+ if (aa[i].graph != AlignmentAnnotation.NO_GRAPH)
{
an.setGraph(true);
an.setGroup(Integer.toString(aa[i].graphGroup));
// of
// utf8
// translation
- if (alan.graph != jalview.datamodel.AlignmentAnnotation.NO_GRAPH)
+ if (alan.graph != AlignmentAnnotation.NO_GRAPH)
{
ae.addValue(alan.annotations[a].value);
}
@Override
public JarInputStream getJarInputStream() throws IOException
{
- jalview.bin.Cache.log
+ Cache.log
.debug("Returning client input stream for Jalview from Vamsas Document.");
return new JarInputStream(cappdata.getClientInputStream());
}
@Override
public JarInputStream getJarInputStream() throws IOException
{
- jalview.bin.Cache.log
+ Cache.log
.debug("Returning user input stream for Jalview from Vamsas Document.");
return new JarInputStream(cappdata.getUserInputStream());
}
} catch (Exception e)
{
// TODO raise GUI warning if user requests it.
- jalview.bin.Cache.log
+ Cache.log
.error("Couldn't update jalview client application data. Giving up - local settings probably lost.",
e);
}
}
else
{
- jalview.bin.Cache.log
+ Cache.log
.error("Couldn't access client application data for vamsas session. This is probably a vamsas client bug.");
}
}
// annotations
if (dsSeq == null)
{
- jalview.bin.Cache.log
+ Cache.log
.warn("Couldn't resolve jalview sequenceI for dataset object reference "
+ ((Vobject) dataset.getDataSetAnnotations(
dsa).getSeqRef(0)).getVorbaId()
// TODO check this handles multiple views properly
AlignmentViewport av = findViewport(alignment);
- jalview.datamodel.AlignmentI jal = null;
+ AlignmentI jal = null;
if (av != null)
{
// TODO check that correct alignment object is retrieved when
.getAlignmentSequenceAnnotation();
for (int a = 0; a < vasannot.length; a++)
{
- jalview.datamodel.AlignmentAnnotation asa = (jalview.datamodel.AlignmentAnnotation) getvObj2jv(vasannot[a]); // TODO:
+ AlignmentAnnotation asa = (AlignmentAnnotation) getvObj2jv(vasannot[a]); // TODO:
// 1:many
// jalview
// alignment
for (int j = 0; j < an.length; j++)
{
- jalview.datamodel.AlignmentAnnotation jan = (jalview.datamodel.AlignmentAnnotation) getvObj2jv(an[j]);
+ AlignmentAnnotation jan = (AlignmentAnnotation) getvObj2jv(an[j]);
if (jan != null)
{
// update or stay the same.
* @param annotation
* @return unbound jalview alignment annotation object.
*/
- private jalview.datamodel.AlignmentAnnotation getjAlignmentAnnotation(
- jalview.datamodel.AlignmentI jal,
+ private AlignmentAnnotation getjAlignmentAnnotation(
+ AlignmentI jal,
uk.ac.vamsas.objects.core.RangeAnnotation annotation)
{
if (annotation == null)
}
}
}
- jalview.datamodel.AlignmentAnnotation jan = null;
+ AlignmentAnnotation jan = null;
if (a_label == null || a_label.length() == 0)
{
a_label = annotation.getType();
{
if (type == 0)
{
- type = jalview.datamodel.AlignmentAnnotation.BAR_GRAPH; // default
+ type = AlignmentAnnotation.BAR_GRAPH; // default
// type of
// value
// annotation
if (has[HASHPHOB])
{
// no hints - so we ensure HPHOB display is like this.
- type = jalview.datamodel.AlignmentAnnotation.BAR_GRAPH;
+ type = AlignmentAnnotation.BAR_GRAPH;
}
}
// make bounds and automatic description strings for jalview user's
}
}
}
- jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr,
+ jan = new AlignmentAnnotation(a_label, a_descr,
arow, min, max, type);
}
else
// width - if it is not complete, then mark regions on the annotation
// row.
}
- jan = new jalview.datamodel.AlignmentAnnotation(a_label, a_descr,
+ jan = new AlignmentAnnotation(a_label, a_descr,
arow);
jan.setThreshold(null);
jan.annotationId = annotation.getVorbaId().toString(); // keep all the
* @param default unit for mapped
* @return MapList
*/
- private jalview.util.MapList parsemapType(MapType maprange, int localu,
+ private MapList parsemapType(MapType maprange, int localu,
int mappedu)
{
- jalview.util.MapList ml = null;
+ MapList ml = null;
int[] localRange = getMapping(maprange.getLocal());
int[] mappedRange = getMapping(maprange.getMapped());
long lu = maprange.getLocal().hasUnit() ? maprange.getLocal().getUnit()
: localu;
long mu = maprange.getMapped().hasUnit() ? maprange.getMapped()
.getUnit() : mappedu;
- ml = new jalview.util.MapList(localRange, mappedRange, (int) lu,
+ ml = new MapList(localRange, mappedRange, (int) lu,
(int) mu);
return ml;
}
* @param ml
* @param setUnits
*/
- private void initMapType(MapType maprange, jalview.util.MapList ml,
+ private void initMapType(MapType maprange, MapList ml,
boolean setUnits)
{
maprange.setLocal(new Local());
AlignmentViewport av = viewport;
try
{
- jalview.datamodel.AlignmentI jal = av.getAlignment();
+ AlignmentI jal = av.getAlignment();
// /////////////////////////////////////////
// SAVE THE DATASET
DataSet dataset = null;