Clover Coverage Report
Coverage timestamp: Sat Sep 18 2010 04:09:52 UTC
0   91   0   -
0   19   -   0
0     -  
1    
 
  QedeqFileDao       Line # 34 0 0 - -1.0
 
No Tests
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2010, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.bo.module;
17   
18    import java.io.File;
19    import java.io.IOException;
20    import java.io.Reader;
21   
22    import org.qedeq.base.io.SourceArea;
23    import org.qedeq.kernel.base.module.Qedeq;
24    import org.qedeq.kernel.bo.QedeqBo;
25    import org.qedeq.kernel.common.ModuleContext;
26    import org.qedeq.kernel.common.SourceFileExceptionList;
27   
28    /**
29    * An instance of this interface can load and save QEDEQ module files.
30    *
31    * @version $Revision: 1.1 $
32    * @author Michael Meyling
33    */
 
34    public interface QedeqFileDao {
35   
36    /**
37    * Set kernel services. Is called by the kernel to give this loader the opportunity to
38    * use kernel services within its methods. This is the first method the kernel calls.
39    *
40    * @param services Internal kernel services.
41    */
42    public void setServices(InternalKernelServices services);
43   
44    /**
45    * Get kernel services.
46    *
47    * @return Internal kernel services.
48    */
49    public InternalKernelServices getServices();
50   
51    /**
52    * Load a QEDEQ module from file.
53    *
54    * @param prop Module properties.
55    * @param localFile Load XML file from tbis location.
56    * @return Loaded QEDEQ.
57    * @throws SourceFileExceptionList Module could not be successfully loaded.
58    */
59    public Qedeq loadQedeq(QedeqBo prop, final File localFile)
60    throws SourceFileExceptionList;
61   
62    /**
63    * Save a QEDEQ module as file.
64    *
65    * @param prop Module properties.
66    * @param localFile Save module in this file.
67    * @throws SourceFileExceptionList Module could not be successfully saved.
68    * @throws IOException File saving failed.
69    */
70    public void saveQedeq(KernelQedeqBo prop, final File localFile)
71    throws SourceFileExceptionList, IOException;
72   
73    /**
74    * Get area in source file for QEDEQ module context.
75    *
76    * @param qedeq Look at this QEDEQ module.
77    * @param context Search for this context.
78    * @return Created file area. Maybe <code>null</code>.
79    */
80    public SourceArea createSourceArea(Qedeq qedeq, ModuleContext context);
81   
82    /**
83    * Get reader for local buffered QEDEQ module.
84    *
85    * @param prop QEDEQ BO.
86    * @return Reader.
87    * @throws IOException Reading failed.
88    */
89    public Reader getModuleReader(KernelQedeqBo prop) throws IOException;
90   
91    }