001 /**
002 * Copyright (C) 2007-2011, Jens Lehmann
003 *
004 * This file is part of DL-Learner.
005 *
006 * DL-Learner is free software; you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation; either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * DL-Learner is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014 * GNU General Public License for more details.
015 *
016 * You should have received a copy of the GNU General Public License
017 * along with this program. If not, see <http://www.gnu.org/licenses/>.
018 */
019
020 package org.dllearner.core.configurators;
021
022 import java.net.URL;
023 import java.util.Set;
024 import org.dllearner.algorithms.BruteForceLearner;
025 import org.dllearner.algorithms.RandomGuesser;
026 import org.dllearner.algorithms.celoe.CELOE;
027 import org.dllearner.algorithms.el.ELLearningAlgorithm;
028 import org.dllearner.algorithms.el.ELLearningAlgorithmDisjunctive;
029 import org.dllearner.algorithms.fuzzydll.FuzzyCELOE;
030 import org.dllearner.algorithms.gp.GP;
031 import org.dllearner.algorithms.isle.ISLE;
032 import org.dllearner.algorithms.ocel.OCEL;
033 import org.dllearner.algorithms.refinement.ROLearner;
034 import org.dllearner.core.AbstractKnowledgeSource;
035 import org.dllearner.core.AbstractLearningProblem;
036 import org.dllearner.core.LearningProblemUnsupportedException;
037 import org.dllearner.core.AbstractReasonerComponent;
038 import org.dllearner.kb.KBFile;
039 import org.dllearner.kb.OWLAPIOntology;
040 import org.dllearner.kb.OWLFile;
041 import org.dllearner.kb.SparqlEndpointKS;
042 import org.dllearner.kb.sparql.SparqlKnowledgeSource;
043 import org.dllearner.learningproblems.ClassLearningProblem;
044 import org.dllearner.learningproblems.PosNegLPStandard;
045 import org.dllearner.learningproblems.PosNegLPStrict;
046 import org.dllearner.learningproblems.PosOnlyLP;
047 import org.dllearner.learningproblems.fuzzydll.FuzzyPosNegLPStandard;
048 import org.dllearner.reasoning.DIGReasoner;
049 import org.dllearner.reasoning.FastInstanceChecker;
050 import org.dllearner.reasoning.FastRetrievalReasoner;
051 import org.dllearner.reasoning.OWLAPIReasoner;
052 import org.dllearner.reasoning.PelletReasoner;
053 import org.dllearner.reasoning.ProtegeReasoner;
054 import org.dllearner.reasoning.fuzzydll.FuzzyOWLAPIReasoner;
055
056 /**
057 * automatically generated, do not edit manually.
058 * run org.dllearner.scripts.ConfigJavaGenerator to update
059 **/
060 public final class ComponentFactory {
061
062 private ComponentFactory(){}
063
064 /**
065 * @return a component ready for initialization KBFile
066 **/
067 public static KBFile getKBFile() {
068 return KBFileConfigurator.getKBFile();
069 }
070
071 /**
072 * @return a component ready for initialization OWLAPIOntology
073 **/
074 public static OWLAPIOntology getOWLAPIOntology() {
075 return OWLAPIOntologyConfigurator.getOWLAPIOntology();
076 }
077
078 /**
079 * @param url URL pointing to the OWL file
080 * @return a component ready for initialization OWLFile
081 **/
082 public static OWLFile getOWLFile(URL url) {
083 return OWLFileConfigurator.getOWLFile(url);
084 }
085
086 /**
087 * @return a component ready for initialization SparqlEndpointKS
088 **/
089 //public static SparqlEndpointKS getSparqlEndpointKS() {
090 //return SparqlEndpointKSConfigurator.getSparqlEndpointKS();
091 //}
092
093 /**
094 * @param url URL of SPARQL Endpoint
095 * @param instances relevant instances e.g. positive and negative examples in a learning problem
096 * @return a component ready for initialization SparqlKnowledgeSource
097 **/
098 public static SparqlKnowledgeSource getSparqlKnowledgeSource(URL url, Set<String> instances) {
099 return SparqlKnowledgeSourceConfigurator.getSparqlKnowledgeSource(url, instances);
100 }
101
102 /**
103 * @param knowledgeSource see KnowledgeSource
104 * @return a component ready for initialization DIGReasoner
105 **/
106 public static DIGReasoner getDIGReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
107 return DIGReasonerConfigurator.getDIGReasoner(knowledgeSource);
108 }
109
110 /**
111 * @param knowledgeSource see KnowledgeSource
112 * @return a component ready for initialization FastInstanceChecker
113 **/
114 public static FastInstanceChecker getFastInstanceChecker(Set<AbstractKnowledgeSource> knowledgeSource) {
115 return FastInstanceCheckerConfigurator.getFastInstanceChecker(knowledgeSource);
116 }
117
118 /**
119 * @param knowledgeSource see KnowledgeSource
120 * @return a component ready for initialization FastRetrievalReasoner
121 **/
122 public static FastRetrievalReasoner getFastRetrievalReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
123 return FastRetrievalReasonerConfigurator.getFastRetrievalReasoner(knowledgeSource);
124 }
125
126 /**
127 * @param knowledgeSource see KnowledgeSource
128 * @return a component ready for initialization OWLAPIReasoner
129 **/
130 public static OWLAPIReasoner getOWLAPIReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
131 return OWLAPIReasonerConfigurator.getOWLAPIReasoner(knowledgeSource);
132 }
133
134 /**
135 * @param knowledgeSource see KnowledgeSource
136 * @return a component ready for initialization PelletReasoner
137 **/
138 public static PelletReasoner getPelletReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
139 return PelletReasonerConfigurator.getPelletReasoner(knowledgeSource);
140 }
141
142 /**
143 * @param knowledgeSource see KnowledgeSource
144 * @return a component ready for initialization ProtegeReasoner
145 **/
146 public static ProtegeReasoner getProtegeReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
147 return ProtegeReasonerConfigurator.getProtegeReasoner(knowledgeSource);
148 }
149
150 /**
151 * @param knowledgeSource see KnowledgeSource
152 * @return a component ready for initialization FuzzyOWLAPIReasoner
153 **/
154 public static FuzzyOWLAPIReasoner getFuzzyOWLAPIReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
155 return FuzzyOWLAPIReasonerConfigurator.getFuzzyOWLAPIReasoner(knowledgeSource);
156 }
157
158 /**
159 * @param classToDescribe class of which a description should be learned
160 * @param reasoningService see ReasoningService
161 * @return a component ready for initialization ClassLearningProblem
162 **/
163 public static ClassLearningProblem getClassLearningProblem(AbstractReasonerComponent reasoningService, URL classToDescribe) {
164 return ClassLearningProblemConfigurator.getClassLearningProblem(reasoningService, classToDescribe);
165 }
166
167 /**
168 * @param positiveExamples positive examples
169 * @param negativeExamples negative examples
170 * @param reasoningService see ReasoningService
171 * @return a component ready for initialization PosNegLPStandard
172 **/
173 public static PosNegLPStandard getPosNegLPStandard(AbstractReasonerComponent reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) {
174 return PosNegLPStandardConfigurator.getPosNegLPStandard(reasoningService, positiveExamples, negativeExamples);
175 }
176
177 /**
178 * @param positiveExamples positive examples
179 * @param negativeExamples negative examples
180 * @param reasoningService see ReasoningService
181 * @return a component ready for initialization PosNegLPStrict
182 **/
183 public static PosNegLPStrict getPosNegLPStrict(AbstractReasonerComponent reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) {
184 return PosNegLPStrictConfigurator.getPosNegLPStrict(reasoningService, positiveExamples, negativeExamples);
185 }
186
187 /**
188 * @param positiveExamples positive examples
189 * @param reasoningService see ReasoningService
190 * @return a component ready for initialization PosOnlyLP
191 **/
192 public static PosOnlyLP getPosOnlyLP(AbstractReasonerComponent reasoningService, Set<String> positiveExamples) {
193 return PosOnlyLPConfigurator.getPosOnlyLP(reasoningService, positiveExamples);
194 }
195
196 /**
197 * @param fuzzyExamples fuzzy examples
198 * @param positiveExamples positive examples
199 * @param negativeExamples negative examples
200 * @param reasoningService see ReasoningService
201 * @return a component ready for initialization FuzzyPosNegLPStandard
202 **/
203 public static FuzzyPosNegLPStandard getFuzzyPosNegLPStandard(AbstractReasonerComponent reasoningService, Set<Object> fuzzyExamples, Set<String> positiveExamples, Set<String> negativeExamples) {
204 return FuzzyPosNegLPStandardConfigurator.getFuzzyPosNegLPStandard(reasoningService, fuzzyExamples, positiveExamples, negativeExamples);
205 }
206
207 /**
208 * @param learningProblem see LearningProblem
209 * @param reasoningService see ReasoningService
210 * @throws LearningProblemUnsupportedException see
211 * @return a component ready for initialization BruteForceLearner
212 **/
213 public static BruteForceLearner getBruteForceLearner(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
214 return BruteForceLearnerConfigurator.getBruteForceLearner(learningProblem, reasoningService);
215 }
216
217 /**
218 * @param learningProblem see LearningProblem
219 * @param reasoningService see ReasoningService
220 * @throws LearningProblemUnsupportedException see
221 * @return a component ready for initialization RandomGuesser
222 **/
223 public static RandomGuesser getRandomGuesser(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
224 return RandomGuesserConfigurator.getRandomGuesser(learningProblem, reasoningService);
225 }
226
227 /**
228 * @param learningProblem see LearningProblem
229 * @param reasoningService see ReasoningService
230 * @throws LearningProblemUnsupportedException see
231 * @return a component ready for initialization CELOE
232 **/
233 public static CELOE getCELOE(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
234 return CELOEConfigurator.getCELOE(learningProblem, reasoningService);
235 }
236
237 /**
238 * @param learningProblem see LearningProblem
239 * @param reasoningService see ReasoningService
240 * @throws LearningProblemUnsupportedException see
241 * @return a component ready for initialization ELLearningAlgorithm
242 **/
243 public static ELLearningAlgorithm getELLearningAlgorithm(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
244 return ELLearningAlgorithmConfigurator.getELLearningAlgorithm(learningProblem, reasoningService);
245 }
246
247 /**
248 * @param learningProblem see LearningProblem
249 * @param reasoningService see ReasoningService
250 * @throws LearningProblemUnsupportedException see
251 * @return a component ready for initialization ELLearningAlgorithmDisjunctive
252 **/
253 public static ELLearningAlgorithmDisjunctive getELLearningAlgorithmDisjunctive(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
254 return ELLearningAlgorithmDisjunctiveConfigurator.getELLearningAlgorithmDisjunctive(learningProblem, reasoningService);
255 }
256
257 /**
258 * @param learningProblem see LearningProblem
259 * @param reasoningService see ReasoningService
260 * @throws LearningProblemUnsupportedException see
261 * @return a component ready for initialization FuzzyCELOE
262 **/
263 public static FuzzyCELOE getFuzzyCELOE(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
264 return FuzzyCELOEConfigurator.getFuzzyCELOE(learningProblem, reasoningService);
265 }
266
267 /**
268 * @param learningProblem see LearningProblem
269 * @param reasoningService see ReasoningService
270 * @throws LearningProblemUnsupportedException see
271 * @return a component ready for initialization GP
272 **/
273 public static GP getGP(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
274 return GPConfigurator.getGP(learningProblem, reasoningService);
275 }
276
277 /**
278 * @param learningProblem see LearningProblem
279 * @param reasoningService see ReasoningService
280 * @throws LearningProblemUnsupportedException see
281 * @return a component ready for initialization ISLE
282 **/
283 public static ISLE getISLE(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
284 return ISLEConfigurator.getISLE(learningProblem, reasoningService);
285 }
286
287 /**
288 * @param learningProblem see LearningProblem
289 * @param reasoningService see ReasoningService
290 * @throws LearningProblemUnsupportedException see
291 * @return a component ready for initialization OCEL
292 **/
293 public static OCEL getOCEL(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
294 return OCELConfigurator.getOCEL(learningProblem, reasoningService);
295 }
296
297 /**
298 * @param learningProblem see LearningProblem
299 * @param reasoningService see ReasoningService
300 * @throws LearningProblemUnsupportedException see
301 * @return a component ready for initialization ROLearner
302 **/
303 public static ROLearner getROLearner(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException {
304 return ROLearnerConfigurator.getROLearner(learningProblem, reasoningService);
305 }
306
307
308 }