类未显示在 GraphDB 中 [英] Class not displayed in GraphDB

查看:83
本文介绍了类未显示在 GraphDB 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下课程:

:Foo rdf:type owl:Class ;
           rdfs:subClassOf [ rdf:type owl:Restriction ;
                             owl:onProperty :hasId ;
                             owl:someValuesFrom rdfs:Literal
                           ] .

奇怪的是,它并没有出现在 Ontotext 的 GraphDB 的类层次结构选项卡中.

Strangely, that does not appear in the Class hierarchy tab of Ontotext's GraphDB.

有什么具体原因吗?

推荐答案

有什么具体原因吗?

Is there any specific reason?

来自graphdb-framework-graph-explore-8.7.0.jar/dataviz-queries/getRdfClassHierarchy.sparql:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX sesame: <http://www.openrdf.org/schema/sesame#>

SELECT ?parent ?class ?count  {
    ?class sesame:directSubClassOf ?parent .
    FILTER (isURI(?parent) && isURI(?class)
        && !strstarts(str(?parent), "http://www.w3.org/2002/07/owl#")
        && !strstarts(str(?parent), "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
        && !strstarts(str(?parent), "http://www.w3.org/2000/01/rdf-schema#")
    ).
    {
        SELECT ?class (COUNT(*) as ?count) {
            ?s a ?class
        } GROUP BY ?class
    }
} ORDER BY DESC (?count)

注意 isURI(?parent),而 […] 是一个空白节点.

Note isURI(?parent), whereas […] is a blank node.

这篇关于类未显示在 GraphDB 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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