芝麻:如何在查询过程中删除推理? [英] Sesame : how to remove the inference during queries?

查看:78
本文介绍了芝麻:如何在查询过程中删除推理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种解决方案,以便在Sesame上启动的查询过程中删除"推理.我必须使用本地Java存储RDF架构"存储库,并且我有以下查询: 我有一个实例NamedIndividual,我想要实例的类的uri:

I'm looking for a solution in order to "remove" the inference during a query launched on Sesame. I must use a "Native Java Store RDF Schema" repository and I have this query : I have an instance, a NamedIndividual, and I want the uri of the class whose instance it is :

    SELECT DISTINCT ?uri WHERE  {   
        <http://www.semanticweb.org/ontotest#myInstance> rdf:type ?uri .
        FILTER (?uri rdf:type owl:Class)         
    }

问题是由于推理,我得到了几个URI(好URI),而不是一个.我得到了本体的超类,那么实例的类没有链接. 如何在不更改存储库的情况下获得正确的结果?

The problem is that I get severals URI (whom the good URI) instead of one because of the inference. I get the superclasses of the ontology then there is no link with the class of the instance. How to obtain the right result without change the repository ?

推荐答案

设置

Set the setIncludeInferred(false) on your Query object before executing it through the API to avoid using inferred statements.

这篇关于芝麻:如何在查询过程中删除推理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆