{
private static String version = new BuildDetails().getVersion();
- private String webstartUrl = "http://www.jalview.org/services/launchApp";
+ private String webstartUrl = "https://www.jalview.org/services/launchApp";
private String application = "Jalview";
jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo);
}
}
-
+
jsonOutput = JSONUtils.stringify(jsonAlignmentPojo);
return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
"xEnd");
/*
* get all features currently visible (and any non-positional features)
*/
- List<SequenceFeature> seqFeatures = seq.getFeatures().getAllFeatures(
- visibleFeatureTypes);
+ List<SequenceFeature> seqFeatures = seq.getFeatures()
+ .getAllFeatures(visibleFeatureTypes);
for (SequenceFeature sf : seqFeatures)
{
SequenceFeaturesPojo jsonFeature = new SequenceFeaturesPojo(
String.valueOf(seq.hashCode()));
- String featureColour = (fr == null) ? null : Format
- .getHexString(finder.findFeatureColour(Color.white, seq,
- seq.findIndex(sf.getBegin())));
+ String featureColour = (fr == null) ? null
+ : Format.getHexString(finder.findFeatureColour(Color.white,
+ seq, seq.findIndex(sf.getBegin())));
int xStart = sf.getBegin() == 0 ? 0
: seq.findIndex(sf.getBegin()) - 1;
int xEnd = sf.getEnd() == 0 ? 0 : seq.findIndex(sf.getEnd());
{
try
{
- Map<String, Object> alignmentJsonObj = (Map<String, Object>) JSONUtils.parse(jsonAlignmentString);
- List<Object> seqJsonArray = (List<Object>) alignmentJsonObj.get("seqs");
+ Map<String, Object> alignmentJsonObj = (Map<String, Object>) JSONUtils
+ .parse(jsonAlignmentString);
+ List<Object> seqJsonArray = (List<Object>) alignmentJsonObj
+ .get("seqs");
List<Object> alAnnotJsonArray = (List<Object>) alignmentJsonObj
.get("alignAnnotation");
List<Object> jsonSeqArray = (List<Object>) alignmentJsonObj
hiddenSequences = new ArrayList<>();
seqMap = new Hashtable<>();
- for (Iterator<Object> sequenceIter = seqJsonArray.iterator(); sequenceIter.hasNext();)
+ for (Iterator<Object> sequenceIter = seqJsonArray
+ .iterator(); sequenceIter.hasNext();)
{
- Map<String, Object> sequence = (Map<String, Object>) sequenceIter.next();
+ Map<String, Object> sequence = (Map<String, Object>) sequenceIter
+ .next();
String sequcenceString = sequence.get("seq").toString();
String sequenceName = sequence.get("name").toString();
String seqUniqueId = sequence.get("id").toString();
parseFeatures(jsonSeqArray);
- for (Iterator<Object> seqGrpIter = seqGrpJsonArray.iterator(); seqGrpIter.hasNext();)
+ for (Iterator<Object> seqGrpIter = seqGrpJsonArray
+ .iterator(); seqGrpIter.hasNext();)
{
- Map<String, Object> seqGrpObj = (Map<String, Object>)seqGrpIter.next();
+ Map<String, Object> seqGrpObj = (Map<String, Object>) seqGrpIter
+ .next();
String grpName = seqGrpObj.get("groupName").toString();
String colourScheme = seqGrpObj.get("colourScheme").toString();
String description = (seqGrpObj.get("description") == null) ? null
int startRes = Integer
.valueOf(seqGrpObj.get("startRes").toString());
int endRes = Integer.valueOf(seqGrpObj.get("endRes").toString());
- List<Object> sequenceRefs = (List<Object>) seqGrpObj.get("sequenceRefs");
+ List<Object> sequenceRefs = (List<Object>) seqGrpObj
+ .get("sequenceRefs");
ArrayList<SequenceI> grpSeqs = new ArrayList<>();
if (sequenceRefs.size() > 0)
}
- for (Iterator<Object> alAnnotIter = alAnnotJsonArray.iterator(); alAnnotIter.hasNext();)
+ for (Iterator<Object> alAnnotIter = alAnnotJsonArray
+ .iterator(); alAnnotIter.hasNext();)
{
- Map<String, Object> alAnnot = (Map<String, Object>) alAnnotIter.next();
- List<Object> annotJsonArray = (List<Object>) alAnnot.get("annotations");
+ Map<String, Object> alAnnot = (Map<String, Object>) alAnnotIter
+ .next();
+ List<Object> annotJsonArray = (List<Object>) alAnnot
+ .get("annotations");
Annotation[] annotations = new Annotation[annotJsonArray.size()];
int count = 0;
- for (Iterator<Object> annotIter = annotJsonArray.iterator(); annotIter.hasNext();)
+ for (Iterator<Object> annotIter = annotJsonArray
+ .iterator(); annotIter.hasNext();)
{
- Map<String, Object> annot = (Map<String, Object>) annotIter.next();
+ Map<String, Object> annot = (Map<String, Object>) annotIter
+ .next();
if (annot == null)
{
annotations[count] = null;
displayedFeatures = new FeaturesDisplayed();
for (Object o : jsonSeqFeatures)
{
- Map<String, Object> jsonFeature = (Map<String, Object>) o;
+ Map<String, Object> jsonFeature = (Map<String, Object>) o;
Long begin = (Long) jsonFeature.get("xStart");
Long end = (Long) jsonFeature.get("xEnd");
String type = (String) jsonFeature.get("type");
/*
* begin/end of 0 is for a non-positional feature
*/
- int featureBegin = begin.intValue() == 0 ? 0 : seq
- .findPosition(begin.intValue());
- int featureEnd = end.intValue() == 0 ? 0 : seq.findPosition(end
- .intValue()) - 1;
+ int featureBegin = begin.intValue() == 0 ? 0
+ : seq.findPosition(begin.intValue());
+ int featureEnd = end.intValue() == 0 ? 0
+ : seq.findPosition(end.intValue()) - 1;
SequenceFeature sequenceFeature = new SequenceFeature(type,
description, featureBegin, featureEnd, score, featureGrp);
- List<Object> linksJsonArray = (List<Object>) jsonFeature.get("links");
+ List<Object> linksJsonArray = (List<Object>) jsonFeature
+ .get("links");
if (linksJsonArray != null && linksJsonArray.size() > 0)
{
Iterator<Object> linkList = linksJsonArray.iterator();