Have been stuck one day and would someone be kind enough to help?
I have loaded an ontology which imported SWEET(Semantic Web for Earth and Environmental Ontology). I did some SPARQL query on it, and I got such answer: "Object Property hasLowerBound is used with a hasValue restriction where the value is a literal: "0"^^integer". (hasLowerBound, which I have checked in the SWEET, is an Datatype Ontology in SWEET)
How can I solve this problem?
Here is the code I wrote and the error I got,Thank you so much for your help~
package loadOnto;
//import static org.semanticweb.owlapi.search.EntitySearcher.getAnnotationObjects;
//import static org.semanticweb.owlapi.search.Searcher.annotationObjects;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.util.*;
import javax.annotation.Nonnull;
import org.semanticweb.owlapi.apibinding.OWLManager;
//import org.semanticweb.owlapi.formats.OWLXMLDocumentFormat;
import org.semanticweb.owlapi.io.StreamDocumentTarget;
import org.semanticweb.owlapi.io.StringDocumentSource;
import org.semanticweb.owlapi.io.StringDocumentTarget;
import org.semanticweb.owlapi.model.*;
import org.semanticweb.owlapi.profiles.OWL2DLProfile;
import org.semanticweb.owlapi.profiles.OWLProfileReport;
import org.semanticweb.owlapi.profiles.OWLProfileViolation;
import org.semanticweb.owlapi.reasoner.*;
import org.semanticweb.owlapi.reasoner.structural.StructuralReasonerFactory;
import org.semanticweb.owlapi.util.*;
import org.semanticweb.owlapi.vocab.OWL2Datatype;
import org.semanticweb.owlapi.vocab.OWLFacet;
import org.semanticweb.owlapi.vocab.OWLRDFVocabulary;
import com.clarkparsia.pellet.owlapiv3.PelletReasoner;
import com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory;
import com.clarkparsia.pellet.sparqldl.jena.SparqlDLExecutionFactory;
import com.clarkparsia.pellet.sparqldl.model.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.query.ResultSetFormatter;
import com.hp.hpl.jena.rdf.model.InfModel;
import com.hp.hpl.jena.rdf.model.ModelFactory;
import uk.ac.manchester.cs.owlapi.modularity.ModuleType;
import uk.ac.manchester.cs.owlapi.modularity.SyntacticLocalityModuleExtractor;
public class load {
public static void main(String[] args) throws OWLOntologyCreationException {
// Get hold of an ontology manager
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
// We can also load ontologies from files. Create a file object that points to the local copy
File file = new File("G:/Protege/owlfiles/sweetAll.owl");
// Load the local copy
OWLOntology loadMODIS = manager.loadOntologyFromOntologyDocument(file);
PelletReasoner reasoner = PelletReasonerFactory.getInstance().createNonBufferingReasoner( loadMODIS );
System.out.println("CheckParsing.should() " + reasoner.isConsistent());
System.out.println("Loaded ontology: " + loadMODIS);
}
}
Error
Exception in thread "main" org.mindswap.pellet.exceptions.InternalReasonerException: Object Property hasLowerBound is used with a hasValue restriction where the value is a literal: "0"^^integer at org.mindswap.pellet.tableau.completion.rule.SomeValuesRule.applySomeValuesRule(SomeValuesRule.java:204) at org.mindswap.pellet.tableau.completion.rule.SomeValuesRule.apply(SomeValuesRule.java:64) at org.mindswap.pellet.tableau.completion.rule.AbstractTableauRule.apply(AbstractTableauRule.java:64) at org.mindswap.pellet.tableau.completion.SROIQStrategy.complete(SROIQStrategy.java:157) at org.mindswap.pellet.ABox.isConsistent(ABox.java:1423) at org.mindswap.pellet.ABox.isConsistent(ABox.java:1260) at org.mindswap.pellet.KnowledgeBase.consistency(KnowledgeBase.java:1987) at org.mindswap.pellet.KnowledgeBase.isConsistent(KnowledgeBase.java:2061) at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:258) at org.mindswap.pellet.jena.PelletInfGraph.prepare(PelletInfGraph.java:241) at com.clarkparsia.pellet.sparqldl.jena.SparqlDLExecutionFactory.create(SparqlDLExecutionFactory.java:113) at com.clarkparsia.pellet.sparqldl.jena.SparqlDLExecutionFactory.create(SparqlDLExecutionFactory.java:261) at com.clarkparsia.pellet.sparqldl.jena.SparqlDLExecutionFactory.create(SparqlDLExecutionFactory.java:226) at loadMODIS.load.main(load.java:78)
Attached is the ontology I've been reason on.
Thank you very much for your kind help!
Have been stuck one day and would someone be kind enough to help?