0

我正在尝试将 RDF 文件加载到webvowl 中,但无法看到资源之间的关系,因为它们都是"External"。我的理解是,这是由于我如何引用文件中的资源(我以前没有做过的事情)。就我的用例而言,我正在编写一个描述具体(实例化)资源的 RDF 三元组的海龟文件——具体来说,使用 DCAT 本体来描述 API 的结构。

当我查看诸如 DCAT 之类的本体时,我可以看到它们使用哈希来分隔本体和资源 id,例如http://www.w3.org/ns/dcat#byteSize. 相比之下,用来编写 Turtle 文件的代码生成器使用正斜杠来分隔本体和资源 ID,例如http://example.com/dataservices/{id}.

我尝试了各种斜杠/哈希组合,包括/排除文件扩展名无济于事。任何关于如何正确地自我引用这些 id 的建议将不胜感激。我试图可视化的资源关系示例如下所示,原始文件可以在这里找到,(当前无效的)可视化在这里

@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix dct: <http://purl.org/dc/terms/> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/catalog-1> a dcat:Catalog ;
    dct:title "An Elexon dataset catalog"@en ;
    dcat:dataset <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/3519b2019120f09555a5e6b13de5e6ee405eb963>,
        <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/9e48ef6df2c415e78e2504f36a86054092434808>,
        <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/b63ddc4ec45655718cb8e29e9f05c312c360a127> ;
    dcat:service <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/c002eba1b6e86da2257235ff784433e06fc49ddf> .


<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/4107792ac75242bc833c888052ebef1f1e688ef7> a dcat:Distribution ;
    dcat:accessService <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/c002eba1b6e86da2257235ff784433e06fc49ddf> ;
    dcat:downloadURL <https://api.bmreports.com/BMRS/B0610/v1> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/53539e5e45daf8989e3b08f0aec6431a50a34aa2> a dcat:Distribution ;
    dcat:accessService <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/c002eba1b6e86da2257235ff784433e06fc49ddf> ;
    dcat:downloadURL <https://api.bmreports.com/BMRS/B0620/v1> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/ec0dcc1fe3d8ad6ba208b0a9a892a3f96dc6c12d> a dcat:Distribution ;
    dcat:accessService <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/c002eba1b6e86da2257235ff784433e06fc49ddf> ;
    dcat:downloadURL <https://api.bmreports.com/BMRS/B0630/v1> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/9e48ef6df2c415e78e2504f36a86054092434808> a dcat:Dataset ;
    dct:description "Actual Total Load per Bidding Zone"@en ;
    dct:title "B0610"@en ;
    dcat:distribution <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/4107792ac75242bc833c888052ebef1f1e688ef7> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/b63ddc4ec45655718cb8e29e9f05c312c360a127> a dcat:Dataset ;
    dct:description "Day-Ahead Total Load Forecast per Bidding Zone"@en ;
    dct:title "B0620"@en ;
    dcat:distribution <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/53539e5e45daf8989e3b08f0aec6431a50a34aa2> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/3519b2019120f09555a5e6b13de5e6ee405eb963> a dcat:Dataset ;
    dct:description "Week-Ahead Total Load Forecast per Bidding Zone"@en ;
    dct:title "B0630"@en ;
    dcat:distribution <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/ec0dcc1fe3d8ad6ba208b0a9a892a3f96dc6c12d> .

<https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.ttl/c002eba1b6e86da2257235ff784433e06fc49ddf> a dcat:DataService ;
    dct:description "API for the Elexon Balancing Mechanism Reporting Service"@en ;
    dct:title "BMRS API"@en ;
    dcat:endpointDescription <https://raw.githubusercontent.com/OSUKED/ElexonDataPortal/master/data/BMRS_API.yaml> ;
    dcat:endpointURL <https://api.bmreports.com> .
4

0 回答 0