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