- mset[0] = m;
- try
- {
- mset[0] = new File(m).getAbsolutePath();
- } catch (AccessControlException x)
- {
- // usually not allowed to do this in applet
- System.err
- .println("jmolBinding: Using local file string from Jmol: "
- + m);
- }
- if (mset[0].indexOf("/file:") != -1)
- {
- // applet path with docroot - discard as format won't match pdbfile
- mset[0] = m;
- }
- _modelFileNameMap[0] = 0; // filename index for first model is always 0.
- }
- int j = 1;
- for (int i = 1; i < mset.length; i++)
- {
- m = viewer.ms.getModelFileName(i);
- mset[j] = m;
- if (m != null)
- {
- try
- {
- mset[j] = new File(m).getAbsolutePath();
- } catch (AccessControlException x)
- {
- // usually not allowed to do this in applet, so keep raw handle
- // System.err.println("jmolBinding: Using local file string from Jmol: "+m);
- }
- }
- _modelFileNameMap[j] = i; // record the model index for the filename
- // skip any additional models in the same file (NMR structures)
- if ((mset[j] == null ? mset[j] != mset[j - 1]
- : (mset[j - 1] == null || !mset[j].equals(mset[j - 1]))))