import jalview.datamodel.PDBEntry;
import jalview.io.*;
import jalview.schemes.*;
+import jalview.util.Platform;
public class AppJmol extends GStructureViewer implements Runnable,
SequenceStructureBinding, ViewSetProvider
// just transfer the file name from the first sequence's first
// PDBEntry
file = new File(((PDBEntry) pdbseq
- .getSequenceAt(0).getPDBId().elementAt(0)).getFile()).toURI().getPath().substring(1);
+ .getSequenceAt(0).getPDBId().elementAt(0)).getFile()).getAbsolutePath();
jmb.pdbentry[pi].setFile(file);
- files.append(" \"" + file + "\"");
+ files.append(" \"" + Platform.escapeString(file) + "\"");
}
else
{
}
if (file != null)
{
- files.append(" \"" + file + "\"");
+ files.append(" \"" + Platform.escapeString(file) + "\"");
}
}
}
import jalview.schemabinding.version2.*;
import jalview.schemes.*;
import jalview.structure.StructureSelectionManager;
+import jalview.util.Platform;
import jalview.util.jarInputStreamProvider;
/**
}
;
out.close();
- String t=outFile.toURI().getPath().substring(1);
+ String t=outFile.getAbsolutePath();
alreadyLoadedPDB.put(pdbId, t);
return t;
}
// have to normalize filename - since Jmol and jalview do filename
// translation differently.
Object[] filedat = oldFiles.get(new File(oldfilenam));
- newFileLoc.append(((String) filedat[0]));
+ newFileLoc.append(Platform.escapeString((String) filedat[0]));
pdbfilenames.addElement((String) filedat[0]);
pdbids.addElement((String) filedat[1]);
seqmaps.addElement((SequenceI[]) ((Vector<SequenceI>) filedat[2])