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

Matthew Horridge matthew.horridge at stanford.edu
Tue Dec 8 18:23:34 PST 2015


Hi Jake,

Try adding the following dependencies to your pom file:


<dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-core</artifactId>
   <version>1.1.3</version>
</dependency>

<dependency>
   <groupId>ch.qos.logback</groupId>
   <artifactId>logback-classic</artifactId>
   <version>1.1.3</version>
</dependency>

Cheers,

Matthew



On 8 Dec 2015, at 17:34, Jake <micro_wf at outlook.com<mailto:micro_wf at outlook.com>> wrote:

Matthew:
            Hi,i have constructed the swrltab-project with maven and git . I do it just step by step according to the following website.
https://github.com/protegeproject/swrltab-project/blob/master/README.md


<script type="jsv#1177_"></script>
[http://protege-project.136.n4.nabble.com/attachment/4664133/0/2.png]

 <script type="jsv/1177_"></script>
<script type="jsv#1178_"></script>
[http://protege-project.136.n4.nabble.com/attachment/4664133/1/3.png]

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(result.next()){
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

<script type="jsv#1179_"></script>
[http://protege-project.136.n4.nabble.com/attachment/4664133/2/4.png]
 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!

Jack






<script type="jsv/1178_"></script>



________________________________
View this message in context: swrltab-project problem<http://protege-project.136.n4.nabble.com/swrltab-project-problem-tp4664133.html>
Sent from the Protege Developer mailing list archive<http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html> at Nabble.com<http://nabble.com>.
_______________________________________________
protege-dev mailing list
protege-dev at lists.stanford.edu<mailto:protege-dev at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/protege-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20151209/851f2dbb/attachment.html>


More information about the protege-dev mailing list