package org.semanticweb.elk.protege.proof;

/*-
 * #%L
 * ELK Reasoner Protege Plug-in
 * $Id:$
 * $HeadURL:$
 * %%
 * Copyright (C) 2011 - 2017 Department of Computer Science, University of Oxford
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.liveontologies.protege.justification.proof.service.JustificationCompleteProof;
import org.liveontologies.protege.justification.proof.service.ProverService;
import org.protege.editor.owl.OWLEditorKit;
import org.semanticweb.elk.owlapi.ElkReasoner;
import org.semanticweb.elk.owlapi.ElkReasonerFactory;
import org.semanticweb.elk.owlapi.proofs.TracingProofAdapter;
import org.semanticweb.elk.owlapi.proofs.TracingProofAdapter.ConclusionAdapter;
import org.semanticweb.elk.reasoner.Reasoner;
import org.semanticweb.owlapi.model.OWLAxiom;
import org.semanticweb.owlapi.reasoner.OWLReasoner;

/**
 * Date: 27-02-2017
 */

public class ElkProverService
		extends ProverService<TracingProofAdapter.ConclusionAdapter> {

	@Override
	public JustificationCompleteProof<ConclusionAdapter> getJustificationCompleteProof(
			OWLAxiom entailment) {
		OWLEditorKit ek = getEditorKit();
		OWLReasoner owlReasoner = ek.getOWLModelManager()
				.getOWLReasonerManager().getCurrentReasoner();
		ElkReasoner elkReasoner = (owlReasoner instanceof ElkReasoner)
				? (ElkReasoner) owlReasoner
				: new ElkReasonerFactory().createReasoner(
						ek.getModelManager().getActiveOntology());
		Reasoner reasoner = elkReasoner.getInternalReasoner();

		return new JustificationCompleteTracingProofAdapter(reasoner, entailment);
	}

	@Override
	public void initialise() throws Exception {
	}

	@Override
	public void dispose() throws Exception {
	}

	@Override
	public String getName() {
		return "Elk";
	}
}
@@ -1083,150 +1083,8 @@
 ry;%0A
-import org.semanticweb.elk.owlapi.proofs.TracingProofAdapter;%0Aimport org.semanticweb.elk.owlapi.proofs.TracingProofAdapter.ConclusionAdapter;%0A
 impo
@@ -1282,19 +1282,17 @@
 rService
-%0A%09%09
+ 
 extends 
@@ -1308,47 +1308,8 @@
 vice
-%3CTracingProofAdapter.ConclusionAdapter%3E
  %7B%0A%0A
@@ -1358,25 +1358,9 @@
 oof%3C
-ConclusionAdapter
+?
 %3E ge

Remove the generic parameter of ProverService