the following code is used to send rdf data to a sparql endpoint.
It has worked fine until i've tried to add a reasoner to the OntoModel.
Now the compiler says: "cannot convert from com.hp.hpl.jena.ontology.OntModelspec to org.apache.jena.ontology.OntModelSpec".
So my question is, what i have to edit to let it works? (I know that the problem is obviusly in "PelletReasonerFactory.THE_SPEC" which is not from com.hp.hpl..., so is there something similar to this one, which also come from org.apache.jena... ?)
package services;
import org.apache.jena.query.DatasetAccessor;
import org.apache.jena.query.DatasetAccessorFactory;
import org.apache.jena.query.QueryExecution;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ResultSet;
import org.apache.jena.query.ResultSetFormatter;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.ontology.OntModel;
import org.mindswap.pellet.jena.PelletReasonerFactory;
import org.apache.jena.ontology.OntModelSpec;
class FusekiExample {
public void addRDF(File rdf, String serviceURI){
throws IOException {
// the next commented line is the old working version...
//Model m = ModelFactory.createDefaultModel();
//these lines are the modified version which doesn't work.
OntModelSpec oms = PelletReasonerFactory.THE_SPEC;
OntModel m = ModelFactory.createOntologyModel(oms);
...
}