Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
0   94   0   -
0   19   -   0
0     -  
1    
 
  QedeqFileDao       Line # 36 0 0 - -1.0
 
No Tests
 
1    /* $Id: QedeqFileDao.java,v 1.1 2008/07/26 07:58:31 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, 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.module;
19   
20    import java.io.File;
21    import java.io.IOException;
22    import java.io.Reader;
23   
24    import org.qedeq.kernel.base.module.Qedeq;
25    import org.qedeq.kernel.bo.QedeqBo;
26    import org.qedeq.kernel.common.ModuleContext;
27    import org.qedeq.kernel.common.SourceArea;
28    import org.qedeq.kernel.common.SourceFileExceptionList;
29   
30    /**
31    * An instance of this interface can load and save QEDEQ module files.
32    *
33    * @version $Revision: 1.1 $
34    * @author Michael Meyling
35    */
 
36    public interface QedeqFileDao {
37   
38    /**
39    * Set kernel services. Is called by the kernel to give this loader the opportunity to
40    * use kernel services within its methods. This is the first method the kernel calls.
41    *
42    * @param services Internal kernel services.
43    */
44    public void setServices(InternalKernelServices services);
45   
46    /**
47    * Get kernel services.
48    *
49    * @return Internal kernel services.
50    */
51    public InternalKernelServices getServices();
52   
53    /**
54    * Load a QEDEQ module from file.
55    *
56    * @param prop Module properties.
57    * @param localFile Load XML file from tbis location.
58    * @return Loaded QEDEQ.
59    * @throws SourceFileExceptionList Module could not be successfully loaded.
60    * @throws IOException File loading failed.
61    */
62    public Qedeq loadQedeq(QedeqBo prop, final File localFile)
63    throws SourceFileExceptionList, IOException;
64   
65    /**
66    * Save a QEDEQ module as file.
67    *
68    * @param prop Module properties.
69    * @param localFile Save module in this file.
70    * @throws SourceFileExceptionList Module could not be successfully saved.
71    * @throws IOException File saving failed.
72    */
73    public void saveQedeq(KernelQedeqBo prop, final File localFile)
74    throws SourceFileExceptionList, IOException;
75   
76    /**
77    * Get area in source file for QEDEQ module context.
78    *
79    * @param qedeq Look at this QEDEQ module.
80    * @param context Search for this context.
81    * @return Created file area. Maybe <code>null</code>.
82    */
83    public SourceArea createSourceArea(Qedeq qedeq, ModuleContext context);
84   
85    /**
86    * Get reader for local buffered QEDEQ module.
87    *
88    * @param prop QEDEQ BO.
89    * @return Reader.
90    * @throws IOException Reading failed.
91    */
92    public Reader getModuleReader(KernelQedeqBo prop) throws IOException;
93   
94    }