Skip to content

Distinct blank nodes for intials lists #151

@langsamu

Description

@langsamu

Some of the endpoints are based on SPARQL queries that produce blank nodes for intial lists.

For example https://github.com/ukparliament/Data.Api.FixedQuery/blob/4b2f02ad361d07a5393fb27a6d93a5a4099de76d/Parliament.Data.Api.FixedQuery/Sparql/member_a_to_z.sparql#L3

This is legal and works with GROM.

But the result is multiple distinct blank nodes, each with a value.
For example constituency a to z:

_:node20436876 <https://id.parliament.uk/schema/value> "B".
_:node20436877 <https://id.parliament.uk/schema/value> "A".
_:node20436878 <https://id.parliament.uk/schema/value> "C".
_:node20436879 <https://id.parliament.uk/schema/value> "D".

(Another issue addresses the use of uncontrolled predicates here.)

This will results in multiple GROM nodes, each with a value attribute.
I'm wondering whether a single URI node wouldn't be better, resulting in a single GROM node with an array of values.

Like this:

CONSTRUCT {
    <http://example.com/InitialsList> :value ?firstLetter .
}

which would result in

<http://example.com/InitialsList> <https://id.parliament.uk/schema/value> "B", "A", "C", "D" .

@mattrayner what do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions