【问题标题】:Domain-Range graph not displayed in GraphDB Free ver. 8.5GraphDB Free 版本中未显示域范围图。 8.5
【发布时间】:2018-05-03 15:23:25
【问题描述】:

我将以下语句加载到 OWL-Horst 存储库中:

@prefix : <http://example.org/owlim#>.
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

:Foo a owl:Class .
:Bar a owl:Class .
:p a owl:ObjectProperty .
:f a :Foo .
:b a :Bar .
:f :p :b .

但我无法想象Domain-Range chart。我收到消息“没有适用于 '' 的域范围图。

我的图表有什么问题?

【问题讨论】:

    标签: rdf rdfs graphdb


    【解决方案1】:

    [a :Foo] :p [a :Bar] 不包含:p rdfs:domain :Foo; rdfs:range :Bar。这应该是 RDFS 级别的规则,there is no 这样的规则。

    你应该明确地说:

    :p rdfs:domain :Foo .
    :p rdfs:range :Bar .
    

    然后你会得到类似image的东西。

    顺便说一句,构建域范围图,GraphDB 执行以下查询:

    SELECT DISTINCT ?prop ?propertyType ?objectPropClass (?c != :Bar as ?implicit) {
        {
            :Bar rdfs:subClassOf ?c
        }
        UNION
        {
            VALUES ?c { :Bar }
        }
        {
            ?prop a owl:ObjectProperty ;
                rdfs:domain ?c ;
                rdfs:range ?objectPropClass ;
                rdfs:domain ?objectPropClass ;
                rdfs:range ?c .
            BIND ("objectLeftRight" as ?propertyType)
            BIND (1 as ?order)
        }
        UNION
        {
            ?prop a owl:ObjectProperty ;
                rdfs:domain ?c ;
                rdfs:range ?objectPropClass .
            BIND ("objectRight" as ?propertyType)
            BIND (2 as ?order)
        }
        UNION
        {
            ?prop a owl:DatatypeProperty ;
                rdfs:domain ?c .
            BIND ("datatype" as ?propertyType)
            BIND (3 as ?order)
        }
        UNION
        {
            ?prop a owl:ObjectProperty ;
                rdfs:domain ?objectPropClass ;
                rdfs:range ?c .
            BIND ("objectLeft" as ?propertyType)
            BIND (4 as ?order)
        }
        FILTER(?objectPropClass != :Bar || ?propertyType != "objectRight"
                                        && ?propertyType != "objectLeft")
    } ORDER BY ?order ?objectPropClass ?prop
    

    更新

    ...在快速浏览文档后,我认为 GraphDB 做了一种基于类实例的属性的实际使用情况的分析。

    • 似乎Class relationships 视图在左侧面板中提供了此类信息。

    • 此外,您还可以创建your own 可视化图表配置。我可以CONSTRUCT这张图片:

    【讨论】:

    • 知道了。我知道没有推断出域和范围语句,但是在快速浏览了文档之后,我相信 GraphDB 基于类实例的属性的实际使用情况进行了一种分析,而不管显式的 rdfs:domain 和 @ 987654333@ 声明。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-22
    相关资源
    最近更新 更多