예제 #1
0
 private void updateVoiceDescription(File rootDir, File packageFile)
     throws MalformedURLException, ParserConfigurationException, MaryConfigurationException,
         IOException {
   logger.debug("writing new voice description...");
   voiceDescription.setVersion(Version.specificationVersion());
   voiceDescription.setDependsVersion(Version.specificationVersion());
   voiceDescription.setPackageFilename(packageFile.getName());
   voiceDescription.setPackageMD5Sum(computeMD5(packageFile));
   voiceDescription.setPackageSize((int) packageFile.length());
   voiceDescription.removeAllLocations();
   voiceDescription.addLocation(
       URI.create("http://mary.dfki.de/download/" + Version.specificationVersion() + "/").toURL());
   Document doc = voiceDescription.createComponentXML();
   File newVoiceDescriptionFile = new File(rootDir, getFilenamePrefix() + "-component.xml");
   DomUtils.document2File(doc, newVoiceDescriptionFile);
   logger.debug("... created " + newVoiceDescriptionFile.getPath());
 }