001    /**
002     * Copyright (C) 2007-2008, 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.kb.extraction;
021    
022    import org.dllearner.kb.aquisitors.TupleAquisitor;
023    import org.dllearner.kb.manipulator.Manipulator;
024    
025    /**
026     * Stores all configuration settings. this class collects all configuration
027     * information see the other classes, which are used as attributes here
028     * 
029     * @author Sebastian Hellmann
030     */
031    public class Configuration {
032    
033            private OWLAPIOntologyCollector owlAPIOntologyCollector;
034    
035            private Manipulator manipulator;
036    
037            private TupleAquisitor tupelAquisitor;
038    
039            // the following needs to be moved to
040            // class extraction algorithm or manipulator
041            private boolean optimizeForDLLearner = true;
042    
043            private int recursiondepth;
044    
045            private boolean getAllSuperClasses = true;
046    
047            private boolean closeAfterRecursion = true;
048    
049            private boolean getPropertyInformation = false;
050    
051            private int breakSuperClassesAfter = 200;
052    
053            public Configuration(TupleAquisitor tupelAquisitor,
054                            Manipulator manipulator, int recursiondepth,
055                            boolean getAllSuperClasses, boolean closeAfterRecursion,
056                            boolean getPropertyInformation, int breakSuperClassesAfter) {
057    
058                    this.tupelAquisitor = tupelAquisitor;
059                    this.manipulator = manipulator;
060                    this.recursiondepth = recursiondepth;
061                    this.getAllSuperClasses = getAllSuperClasses;
062                    this.closeAfterRecursion = closeAfterRecursion;
063                    this.getPropertyInformation = getPropertyInformation;
064                    this.breakSuperClassesAfter = breakSuperClassesAfter;
065                    
066                    this.owlAPIOntologyCollector = new OWLAPIOntologyCollector();
067    
068            }
069    
070            public Configuration(TupleAquisitor tupelAquisitor,
071                            Manipulator manipulator, int recursiondepth,
072                            boolean getAllSuperClasses, boolean closeAfterRecursion,
073                            boolean getPropertyInformation, int breakSuperClassesAfter,
074                            OWLAPIOntologyCollector owlAPIOntologyCollector) {
075                    this(tupelAquisitor, manipulator, recursiondepth, getAllSuperClasses,
076                                    closeAfterRecursion, getAllSuperClasses, breakSuperClassesAfter);
077                    this.owlAPIOntologyCollector = owlAPIOntologyCollector;
078            }
079    
080            public int getBreakSuperClassesAfter() {
081                    return breakSuperClassesAfter;
082            }
083    
084            public boolean isCloseAfterRecursion() {
085                    return closeAfterRecursion;
086            }
087    
088            public boolean isGetAllSuperClasses() {
089                    return getAllSuperClasses;
090            }
091    
092            public Manipulator getManipulator() {
093                    return manipulator;
094            }
095    
096            public int getRecursiondepth() {
097                    return recursiondepth;
098            }
099    
100            public TupleAquisitor getTupelAquisitor() {
101                    return tupelAquisitor;
102            }
103    
104            public boolean isOptimizeForDLLearner() {
105                    return optimizeForDLLearner;
106            }
107    
108            public boolean isGetPropertyInformation() {
109                    return getPropertyInformation;
110            }
111    
112            public OWLAPIOntologyCollector getOwlAPIOntologyCollector() {
113                    return owlAPIOntologyCollector;
114            }
115    
116    }