public ClassicABoxAssertionTestPositiveNoRangeTest() throws Exception { QuestPreferences pref = new QuestPreferences(); pref.setCurrentValueOf(QuestPreferences.REFORMULATION_TECHNIQUE, QuestConstants.UCQBASED); pref.setCurrentValueOf(QuestPreferences.DBTYPE, QuestConstants.SEMANTIC_INDEX); pref.setCurrentValueOf(QuestPreferences.ABOX_MODE, QuestConstants.CLASSIC); pref.setCurrentValueOf(QuestPreferences.OPTIMIZE_EQUIVALENCES, "true"); pref.setCurrentValueOf(QuestPreferences.OBTAIN_FROM_ONTOLOGY, "true"); pref.setCurrentValueOf(QuestPreferences.OPTIMIZE_TBOX_SIGMA, "true"); String owlfile = "src/test/resources/test/owl-types-simple-split.owl"; OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLOntology ontology = manager.loadOntologyFromOntologyDocument(new File(owlfile)); QuestOWLFactory fac = new QuestOWLFactory(); fac.setPreferenceHolder(pref); reasoner = (QuestOWL) fac.createReasoner(ontology); reasoner.flush(); conn = reasoner.getConnection(); st = conn.createStatement(); }
private QuestOWLResultSet executeQuery(String sparql) throws Exception { conn = reasoner.getConnection(); stmt = conn.createStatement(); return stmt.executeTuple(sparql); }