Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Mo Jun 11 2007 14:25:28 CEST
file stats: LOC: 632   Methods: 25
NCLOC: 490   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DefaultModuleFactory.java 23,9% 35,1% 56% 35,2%
coverage coverage
 1    /* $Id: DefaultModuleFactory.java,v 1.1 2007/05/10 00:37:51 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2007, Michael Meyling <mime@qedeq.org>.
 6    *
 7    * "Hilbert II" is free software; you can redistribute
 8    * it and/or modify it under the terms of the GNU General Public
 9    * License as published by the Free Software Foundation; either
 10    * version 2 of the License, or (at your option) any later version.
 11    *
 12    * This program is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 15    * GNU General Public License for more details.
 16    */
 17   
 18    package org.qedeq.kernel.bo.load;
 19   
 20    import java.io.File;
 21    import java.io.FileNotFoundException;
 22    import java.io.FileOutputStream;
 23    import java.io.IOException;
 24    import java.io.InputStream;
 25    import java.net.URLConnection;
 26   
 27    import javax.xml.parsers.ParserConfigurationException;
 28   
 29    import org.qedeq.kernel.base.module.Qedeq;
 30    import org.qedeq.kernel.base.module.Specification;
 31    import org.qedeq.kernel.bo.module.Kernel;
 32    import org.qedeq.kernel.bo.module.LoadingState;
 33    import org.qedeq.kernel.bo.module.ModuleAddress;
 34    import org.qedeq.kernel.bo.module.ModuleDataException;
 35    import org.qedeq.kernel.bo.module.ModuleFactory;
 36    import org.qedeq.kernel.bo.module.ModuleProperties;
 37    import org.qedeq.kernel.bo.module.QedeqBo;
 38    import org.qedeq.kernel.common.XmlFileExceptionList;
 39    import org.qedeq.kernel.log.ModuleEventLog;
 40    import org.qedeq.kernel.log.QedeqLog;
 41    import org.qedeq.kernel.trace.Trace;
 42    import org.qedeq.kernel.utility.IoUtility;
 43    import org.qedeq.kernel.xml.handler.module.QedeqHandler;
 44    import org.qedeq.kernel.xml.mapper.ModuleDataException2XmlFileException;
 45    import org.qedeq.kernel.xml.parser.SaxDefaultHandler;
 46    import org.qedeq.kernel.xml.parser.SaxParser;
 47    import org.qedeq.kernel.xml.parser.DefaultXmlFileExceptionList;
 48    import org.xml.sax.SAXException;
 49   
 50   
 51    /**
 52    * This class provides access methods for loading QEDEQ modules.
 53    *
 54    * @version $Revision: 1.1 $
 55    * @author Michael Meyling
 56    */
 57    public class DefaultModuleFactory implements ModuleFactory {
 58   
 59    /** For synchronized waiting. */
 60    private final String monitor = new String();
 61   
 62    /** Token for synchronization. */
 63    private final String syncToken = new String();
 64   
 65    /** Number of method calls. */
 66    private int processCounter = 0;
 67   
 68    /** Collection of modules. */
 69    private final Modules modules;
 70   
 71    /** Kernel access. */
 72    private final Kernel kernel;
 73   
 74    /**
 75    * Constructor.
 76    *
 77    * @param kernel For kernel access.
 78    */
 79  2 public DefaultModuleFactory(final Kernel kernel) {
 80  2 modules = new Modules();
 81  2 this.kernel = kernel;
 82    }
 83   
 84  2 public final void startup() {
 85  2 autoReloadLastSessionChecked();
 86    }
 87   
 88    /**
 89    * If configured load all QEDEQ modules that where successfully loaded the last time.
 90    */
 91  2 public final void autoReloadLastSessionChecked() {
 92  2 if (kernel.getConfig().isAutoReloadLastSessionChecked()) {
 93  2 final Thread thread = new Thread() {
 94  2 public void run() {
 95  2 final String method = "start()";
 96  2 try {
 97  2 Trace.begin(this, method);
 98  2 QedeqLog.getInstance().logMessage(
 99    "Trying to load previously successfully loaded modules.");
 100  2 final int number = kernel.getConfig().getPreviouslyCheckedModules().length;
 101  2 if (loadPreviouslySuccessfullyLoadedModules()) {
 102  2 QedeqLog.getInstance().logMessage(
 103    "Loading of " + number + " previously successfully loaded module"
 104  2 + (number != 1 ? "s" : "") + " successfully done.");
 105    } else {
 106  0 QedeqLog.getInstance().logMessage(
 107    "Loading of all previously successfully checked modules failed. "
 108  0 + number + " module" + (number != 1 ? "s" : "") + " were loaded.");
 109    }
 110    } catch (Exception e) {
 111  0 Trace.trace(this, method, e);
 112    } finally {
 113  2 Trace.begin(this, method);
 114    }
 115    }
 116    };
 117  2 thread.setDaemon(true);
 118  2 thread.start();
 119    }
 120    }
 121   
 122  0 public final void removeAllModules() {
 123  0 do {
 124  0 synchronized (syncToken) {
 125  0 if (processCounter == 0) {
 126  0 getModules().removeAllModules();
 127  0 return;
 128    }
 129    }
 130  0 synchronized (monitor) {
 131  0 try {
 132  0 monitor.wait(10000);
 133    } catch (InterruptedException e) {
 134    }
 135    }
 136    } while (true);
 137   
 138    }
 139   
 140   
 141    /**
 142    * Remove a QEDEQ module from memory.
 143    *
 144    * @param prop Remove module identified by this property.
 145    */
 146  0 public final void removeModuleAndDependents(final ModuleProperties prop) {
 147  0 do {
 148  0 synchronized (syncToken) {
 149  0 if (processCounter == 0) {
 150  0 getModules().removeModuleAndDependents(prop);
 151  0 return;
 152    }
 153    }
 154  0 synchronized (monitor) {
 155  0 try {
 156  0 this.monitor.wait(10000);
 157    } catch (InterruptedException e) {
 158    }
 159    }
 160    } while (true);
 161   
 162    }
 163   
 164    /**
 165    * Clear local file buffer and all loaded QEDEQ modules.
 166    *
 167    * @throws IOException Deletion of all buffered file was not successful.
 168    */
 169  0 public final void clearLocalBuffer()
 170    throws IOException {
 171  0 removeAllModules();
 172  0 final File bufferDir = new File(getBufferDirectory());
 173  0 if (bufferDir.exists() && !IoUtility.deleteDir(bufferDir)) {
 174  0 throw new IOException("buffer could not be deleted");
 175    }
 176    }
 177   
 178    /**
 179    * Get a certain module.
 180    *
 181    * @param address Address of module.
 182    * @return Wanted module.
 183    * @throws XmlFileExceptionList Module could not be successfully loaded.
 184    */
 185  32 public final QedeqBo loadModule(final String address)
 186    throws XmlFileExceptionList {
 187  32 processInc();
 188  32 try {
 189  32 final ModuleAddress moduleAddress;
 190  32 try {
 191  32 moduleAddress = new DefaultModuleAddress(address);
 192    } catch (IOException e) {
 193  0 throw createXmlFileExceptionList(e);
 194    }
 195  32 return loadModule(moduleAddress);
 196    } finally {
 197  32 processDec();
 198    }
 199    }
 200   
 201   
 202  32 public final QedeqBo loadModule(
 203    final ModuleAddress moduleAddress)
 204    throws XmlFileExceptionList {
 205  32 final String method = "loadModule(ModuleAddress)";
 206  32 processInc();
 207  32 try {
 208  32 final ModuleProperties prop = getModules().getModuleProperties(moduleAddress);
 209  32 synchronized (prop) {
 210  32 if (prop.isLoaded()) {
 211  13 return prop.getModule();
 212    }
 213   
 214    // search in local file buffer
 215  19 try {
 216  19 final QedeqBo mod = loadLocalModule(moduleAddress);
 217  9 return mod;
 218    } catch (ModuleFileNotFoundException e) { // file not found
 219    // nothing to do, we will continue by creating a local copy
 220    } catch (XmlFileExceptionList e) {
 221  10 Trace.trace(this, method, e);
 222  10 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 223    moduleAddress.getURL(), e.getMessage());
 224  10 throw e;
 225    }
 226   
 227    // make local copy
 228  0 try {
 229  0 makeLocalCopy(moduleAddress);
 230    } catch (IOException e) {
 231  0 Trace.trace(this, method, e);
 232  0 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 233    moduleAddress.getURL(), e.getMessage());
 234  0 throw createXmlFileExceptionList(e);
 235    }
 236  0 final QedeqBo mod;
 237  0 try {
 238  0 mod = loadLocalModule(moduleAddress);
 239    } catch (ModuleFileNotFoundException e) {
 240    // FIXME mime 20070415: This should not occur because a local copy was
 241    // at least created a few lines above
 242  0 Trace.trace(this, method, e);
 243  0 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 244    moduleAddress.getURL(), e.getMessage());
 245  0 throw e.createXmlFileExceptionList();
 246    } catch (XmlFileExceptionList e) {
 247  0 Trace.trace(this, method, e);
 248  0 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 249    moduleAddress.getURL(), e.getMessage());
 250  0 throw e;
 251    }
 252  0 return mod;
 253    }
 254    } finally {
 255  32 processDec();
 256    }
 257    }
 258   
 259  0 public final QedeqBo loadModule(final QedeqBo module,
 260    final Specification spec) throws XmlFileExceptionList {
 261   
 262  0 final String method = "loadModule(Module, Specification)";
 263  0 Trace.begin(this, method);
 264  0 Trace.trace(this, method, spec);
 265  0 processInc();
 266  0 try {
 267  0 final ModuleAddress[] modulePaths;
 268  0 try {
 269  0 modulePaths = DefaultModuleAddress.getModulePaths(module, spec);
 270    } catch (IOException e) {
 271  0 Trace.trace(this, method, e);
 272  0 throw createXmlFileExceptionList(e);
 273    }
 274    // search in already loaded modules
 275  0 for (int i = 0; i < modulePaths.length; i++) {
 276  0 final ModuleProperties prop
 277    = getModules().getModuleProperties(modulePaths[i]);
 278  0 synchronized (prop) {
 279  0 if (prop.isLoaded()) {
 280  0 return (prop.getModule());
 281    }
 282    }
 283    }
 284   
 285    // search in local file buffer
 286  0 Trace.trace(this, method, "searching file buffer");
 287  0 for (int i = 0; i < modulePaths.length; i++) {
 288  0 try {
 289  0 final ModuleProperties prop
 290    = getModules().getModuleProperties(modulePaths[i]);
 291  0 Trace.trace(this, method, "synchronizing at prop=" + prop);
 292  0 synchronized (prop) {
 293  0 final QedeqBo mod = loadLocalModule(modulePaths[i]);
 294  0 return mod;
 295    }
 296    } catch (ModuleFileNotFoundException e) {
 297    // file not found try loading URL later on
 298    }
 299    }
 300   
 301    // try loading url directly
 302  0 for (int i = 0; i < modulePaths.length; i++) {
 303  0 try {
 304  0 final ModuleProperties prop
 305    = getModules().getModuleProperties(modulePaths[i]);
 306  0 synchronized (prop) {
 307  0 makeLocalCopy(modulePaths[i]);
 308  0 final QedeqBo mod = loadLocalModule(modulePaths[i]);
 309  0 return mod;
 310    }
 311    } catch (IOException e) {
 312  0 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 313    modulePaths[i].getURL(), e.getMessage());
 314  0 Trace.trace(this, method, e);
 315  0 throw createXmlFileExceptionList(e);
 316    } catch (ModuleFileNotFoundException e) {
 317  0 Trace.trace(this, method, e);
 318  0 QedeqLog.getInstance().logFailureState("Loading of module failed!",
 319    modulePaths[i].getURL(), e.getMessage());
 320  0 throw e.createXmlFileExceptionList();
 321    }
 322    }
 323  0 throw (new ModuleFileNotFoundException("no QEDEQ module found"))
 324    .createXmlFileExceptionList();
 325    } finally {
 326  0 processDec();
 327  0 Trace.end(this, method);
 328    }
 329    }
 330   
 331  2 public final String[] getAllLoadedModules() {
 332  2 return getModules().getAllLoadedModules();
 333    }
 334   
 335    /**
 336    * Load all previously checked QEDEQ modules.
 337    *
 338    * @return Successfully reloaded all modules.
 339    */
 340  2 public final boolean loadPreviouslySuccessfullyLoadedModules() {
 341  2 processInc();
 342  2 try {
 343  2 final String[] list = kernel.getConfig().getPreviouslyCheckedModules();
 344  2 boolean errors = false;
 345  2 for (int i = 0; i < list.length; i++) {
 346  9 try {
 347  9 loadModule(list[i]);
 348    } catch (XmlFileExceptionList e) {
 349  0 errors = true;
 350    }
 351    }
 352  2 return !errors;
 353    } finally {
 354  2 processDec();
 355    }
 356    }
 357   
 358    // LATER mime 20070326: dynamic loading from web page directory
 359  0 public final boolean loadAllModulesFromQedeq() {
 360  0 processInc();
 361  0 try {
 362  0 final String prefix = "http://www.qedeq.org/"
 363    + kernel.getKernelVersionDirectory() + "/";
 364  0 final String[] list = new String[] {
 365    prefix + "doc/math/qedeq_logic_v1.xml",
 366    prefix + "doc/math/qedeq_set_theory_v1.xml",
 367    prefix + "doc/math/qedeq_sample1.xml",
 368    prefix + "doc/project/qedeq_basic_concept.xml",
 369    prefix + "doc/project/qedeq_logic_language.xml",
 370    prefix + "sample/qedeq_error_sample_00.xml",
 371    prefix + "sample/qedeq_error_sample_01.xml",
 372    prefix + "sample/qedeq_error_sample_02.xml",
 373    prefix + "sample/qedeq_error_sample_03.xml",
 374    prefix + "sample/qedeq_error_sample_04.xml",
 375    prefix + "sample/qedeq_sample2_error.xml",
 376    prefix + "sample/qedeq_sample3_error.xml",
 377    prefix + "sample/qedeq_sample4_error.xml",
 378    prefix + "sample/qedeq_sample5_error.xml",
 379    prefix + "sample/qedeq_sample6_error.xml",
 380    prefix + "sample/qedeq_sample7_error.xml",
 381    };
 382  0 boolean errors = false;
 383  0 for (int i = 0; i < list.length; i++) {
 384  0 try {
 385  0 loadModule((String) list[i]);
 386    } catch (XmlFileExceptionList e) {
 387  0 errors = true;
 388    }
 389    }
 390  0 return !errors;
 391    } finally {
 392  0 processDec();
 393    }
 394    }
 395   
 396  19 public final String getLocalName(final ModuleAddress moduleAddress) {
 397  19 if (moduleAddress.isFileAddress()) {
 398  18 return moduleAddress.getPath() + moduleAddress.getFileName();
 399    }
 400  1 return kernel.getBufferDirectory() + "/"
 401    + moduleAddress.localizeInFileSystem(moduleAddress.getAddress());
 402    }
 403   
 404   
 405    /**
 406    * Load a local QEDEQ module.
 407    *
 408    * @param moduleAddress Module address.
 409    * @return Loaded module.
 410    * @throws ModuleFileNotFoundException Local file was not found.
 411    * @throws XmlFileExceptionList Module could not be successfully loaded.
 412    */
 413  19 private final QedeqBo loadLocalModule(
 414    final ModuleAddress moduleAddress)
 415    throws ModuleFileNotFoundException, XmlFileExceptionList {
 416  19 final String method = "loadLocalModule";
 417  19 final String localName = getLocalName(moduleAddress);
 418  19 final File file = new File(localName);
 419  19 if (!file.canRead()) {
 420  0 try {
 421  0 Trace.trace(this, method, "file=" + file.getCanonicalPath());
 422    } catch (IOException e) {
 423  0 Trace.trace(this, method, e);
 424    }
 425  0 throw new ModuleFileNotFoundException("file not found");
 426    }
 427  19 ModuleProperties prop = getModules().getModuleProperties(moduleAddress);
 428  19 if (prop.getLoadingState() == LoadingState.STATE_UNDEFINED) {
 429  19 System.out.println("Adding undefined"); // FIXME remove me
 430  19 prop.setLoadingProgressState(LoadingState.STATE_LOADING_FROM_BUFFER);
 431  19 ModuleEventLog.getInstance().addModule(prop);
 432    } else {
 433  0 System.out.println("Adding defined"); // FIXME remove me
 434  0 prop.setLoadingProgressState(LoadingState.STATE_LOADING_FROM_BUFFER);
 435  0 ModuleEventLog.getInstance().stateChanged(prop);
 436    }
 437  19 SaxDefaultHandler handler = new SaxDefaultHandler();
 438  19 QedeqHandler simple = new QedeqHandler(handler);
 439  19 handler.setBasisDocumentHandler(simple);
 440  19 Qedeq qedeq = null;
 441  19 SaxParser parser = null;
 442  19 try {
 443  19 parser = new SaxParser(handler);
 444    } catch (SAXException e) {
 445  0 Trace.trace(this, method, e);
 446  0 prop.setLoadingFailureState(LoadingState.STATE_LOADING_FROM_BUFFER_FAILED, e);
 447  0 ModuleEventLog.getInstance().stateChanged(prop);
 448  0 throw createXmlFileExceptionList(e);
 449    } catch (ParserConfigurationException e) {
 450  0 Trace.trace(this, method, e);
 451  0 prop.setLoadingFailureState(LoadingState.STATE_LOADING_FROM_BUFFER_FAILED, e);
 452  0 ModuleEventLog.getInstance().stateChanged(prop);
 453  0 throw createXmlFileExceptionList(e);
 454    }
 455  19 try {
 456  19 parser.parse(file);
 457    } catch (XmlFileExceptionList e) {
 458  4 Trace.trace(this, method, e);
 459  4 prop.setLoadingFailureState(LoadingState.STATE_LOADING_FROM_BUFFER_FAILED, e);
 460  4 ModuleEventLog.getInstance().stateChanged(prop);
 461  4 throw e;
 462    }
 463  15 qedeq = simple.getQedeq();
 464  15 prop.setLoadingProgressState(LoadingState.STATE_LOADING_INTO_MEMORY);
 465  15 ModuleEventLog.getInstance().stateChanged(prop);
 466  15 final QedeqBo qedeqBo;
 467  15 try {
 468  15 qedeqBo = QedeqBoFactory.createQedeq(file.getAbsolutePath(), qedeq);
 469  9 qedeqBo.setModuleAddress(prop.getModuleAddress());
 470    } catch (ModuleDataException e) {
 471  6 Trace.trace(this, method, e);
 472  6 prop.setLoadingFailureState(LoadingState.STATE_LOADING_INTO_MEMORY_FAILED, e);
 473  6 ModuleEventLog.getInstance().stateChanged(prop);
 474  6 throw ModuleDataException2XmlFileException.createXmlFileExceptionList(e, qedeq);
 475    }
 476  9 prop.setLoaded(qedeqBo);
 477  9 ModuleEventLog.getInstance().stateChanged(prop);
 478  9 return qedeqBo;
 479    }
 480   
 481    /**
 482    * Make local copy of a module if it is no file address.
 483    *
 484    * @param moduleAddress module address
 485    * @throws IOException if address was malformed or the file can not be found
 486    */
 487  0 private final synchronized void makeLocalCopy(
 488    final ModuleAddress moduleAddress)
 489    throws IOException {
 490  0 final String method = "makeLocalCopy";
 491  0 Trace.begin(this, method);
 492  0 ModuleProperties prop = getModules().getModuleProperties(moduleAddress);
 493   
 494  0 if (prop.getLoadingState() == LoadingState.STATE_UNDEFINED) {
 495  0 prop.setLoadingProgressState(LoadingState.STATE_LOADING_FROM_WEB);
 496  0 ModuleEventLog.getInstance().addModule(prop);
 497    } else {
 498  0 prop.setLoadingProgressState(LoadingState.STATE_LOADING_FROM_WEB);
 499  0 ModuleEventLog.getInstance().stateChanged(prop);
 500    }
 501   
 502  0 if (moduleAddress.isFileAddress()) {
 503  0 return;
 504    }
 505  0 FileOutputStream out = null;
 506  0 InputStream in = null;
 507  0 try {
 508  0 final URLConnection connection = moduleAddress.getURL().openConnection();
 509  0 in = connection.getInputStream();
 510  0 final int maximum = connection.getContentLength();
 511  0 if (!moduleAddress.getURL().equals(connection.getURL())) {
 512  0 throw new FileNotFoundException("\"" + moduleAddress.getURL()
 513    + "\" was substituted by " + "\"" + connection.getURL()
 514    + "\" from server");
 515    }
 516    { // assure existence of directories
 517  0 final String localName = getLocalName(moduleAddress);
 518  0 System.out.println(localName);
 519  0 final File f = new File(localName).getParentFile();
 520  0 f.mkdirs();
 521    }
 522  0 out = new FileOutputStream(getLocalName(moduleAddress));
 523  0 final byte[] buffer = new byte[4096];
 524  0 int bytesRead; // bytes read during one buffer read
 525  0 int position = 0; // current reading position within the whole document
 526    // continue writing
 527  0 while ((bytesRead = in.read(buffer)) != -1) {
 528  0 position += bytesRead;
 529  0 out.write(buffer, 0, bytesRead);
 530  0 int completeness = (int) (position * 100 / maximum);
 531  0 if (completeness < 0) {
 532  0 completeness = 0;
 533    }
 534  0 if (completeness > 100) {
 535  0 completeness = 100;
 536    }
 537  0 prop.setLoadingCompleteness(completeness);
 538    }
 539  0 prop.setLoadingCompleteness(100);
 540    } catch (IOException e) {
 541  0 Trace.trace(this, method, e);
 542  0 try {
 543  0 out.close();
 544    } catch (Exception ex) {
 545    }
 546  0 try {
 547  0 new File(getLocalName(moduleAddress)).delete();
 548    } catch (Exception ex) {
 549  0 Trace.trace(this, method, ex);
 550    }
 551  0 prop.setLoadingFailureState(LoadingState.STATE_LOADING_FROM_WEB_FAILED, e);
 552  0 ModuleEventLog.getInstance().stateChanged(prop);
 553  0 Trace.trace(this, method, "Couldn't access " + moduleAddress.getURL());
 554  0 throw e;
 555    } finally {
 556  0 try {
 557  0 out.close();
 558    } catch (Exception e) {
 559    };
 560  0 try {
 561  0 in.close();
 562    } catch (Exception e) {
 563    };
 564  0 Trace.end(this, method);
 565    }
 566    }
 567   
 568    /**
 569    * Increment intern process counter.
 570    */
 571  66 private final void processInc() {
 572  66 synchronized (syncToken) {
 573  66 this.processCounter++;
 574    }
 575    }
 576   
 577   
 578    /**
 579    * Decrement intern process counter.
 580    */
 581  66 private final void processDec() {
 582  66 synchronized (syncToken) {
 583  66 this.processCounter--;
 584    }
 585    }
 586   
 587  1 public final String getBufferDirectory() {
 588  1 return kernel.getConfig().getBufferDirectory();
 589    }
 590   
 591  0 public final String getGenerationDirectory() {
 592  0 return kernel.getConfig().getGenerationDirectory();
 593    }
 594   
 595  0 public final ModuleProperties getModuleProperties(final String address) {
 596  0 try {
 597  0 final ModuleProperties prop = getModules().getModuleProperties(address);
 598  0 return prop;
 599    } catch (IOException e) {
 600  0 Trace.trace(this, "getModuleProperties", e);
 601  0 return null;
 602    }
 603    }
 604   
 605    /**
 606    * Get all loaded QEDEQ modules.
 607    *
 608    * @return All QEDEQ modules.
 609    */
 610  53 private final Modules getModules() {
 611  53 return modules;
 612    }
 613   
 614  0 private XmlFileExceptionList createXmlFileExceptionList(final IOException e) {
 615  0 return new DefaultXmlFileExceptionList(e);
 616    }
 617   
 618  0 private XmlFileExceptionList createXmlFileExceptionList(final ParserConfigurationException e) {
 619  0 final DefaultXmlFileExceptionList list
 620    = new DefaultXmlFileExceptionList();
 621  0 list.add(e);
 622  0 return list;
 623    }
 624   
 625  0 private DefaultXmlFileExceptionList createXmlFileExceptionList(final SAXException e) {
 626  0 final DefaultXmlFileExceptionList list
 627    = new DefaultXmlFileExceptionList();
 628  0 list.add(e);
 629  0 return list;
 630    }
 631   
 632    }