X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;h=d37975d59cc071bfa90a912c981edf3df468ed25;hb=f14ab8c56014768bb0f94df591e83511aa506bdd;hp=5866d51c03893e079f24277232a9f1ac78402a04;hpb=dbd2c7a3bee8879f3f5af8c3959af22cce0b4085;p=jalview.git diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 5866d51..d37975d 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -24,6 +24,7 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import jalview.io.DataSourceType; import jalview.io.FileParse; import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; @@ -38,8 +39,6 @@ import java.util.List; import java.util.Map; import java.util.Vector; -import javajs.awt.Dimension; - import org.jmol.api.JmolStatusListener; import org.jmol.api.JmolViewer; import org.jmol.c.CBK; @@ -61,9 +60,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener { Viewer viewer = null; - public JmolParser(String inFile, String type) throws IOException + public JmolParser(String inFile, DataSourceType sourceType) + throws IOException { - super(inFile, type); + super(inFile, sourceType); } public JmolParser(FileParse fp) throws IOException @@ -154,10 +154,12 @@ public class JmolParser extends StructureFile implements JmolStatusListener if (pdbId == null) { setId(safeName(getDataName())); + setPDBIdAvailable(false); } else { setId(pdbId); + setPDBIdAvailable(true); } List significantAtoms = convertSignificantAtoms(ms); for (Atom tmpatom : significantAtoms) @@ -184,6 +186,14 @@ public class JmolParser extends StructureFile implements JmolStatusListener makeResidueList(); makeCaBondList(); + if (getId() == null) + { + // always use resource name, not the hardwired file + // Does the value of ID get used ? Behaviour needs to be + // documented and tested + setId(getDataName()); + } + for (PDBChain chain : getChains()) { SequenceI chainseq = postProcessChain(chain); @@ -470,7 +480,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener * Not implemented - returns null */ @Override - public String print() + public String print(SequenceI[] seqs, boolean jvSuffix) { return null; } @@ -624,7 +634,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener * Not implemented - returns null */ @Override - public Dimension resizeInnerPanel(String data) + public int[] resizeInnerPanel(String data) { return null; }