Skip to content

language fall back problem #128

@zeginis

Description

@zeginis

Language fall back does work properly:

  1. When :schema-label-language en and dataset label = no language
    The query return no results:
{cubiql{
datasets {
   title
uri
}
}}

The SPARQL produced is:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?ds ?name ?title ?description ?licence ?issued ?modified ?publisher WHERE {
{ SELECT DISTINCT ?ds WHERE {  ?ds a qb:DataSet .} }
  ?ds <http://www.w3.org/2000/01/rdf-schema#label> ?name . 
 FILTER(LANG(?name) = "en")}
  1. When :schema-label-language en and measureProperty language = en
    The query return no label for measures although there is a label with @en
{cubiql{
dataset_employment {
  measures {
    enum_name
    label
    uri
  }  
}}}

The result is:

{
  "data": {
    "cubiql": {
      "dataset_employment": {
        "measures": [
          {
            "enum_name": "COUNT",
            "label": null,
            "uri": "http://statistics.gov.scot/def/measure/count"
          }
        ]
      }
    }
  }
}

The SPARQL created is:

PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?mt ?label WHERE {  
<http://statistics.gov.scot/data/employment> qb:structure ?struct .  
?struct qb:component ?comp . 
 ?comp qb:measure ?mt .  
?mt a qb:MeasureProperty .  
OPTIONAL {    
?mt <http://www.w3.org/2000/01/rdf-schema#label> ?label .  
  FILTER(LANG(?label) = "")  }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions