From: gmungoc Date: Wed, 23 Jan 2019 09:15:52 +0000 (+0000) Subject: JAL-3063 correct handling of absent choice element in DBRef Mapping X-Git-Tag: Release_2_11_1_0~68^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c93f0b25cf06af3e8f65426acc0b0c82ba281d69;p=jalview.git JAL-3063 correct handling of absent choice element in DBRef Mapping --- diff --git a/src/jalview/project/Jalview2XML.java b/src/jalview/project/Jalview2XML.java index 74b6bf0..e57dd01 100644 --- a/src/jalview/project/Jalview2XML.java +++ b/src/jalview/project/Jalview2XML.java @@ -5829,15 +5829,16 @@ public class Jalview2XML jalview.datamodel.Mapping jmap = new jalview.datamodel.Mapping(dsto, fr, fto, m.getMapFromUnit().intValue(), m.getMapToUnit().intValue()); - // if (m.getMappingChoice() != null) - // { - // MappingChoice mc = m.getMappingChoice(); + + /* + * (optional) choice of dseqFor or Sequence + */ if (m.getDseqFor() != null) { String dsfor = m.getDseqFor(); if (seqRefIds.containsKey(dsfor)) { - /** + /* * recover from hash */ jmap.setTo(seqRefIds.get(dsfor)); @@ -5847,9 +5848,9 @@ public class Jalview2XML frefedSequence.add(newMappingRef(dsfor, jmap)); } } - else + else if (m.getSequence() != null) { - /** + /* * local sequence definition */ Sequence ms = m.getSequence();