walder icon indicating copy to clipboard operation
walder copied to clipboard

Use of Relative HTTP URIs to enhance negotiated Turtle and JSON-LD data renditions

Open kidehen opened this issue 5 years ago • 1 comments

Hi Peter,

Here is a tweak of the Turtle and JSON-LD that is currently generated for the KNoWS Software Page, using relative HTTP URIs.

Why is this important? It replaces blank nodes with relative HTTP URIs that by effect provide better follow-your-nose exploration potential :)

## Turtle Start ##

@prefix : <#> . 

:b338_b1 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "A modular framework for querying Linked Data on the Web.";
    <http://schema.org/name> "Comunica".
:b338_b10 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "A Web app to create RML rules.";
    <http://schema.org/name> "RMLEditor".
:b338_b11 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources.";
    <http://schema.org/name> "RMLMapper".
:b338_b12 <http://usefulinc.com/ns/doap#location> "https://github.com/rmlio/rmlmapper-java";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b11.
:b338_b13 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "The RMLStreamer executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources in a streaming way.";
    <http://schema.org/name> "RMLStreamer".
:b338_b14 <http://usefulinc.com/ns/doap#location> "https://github.com/RMLio/RMLStreamer";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b13.
:b338_b15 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "A framework for writing markdown-based scholarly articles.";
    <http://schema.org/name> "ScholarMarkdown".
:b338_b16 <http://usefulinc.com/ns/doap#location> "https://github.com/rubensworks/ScholarMarkdown";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b15.
:b338_b17 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "A YARRRML parser library and CLI in Javascript";
    <http://schema.org/name> "YARRRML Parser".
:b338_b18 <http://usefulinc.com/ns/doap#location> "https://github.com/rmlio/yarrrml-parser";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b17.
:b338_b2 <http://usefulinc.com/ns/doap#location> "https://github.com/comunica/";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b1.
:b338_b3 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "Linked Data Querying with GraphQL.";
    <http://schema.org/name> "GraphQL-LD".
:b338_b4 <http://usefulinc.com/ns/doap#location> "https://github.com/rubensworks/graphql-ld.js";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b3.
:b338_b5 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "Linked Data Querying with GraphQL.";
    <http://schema.org/name> "GraphQL-LD".
:b338_b6 <http://usefulinc.com/ns/doap#location> "https://github.com/rdfostrich/ostrich";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b5.
:b338_b7 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "A Triple Pattern Fragments server for Node.js";
    <http://schema.org/name> "Linked Data Fragments Server".
:b338_b8 <http://usefulinc.com/ns/doap#location> "https://github.com/LinkedDataFragments/Server.js";
    <http://usefulinc.com/ns/doap#repositoryOf> :b338_b7.
:b338_b9 <http://schema.org/contributor> :b338_b0;
    <http://schema.org/description> "An RDF triple store that allows multiple versions of a dataset to be stored and queried at the same time.";
    <http://schema.org/name> "OSTRICH".
## Turtle End ##

And here is the same thing using JSON-LD 1.1 (which also now properly supports relative HTTP URIs).

## JSON-LD Start ##
{
    "@context": {
        "@this": "#"
    },
    "@graph": [{
            "@id": "#b338_b1",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "A modular framework for querying Linked Data on the Web."
            }],
            "http://schema.org/name": [{
                "@value": "Comunica"
            }]
        },
        {
            "@id": "#b338_b10",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "A Web app to create RML rules."
            }],
            "http://schema.org/name": [{
                "@value": "RMLEditor"
            }]
        },
        {
            "@id": "#b338_b11",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources."
            }],
            "http://schema.org/name": [{
                "@value": "RMLMapper"
            }]
        },
        {
            "@id": "#b338_b12",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/rmlio/rmlmapper-java"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b11"
            }]
        },
        {
            "@id": "#b338_b13",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "The RMLStreamer executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources in a streaming way."
            }],
            "http://schema.org/name": [{
                "@value": "RMLStreamer"
            }]
        },
        {
            "@id": "#b338_b14",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/RMLio/RMLStreamer"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b13"
            }]
        },
        {
            "@id": "#b338_b15",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "A framework for writing markdown-based scholarly articles."
            }],
            "http://schema.org/name": [{
                "@value": "ScholarMarkdown"
            }]
        },
        {
            "@id": "#b338_b16",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/rubensworks/ScholarMarkdown"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b15"
            }]
        },
        {
            "@id": "#b338_b17",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "A YARRRML parser library and CLI in Javascript"
            }],
            "http://schema.org/name": [{
                "@value": "YARRRML Parser"
            }]
        },
        {
            "@id": "#b338_b18",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/rmlio/yarrrml-parser"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b17"
            }]
        },
        {
            "@id": "#b338_b2",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/comunica/"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b1"
            }]
        },
        {
            "@id": "#b338_b3",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "Linked Data Querying with GraphQL."
            }],
            "http://schema.org/name": [{
                "@value": "GraphQL-LD"
            }]
        },
        {
            "@id": "#b338_b4",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/rubensworks/graphql-ld.js"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b3"
            }]
        },
        {
            "@id": "#b338_b5",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "Linked Data Querying with GraphQL."
            }],
            "http://schema.org/name": [{
                "@value": "GraphQL-LD"
            }]
        },
        {
            "@id": "#b338_b6",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/rdfostrich/ostrich"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b5"
            }]
        },
        {
            "@id": "#b338_b7",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "A Triple Pattern Fragments server for Node.js"
            }],
            "http://schema.org/name": [{
                "@value": "Linked Data Fragments Server"
            }]
        },
        {
            "@id": "#b338_b8",
            "http://usefulinc.com/ns/doap#location": [{
                "@value": "https://github.com/LinkedDataFragments/Server.js"
            }],
            "http://usefulinc.com/ns/doap#repositoryOf": [{
                "@id": "#b338_b7"
            }]
        },
        {
            "@id": "#b338_b9",
            "http://schema.org/contributor": [{
                "@id": "#b338_b0"
            }],
            "http://schema.org/description": [{
                "@value": "An RDF triple store that allows multiple versions of a dataset to be stored and queried at the same time."
            }],
            "http://schema.org/name": [{
                "@value": "OSTRICH"
            }]
        }
    ]
}
## JSON-LD End ##

kidehen avatar Sep 01 '20 13:09 kidehen

Hi @kidehen

Thanks for the suggestion. How can you guarantee that the same relative IRIs are generated for every single request?

pheyvaer avatar Sep 02 '20 07:09 pheyvaer