From: <sim...@us...> - 2002-07-30 07:32:21
|
Update of /cvsroot/cdchamber/CDChamber/src/org/cdchamber/gui In directory usw-pr-cvs1:/tmp/cvs-serv10505/src/org/cdchamber/gui Modified Files: CDCMainFrameController.java Log Message: Let CDRomType be an element in xsd file. All data files saved as CDRomType Index: CDCMainFrameController.java =================================================================== RCS file: /cvsroot/cdchamber/CDChamber/src/org/cdchamber/gui/CDCMainFrameController.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** CDCMainFrameController.java 30 Jul 2002 05:12:13 -0000 1.20 --- CDCMainFrameController.java 30 Jul 2002 07:32:18 -0000 1.21 *************** *** 8,11 **** --- 8,12 ---- import org.cdchamber.elements.*; + import org.cdchamber.elements.CDRomType; import org.cdchamber.util.DirPath; import org.cdchamber.searcher.Searcher; *************** *** 44,49 **** if (rootFiles[i].isDirectory()) continue; try { ! DirectoryType vFiles = DirectoryType.unmarshalDirectoryType(new FileReader(rootFiles[i])); ! CDRomType cdrom = new CDRomType(vFiles); cdrom.setDataFileName(rootFiles[i].getAbsolutePath()); root.addFiles(cdrom); --- 45,49 ---- if (rootFiles[i].isDirectory()) continue; try { ! CDRomType cdrom = CDRomType.unmarshalCDRomType(new FileReader(rootFiles[i])); cdrom.setDataFileName(rootFiles[i].getAbsolutePath()); root.addFiles(cdrom); *************** *** 164,171 **** String dataFileName = DirPath.DataDir + DirPath.SEP + System.currentTimeMillis() + ".xml"; FileWriter out = new FileWriter(dataFileName); ! dirType.marshal(out); out.close(); ! roots.addFiles(new CDRomType(dirType, dataFileName)); frame.setDirectoryTreeModel(new FileTreeModel(roots)); } catch (Exception e1) { --- 164,172 ---- String dataFileName = DirPath.DataDir + DirPath.SEP + System.currentTimeMillis() + ".xml"; FileWriter out = new FileWriter(dataFileName); ! CDRomType cdrom = new CDRomType(dirType, dataFileName); ! cdrom.marshal(out); out.close(); ! roots.addFiles( cdrom); frame.setDirectoryTreeModel(new FileTreeModel(roots)); } catch (Exception e1) { *************** *** 192,199 **** String dataFileName = DirPath.DataDir + DirPath.SEP + System.currentTimeMillis() + ".xml"; FileWriter out = new FileWriter(dataFileName); ! dirType.marshal(out); out.close(); ! roots.addFiles(new CDRomType(dirType, dataFileName)); frame.setDirectoryTreeModel(new FileTreeModel(roots)); } catch (Exception e1) { --- 193,202 ---- String dataFileName = DirPath.DataDir + DirPath.SEP + System.currentTimeMillis() + ".xml"; FileWriter out = new FileWriter(dataFileName); ! ! CDRomType cdrom = new CDRomType(dirType, dataFileName); ! cdrom.marshal(out); out.close(); ! roots.addFiles(cdrom); frame.setDirectoryTreeModel(new FileTreeModel(roots)); } catch (Exception e1) { |