Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
0   248   0   -
0   42   -   0
0     -  
1    
 
  QedeqBo       Line # 35 0 0 - -1.0
 
No Tests
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, 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.common;
17   
18    import org.qedeq.kernel.se.base.module.Qedeq;
19    import org.qedeq.kernel.se.common.ModuleAddress;
20    import org.qedeq.kernel.se.common.Service;
21    import org.qedeq.kernel.se.common.SourceFileExceptionList;
22    import org.qedeq.kernel.se.state.AbstractState;
23    import org.qedeq.kernel.se.state.DependencyState;
24    import org.qedeq.kernel.se.state.FormallyProvedState;
25    import org.qedeq.kernel.se.state.LoadingImportsState;
26    import org.qedeq.kernel.se.state.LoadingState;
27    import org.qedeq.kernel.se.state.WellFormedState;
28   
29   
30    /**
31    * Represents a module and its states.
32    *
33    * @author Michael Meyling
34    */
 
35    public interface QedeqBo {
36   
37    /**
38    * Has the module any basic failures? This includes errors during loading the module, during load
39    * of imported modules and logical checking. This includes no plugin errors.
40    *
41    * @return wWre there any basic errors?
42    */
43    public boolean hasBasicFailures();
44   
45    /**
46    * Is this a error state the module is in?
47    *
48    * @return Were there any errors?
49    */
50    public boolean hasErrors();
51   
52    /**
53    * Is this a warning state the module is in?
54    *
55    * @return Were there any warnings?
56    */
57    public boolean hasWarnings();
58   
59    /**
60    * Get {@link ModuleAddress} of module.
61    *
62    * @return Address of module.
63    */
64    public ModuleAddress getModuleAddress();
65   
66    /**
67    * Get the last successful state of the module.
68    *
69    * @return Last successful module state.
70    */
71    public AbstractState getLastSuccessfulState();
72   
73    /**
74    * Get the current state of the module.
75    *
76    * @return Current module state.
77    */
78    public AbstractState getCurrentState();
79   
80    /**
81    * Get currently running service.
82    *
83    * @return Currently running service. Might be <code>null</code>.
84    */
85    public Service getCurrentlyRunningService();
86   
87    /**
88    * Get module loading state.
89    *
90    * @return Module state.
91    */
92    public LoadingState getLoadingState();
93   
94    /**
95    * Set completeness percentage.
96    *
97    * @return completeness Completeness of loading into memory in percent.
98    */
99    public int getLoadingCompleteness();
100   
101    /**
102    * Get module loading imports state.
103    *
104    * @return module state.
105    */
106    public LoadingImportsState getLoadingImportsState();
107   
108    /**
109    * Get module dependency state.
110    *
111    * @return module state.
112    */
113    public DependencyState getDependencyState();
114   
115    /**
116    * Get module logical well formed state.
117    *
118    * @return module state.
119    */
120    public WellFormedState getWellFormedState();
121   
122    /**
123    * Get module logical formally proved state.
124    *
125    * @return module state.
126    */
127    public FormallyProvedState getFormallyProvedState();
128   
129    /**
130    * Get error list.
131    *
132    * @return Error list.
133    */
134    public SourceFileExceptionList getErrors();
135   
136    /**
137    * Get warning list.
138    *
139    * @return Warning list.
140    */
141    public SourceFileExceptionList getWarnings();
142   
143    /**
144    * Get module state description.
145    *
146    * @return module state description.
147    */
148    public String getStateDescription();
149   
150    /**
151    * Get name of module.
152    *
153    * @return module name.
154    */
155    public String getName();
156   
157    /**
158    * Get rule version information.
159    *
160    * @return rule version.
161    */
162    public String getRuleVersion();
163   
164    /**
165    * Get original URL of module.
166    *
167    * @return URL of module.
168    */
169    public String getUrl();
170   
171    /**
172    * Is this module already loaded?
173    *
174    * @return Is this module already loaded?
175    */
176    public boolean isLoaded();
177   
178    /**
179    * Get module. Works only if module is already completely loaded.
180    *
181    * @return QEDEQ module if it is already loaded.
182    */
183    public Qedeq getQedeq();
184   
185    /**
186    * Are all directly imported modules loaded?
187    *
188    * @return Are all directly imported modules loaded?
189    */
190    public boolean hasLoadedImports();
191   
192    /**
193    * Are all required modules loaded?
194    *
195    * @return Are all required modules loaded?
196    */
197    public boolean hasLoadedRequiredModules();
198   
199    /**
200    * Get labels and URLs of all referenced modules. Only available if module has loaded
201    * all required modules. Otherwise a runtime exception is thrown.
202    *
203    * @return URLs of all referenced modules.
204    * @throws IllegalStateException Module not yet loaded.
205    */
206    public ModuleReferenceList getRequiredModules();
207   
208    /**
209    * Was the module successfully checked for being well formed?
210    *
211    *
212    * @return Module was checked?
213    */
214    public boolean isWellFormed();
215   
216    /**
217    * Was the module successfully checked for being fully formal correct proved?
218    *
219    *
220    * @return Module was checked?
221    */
222    public boolean isFullyFormallyProved();
223   
224    /**
225    * Get all supported languages for this QEDEQ module.
226    *
227    * @return Array of supported languages.
228    */
229    public String[] getSupportedLanguages();
230   
231    /**
232    * Is the given language supported.
233    *
234    * @param language Language.
235    * @return Is this language supported?
236    */
237    public boolean isSupportedLanguage(String language);
238   
239    /**
240    * Get default language for this QEDEQ module. This should be the original language
241    * of the module before it was translated. This value should be also within
242    * {@link #getSupportedLanguages()}.
243    *
244    * @return Original language.
245    */
246    public String getOriginalLanguage();
247   
248    }