int runCounter = 1;
while (true)
{
System.out.println("Running Approximation No. " + runCounter);
OWLReasonerFactory reasonerFactory = new PelletReasonerFactory();
// OWLReasonerFactory reasonerFactory = new
// FaCTPlusPlusReasonerFactory();
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLReasoner reasoner = null;
OWLOntology aboxOntology = null;
ApproximationResult approximationResult = null;
OWLOntology approximatedTboxOntology = null;
HashMap<OWLClass, Integer> allIndividualsCounts = new HashMap<OWLClass, Integer>();
HashMap<OWLClass, Integer> directIndividualsCounts = new HashMap<OWLClass, Integer>();
HashMap<OWLClass, Integer> indirectIndividualsCounts = new HashMap<OWLClass, Integer>();
int cumulativeDirectIndividualsCounts = 0;
int cumulativeIndirectIndividualsCounts = 0;
Timers timers = new Timers();
double classificationTime = 0;
double approximationTime = 0;
double instanceRetrievalTime = 0;
double aboxUpdateTime = 0;
double time = 0;
// System.out.println("--->approximating...");
timers.createTimer("approximation");
Timer timerApproximation = timers.startTimer("approximation");
approximationResult = approximation.getNextTBox();
timerApproximation.stop();
if (measureApproximationTime)
{
approximationTime += timerApproximation.getTotal();
}
if (approximationResult != null)
{
approximatedTboxOntology = approximationResult
.approximatedOntology();
URI tboxPhysicalURI = createURI(tmpTboxPhysicalURI, runCounter);
if (saveApproximatedTbox)
{
saveOntology(approximatedTboxOntology, tboxPhysicalURI);
}
// System.out.println("--->classifying...");
reasoner = reasonerFactory.createReasoner(manager);
reasoner.loadOntologies(Collections
.singleton(approximatedTboxOntology));
timers.createTimer("classification");
if (!(reasoner.isClassified()))
{