From: <sim...@us...> - 2002-07-30 07:32:21
|
Update of /cvsroot/cdchamber/CDChamber/aspect/gen/org/cdchamber/elements In directory usw-pr-cvs1:/tmp/cvs-serv10505/aspect/gen/org/cdchamber/elements Added Files: CDRomTypeWrapper.java Log Message: Let CDRomType be an element in xsd file. All data files saved as CDRomType --- NEW FILE: CDRomTypeWrapper.java --- /* * User: Simon * $Id: CDRomTypeWrapper.java,v 1.1 2002/07/30 07:32:18 simon_lei Exp $ */ package org.cdchamber.elements; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import java.io.*; public aspect CDRomTypeWrapper { public void CDRomType.delete() { File dataFile = new File(getDataFileName()); dataFile.delete(); } public CDRomType.new( DirectoryType dir, String dataFileName) { this( dir); this.setDataFileName( dataFileName); } public CDRomType.new(DirectoryType dir) { super(); this.setContent(dir.getContent()); this.setDate(dir.getDate()); this.setDesc(dir.getDesc()); this.setFiles(dir.getFiles()); this.setName(dir.getName()); this.setSize(dir.getSize()); } public void CDRomType.marshal() throws MarshalException, ValidationException, IOException { Writer out = new FileWriter(getDataFileName()); marshal(out); out.close(); } } |