* @param unsoundIncompleteReasoner the unsound and incomplete reasoner
*/
@SuppressWarnings("unchecked")
private void variant(ReasonerAdapter positiveSoundReasoner, ReasonerAdapter negativeSoundReasoner,
ReasonerAdapter completeReasoner, ReasonerAdapter soundCompleteReasoner, ReasonerAdapter unsoundIncompleteReasoner){
ResultPool pool = new ResultPool();
OWLClassExpression des = (OWLClassExpression) this.query.getParams()[0];
OWLClassExpression negDes = des.getComplementNNF();
Class<?>[] paramTypes = { OWLClassExpression.class, boolean.class };
Object[] params = { negDes, false };
Query negQuery;
try {
negQuery = QueryFactory.getQuery( "getIndividuals", paramTypes, params );
int reasonerNumber = 0;
if(positiveSoundReasoner != null){
reasonerNumber++;
positiveSoundReasoner.getReasonerProperties().setProperty("anytime_name", "SoundPositive");
IReasonerThread soundPositiveThread = new IReasonerThread(pool, positiveSoundReasoner, query);
soundPositiveThread.start();
}
if(negativeSoundReasoner != null){
reasonerNumber++;
negativeSoundReasoner.getReasonerProperties().setProperty("anytime_name", "SoundNegative");
IReasonerThread soundNegativeThread = new IReasonerThread(pool, negativeSoundReasoner, negQuery);
soundNegativeThread.start();
}
if(completeReasoner != null){
reasonerNumber++;
completeReasoner.getReasonerProperties().setProperty("anytime_name", "Complete");
IReasonerThread completeThread = new IReasonerThread(pool, completeReasoner, query);
completeThread.start();
}
if(soundCompleteReasoner != null){
reasonerNumber++;
soundCompleteReasoner.getReasonerProperties().setProperty("anytime_name", "SoundAndComplete");
IReasonerThread soundCompleteThread = new IReasonerThread(pool, soundCompleteReasoner, query);
soundCompleteThread.start();
}
if(unsoundIncompleteReasoner != null){
reasonerNumber++;
unsoundIncompleteReasoner.getReasonerProperties().setProperty("anytime_name", "UnsoundAndIncomplete");
IReasonerThread unsoundIncompleteThread = new IReasonerThread(pool, unsoundIncompleteReasoner, query);
unsoundIncompleteThread.start();
}
if(reasonerNumber == 0){
this.listener.resultCompleted();
if(logger.isInfoEnabled()){
logger.info("No reasoner is assigned!");
}
return;
}
ArrayList<Object> results = new ArrayList<Object>();
while (results.size() < reasonerNumber) {
AnytimeResult result = pool.readData();
if (result != null) {
results.add(result);
setData(result.getReasoner(), (Set<OWLNamedIndividual>) result.getAnswer());
if(logger.isInfoEnabled()){
logger.info(result.getReasoner() + "finished with "