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.OWLAPIReasoner;
027    
028    /**
029    * automatically generated, do not edit manually.
030    * run org.dllearner.scripts.ConfigJavaGenerator to update
031    **/
032    public  class OWLAPIReasonerConfigurator  implements Configurator {
033    
034    private boolean reinitNecessary = false;
035    private OWLAPIReasoner oWLAPIReasoner;
036    
037    /**
038    * @param oWLAPIReasoner see OWLAPIReasoner
039    **/
040    public OWLAPIReasonerConfigurator(OWLAPIReasoner oWLAPIReasoner){
041    this.oWLAPIReasoner = oWLAPIReasoner;
042    }
043    
044    /**
045    * @param knowledgeSource see knowledgeSource
046    * @return OWLAPIReasoner
047    **/
048    public static OWLAPIReasoner getOWLAPIReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
049    OWLAPIReasoner component = ComponentManager.getInstance().reasoner(OWLAPIReasoner.class, knowledgeSource);
050    return component;
051    }
052    
053    /**
054    * reasonerType FaCT++, HermiT, OWLlink or Pellet, which means "fact", "hermit", "owllink" or "pellet".
055    * mandatory: false| reinit necessary: true
056    * default value: pellet
057    * @return String 
058    **/
059    public String getReasonerType() {
060    return (String) ComponentManager.getInstance().getConfigOptionValue(oWLAPIReasoner,  "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(oWLAPIReasoner,  "owlLinkURL") ;
070    }
071    
072    /**
073    * @param reasonerType FaCT++, HermiT, OWLlink or Pellet, which means "fact", "hermit", "owllink" or "pellet".
074    * mandatory: false| reinit necessary: true
075    * default value: pellet
076    **/
077    public void setReasonerType(String reasonerType) {
078    ComponentManager.getInstance().applyConfigEntry(oWLAPIReasoner, "reasonerType", reasonerType);
079    reinitNecessary = true;
080    }
081    /**
082    * @param owlLinkURL the URL to the remote OWLlink server.
083    * mandatory: false| reinit necessary: true
084    * default value: http://localhost:8080/
085    **/
086    public void setOwlLinkURL(URL owlLinkURL) {
087    ComponentManager.getInstance().applyConfigEntry(oWLAPIReasoner, "owlLinkURL", owlLinkURL);
088    reinitNecessary = true;
089    }
090    
091    /**
092    * true, if this component needs reinitializsation.
093    * @return boolean
094    **/
095    public boolean isReinitNecessary(){
096    return reinitNecessary;
097    }
098    
099    
100    }