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.util.Set;
023    import org.dllearner.core.ComponentManager;
024    import org.dllearner.core.AbstractKnowledgeSource;
025    import org.dllearner.reasoning.DIGReasoner;
026    
027    /**
028    * automatically generated, do not edit manually.
029    * run org.dllearner.scripts.ConfigJavaGenerator to update
030    **/
031    public  class DIGReasonerConfigurator  implements Configurator {
032    
033    private boolean reinitNecessary = false;
034    private DIGReasoner dIGReasoner;
035    
036    /**
037    * @param dIGReasoner see DIGReasoner
038    **/
039    public DIGReasonerConfigurator(DIGReasoner dIGReasoner){
040    this.dIGReasoner = dIGReasoner;
041    }
042    
043    /**
044    * @param knowledgeSource see knowledgeSource
045    * @return DIGReasoner
046    **/
047    public static DIGReasoner getDIGReasoner(Set<AbstractKnowledgeSource> knowledgeSource) {
048    DIGReasoner component = ComponentManager.getInstance().reasoner(DIGReasoner.class, knowledgeSource);
049    return component;
050    }
051    
052    /**
053    * reasonerUrl URL of the DIG reasoner.
054    * mandatory: false| reinit necessary: true
055    * default value: null
056    * @return String 
057    **/
058    public String getReasonerUrl() {
059    return (String) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner,  "reasonerUrl") ;
060    }
061    /**
062    * writeDIGProtocol specifies whether or not to write a protocoll of send and received DIG requests.
063    * mandatory: false| reinit necessary: true
064    * default value: false
065    * @return boolean 
066    **/
067    public boolean getWriteDIGProtocol() {
068    return (Boolean) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner,  "writeDIGProtocol") ;
069    }
070    /**
071    * digProtocolFile the file to store the DIG protocol.
072    * mandatory: false| reinit necessary: true
073    * default value: log/digProtocol.txt
074    * @return String 
075    **/
076    public String getDigProtocolFile() {
077    return (String) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner,  "digProtocolFile") ;
078    }
079    
080    /**
081    * @param reasonerUrl URL of the DIG reasoner.
082    * mandatory: false| reinit necessary: true
083    * default value: null
084    **/
085    public void setReasonerUrl(String reasonerUrl) {
086    ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "reasonerUrl", reasonerUrl);
087    reinitNecessary = true;
088    }
089    /**
090    * @param writeDIGProtocol specifies whether or not to write a protocoll of send and received DIG requests.
091    * mandatory: false| reinit necessary: true
092    * default value: false
093    **/
094    public void setWriteDIGProtocol(boolean writeDIGProtocol) {
095    ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "writeDIGProtocol", writeDIGProtocol);
096    reinitNecessary = true;
097    }
098    /**
099    * @param digProtocolFile the file to store the DIG protocol.
100    * mandatory: false| reinit necessary: true
101    * default value: log/digProtocol.txt
102    **/
103    public void setDigProtocolFile(String digProtocolFile) {
104    ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "digProtocolFile", digProtocolFile);
105    reinitNecessary = true;
106    }
107    
108    /**
109    * true, if this component needs reinitializsation.
110    * @return boolean
111    **/
112    public boolean isReinitNecessary(){
113    return reinitNecessary;
114    }
115    
116    
117    }