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.core.ComponentManager;
025 import org.dllearner.core.AbstractKnowledgeSource;
026 import org.dllearner.reasoning.FastInstanceChecker;
027
028 /**
029 * automatically generated, do not edit manually.
030 * run org.dllearner.scripts.ConfigJavaGenerator to update
031 **/
032 public class FastInstanceCheckerConfigurator implements Configurator {
033
034 private boolean reinitNecessary = false;
035 private FastInstanceChecker fastInstanceChecker;
036
037 /**
038 * @param fastInstanceChecker see FastInstanceChecker
039 **/
040 public FastInstanceCheckerConfigurator(FastInstanceChecker fastInstanceChecker){
041 this.fastInstanceChecker = fastInstanceChecker;
042 }
043
044 /**
045 * @param knowledgeSource see knowledgeSource
046 * @return FastInstanceChecker
047 **/
048 public static FastInstanceChecker getFastInstanceChecker(Set<AbstractKnowledgeSource> knowledgeSource) {
049 FastInstanceChecker component = ComponentManager.getInstance().reasoner(FastInstanceChecker.class, knowledgeSource);
050 return component;
051 }
052
053 /**
054 * reasonerType FaCT++, HermiT, OWLlink or Pellet to dematerialize.
055 * mandatory: false| reinit necessary: true
056 * default value: pellet
057 * @return String
058 **/
059 public String getReasonerType() {
060 return (String) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "reasonerType") ;
061 }
062 /**
063 * owlLinkURL the URL to the remote OWLlink server.
064 * mandatory: false| reinit necessary: true
065 * default value: http://localhost:8080/
066 * @return URL
067 **/
068 public URL getOwlLinkURL() {
069 return (URL) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "owlLinkURL") ;
070 }
071 /**
072 * defaultNegation Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class..
073 * mandatory: false| reinit necessary: true
074 * default value: true
075 * @return boolean
076 **/
077 public boolean getDefaultNegation() {
078 return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "defaultNegation") ;
079 }
080
081 /**
082 * @param reasonerType FaCT++, HermiT, OWLlink or Pellet to dematerialize.
083 * mandatory: false| reinit necessary: true
084 * default value: pellet
085 **/
086 public void setReasonerType(String reasonerType) {
087 ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "reasonerType", reasonerType);
088 reinitNecessary = true;
089 }
090 /**
091 * @param owlLinkURL the URL to the remote OWLlink server.
092 * mandatory: false| reinit necessary: true
093 * default value: http://localhost:8080/
094 **/
095 public void setOwlLinkURL(URL owlLinkURL) {
096 ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "owlLinkURL", owlLinkURL);
097 reinitNecessary = true;
098 }
099 /**
100 * @param defaultNegation Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class..
101 * mandatory: false| reinit necessary: true
102 * default value: true
103 **/
104 public void setDefaultNegation(boolean defaultNegation) {
105 ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "defaultNegation", defaultNegation);
106 reinitNecessary = true;
107 }
108
109 /**
110 * true, if this component needs reinitializsation.
111 * @return boolean
112 **/
113 public boolean isReinitNecessary(){
114 return reinitNecessary;
115 }
116
117
118 }