protected void internal_importDataFile(String name, String datafile) { // addDataFile(datafile); rlLowerStore.importRDFData(name, datafile); if (lazyUpperStore != null) lazyUpperStore.importRDFData(name, datafile); elLowerStore.importRDFData(name, datafile); trackingStore.importRDFData(name, datafile); }
@Override public boolean preprocess() { t.reset(); Utility.logInfo("Preprocessing ... checking satisfiability ... "); String name = "data", datafile = importedData.toString(); rlLowerStore.importRDFData(name, datafile); rlLowerStore.materialise("lower program", program.getLower().toString()); // program.getLower().save(); if (!consistency.checkRLLowerBound()) return false; Utility.logInfo( "The number of sameAs assertions in RL lower store: " + rlLowerStore.getSameAsNumber()); String originalMarkProgram = OWLHelper.getOriginalMarkProgram(ontology); elLowerStore.importRDFData(name, datafile); elLowerStore.materialise("saturate named individuals", originalMarkProgram); elLowerStore.materialise("lower program", program.getLower().toString()); elLowerStore.initialiseKarma(); if (!consistency.checkELLowerBound()) return false; if (lazyUpperStore != null) { lazyUpperStore.importRDFData(name, datafile); lazyUpperStore.materialise("saturate named individuals", originalMarkProgram); int tag = lazyUpperStore.materialiseRestrictedly(program, null); if (tag != 1) { lazyUpperStore.dispose(); lazyUpperStore = null; } if (tag == -1) return false; } if (consistency.checkLazyUpper()) { satisfiable = true; Utility.logInfo("time for satisfiability checking: " + t.duration()); } trackingStore.importRDFData(name, datafile); trackingStore.materialise("saturate named individuals", originalMarkProgram); // materialiseFullUpper(); // GapByStore4ID gap = new GapByStore4ID(trackingStore); GapByStore4ID gap = new GapByStore4ID2(trackingStore, rlLowerStore); trackingStore.materialiseFoldedly(program, gap); predicatesWithGap = gap.getPredicatesWithGap(); gap.clear(); if (program.getGeneral().isHorn()) encoder = new TrackingRuleEncoderWithGap(program.getUpper(), trackingStore); else encoder = new TrackingRuleEncoderDisjVar1(program.getUpper(), trackingStore); // encoder = new TrackingRuleEncoderDisj1(program.getUpper(), trackingStore); // encoder = new TrackingRuleEncoderDisjVar2(program.getUpper(), trackingStore); // encoder = new TrackingRuleEncoderDisj2(program.getUpper(), trackingStore); program.deleteABoxTurtleFile(); if (!isConsistent()) return false; consistency.extractBottomFragment(); return true; }