Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-dev] swrltab-project problem

Jake micro_wf at
Tue Dec 8 17:34:05 PST 2015

Matthew:            Hi,i have constructed the swrltab-project with maven and git . I do it just step by step according to the following website.            
                   I have get the APIs.  I want to programming  manuplate owl ontology  and query it by SQWRL .  But i happen to many runtime errors.  I don't know what is the problem.  Or  i  have packaged the swrl-project with mistake  ?or version  incompatibility ? I am upset with the problem.  the problem is as following:
the source program:
import org.semanticweb.owlapi.apibinding.OWLManager;import org.semanticweb.owlapi.model.IRI;import org.semanticweb.owlapi.model.OWLOntology;import org.semanticweb.owlapi.model.OWLOntologyCreationException;import org.semanticweb.owlapi.model.OWLOntologyManager;import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.swrlapi.exceptions.SWRLRuleEngineException;import org.swrlapi.factory.SWRLAPIFactory;import org.swrlapi.parser.SWRLParseException;import org.swrlapi.sqwrl.SQWRLQueryEngine;import org.swrlapi.sqwrl.SQWRLResult;import org.swrlapi.sqwrl.exceptions.SQWRLException;
public class test {	public static OWLOntologyManager manager;	public static OWLOntology ontology;	public static OWLReasoner reasoner;

	public static void main(String[] args) {		try {//			System.out.println("=================");			manager = OWLManager.createOWLOntologyManager();			ontology = manager.loadOntology(IRI.create("file:/d:/animal.owl"));						SQWRLQueryEngine queryEngine = SWRLAPIFactory					.createSQWRLQueryEngine(ontology);
			SQWRLResult result = queryEngine.runSQWRLQuery("Q1",					"Animal(?a)  -> sqwrl:select(?a)");
//			System.out.println("----------------------------------");			while({				System.out.println(result.getNumberOfColumns());				System.out.println(result.getNumberOfRows());			}				} catch (SWRLRuleEngineException 				| OWLOntologyCreationException | SQWRLException | SWRLParseException e) {			e.printStackTrace();		}
after compiling and running :           just like this
              configuration:  win10 x86       eclipse4.4.2       jdk1.8_65        
I don't know why the program appear the problem, please help me. I will appreciate you very much.  
Best wishes for you!


2.png (24K) <>
3.png (23K) <>
4.png (21K) <>

View this message in context:
Sent from the Protege Developer mailing list archive at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-dev mailing list