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.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 boolean dissolveBlankNodes = false;
052
053 private int breakSuperClassesAfter = 200;
054
055 public Configuration(TupleAquisitor tupelAquisitor,
056 Manipulator manipulator, int recursiondepth,
057 boolean getAllSuperClasses, boolean closeAfterRecursion,
058 boolean getPropertyInformation, int breakSuperClassesAfter, boolean dissolveBlankNodes) {
059
060 this.tupelAquisitor = tupelAquisitor;
061 this.manipulator = manipulator;
062 this.recursiondepth = recursiondepth;
063 this.getAllSuperClasses = getAllSuperClasses;
064 this.closeAfterRecursion = closeAfterRecursion;
065 this.getPropertyInformation = getPropertyInformation;
066 this.breakSuperClassesAfter = breakSuperClassesAfter;
067 this.dissolveBlankNodes = dissolveBlankNodes;
068
069 this.tupelAquisitor.dissolveBlankNodes = dissolveBlankNodes;
070
071 this.owlAPIOntologyCollector = new OWLAPIOntologyCollector();
072
073 }
074
075 public Configuration(TupleAquisitor tupelAquisitor,
076 Manipulator manipulator, int recursiondepth,
077 boolean getAllSuperClasses, boolean closeAfterRecursion,
078 boolean getPropertyInformation, int breakSuperClassesAfter, boolean dissolveBlankNodes,
079 OWLAPIOntologyCollector owlAPIOntologyCollector) {
080 this(tupelAquisitor, manipulator, recursiondepth, getAllSuperClasses,
081 closeAfterRecursion, getAllSuperClasses, breakSuperClassesAfter,dissolveBlankNodes);
082 this.owlAPIOntologyCollector = owlAPIOntologyCollector;
083 }
084
085 public int getBreakSuperClassesAfter() {
086 return breakSuperClassesAfter;
087 }
088
089 public boolean isCloseAfterRecursion() {
090 return closeAfterRecursion;
091 }
092
093 public boolean isGetAllSuperClasses() {
094 return getAllSuperClasses;
095 }
096
097 public Manipulator getManipulator() {
098 return manipulator;
099 }
100
101 public int getRecursiondepth() {
102 return recursiondepth;
103 }
104
105 public TupleAquisitor getTupelAquisitor() {
106 return tupelAquisitor;
107 }
108
109 public boolean isOptimizeForDLLearner() {
110 return optimizeForDLLearner;
111 }
112
113 public boolean isGetPropertyInformation() {
114 return getPropertyInformation;
115 }
116
117 public OWLAPIOntologyCollector getOwlAPIOntologyCollector() {
118 return owlAPIOntologyCollector;
119 }
120
121 public boolean isDissolveBlankNodes() {
122 return dissolveBlankNodes;
123 }
124
125 }