Skip to content

Issue with High Limit Queries on ISSA SPARQL Endpoint in Muvin Visualization #1

@Niteuk

Description

@Niteuk

### Problem:
When querying the ISSA SPARQL endpoint "https://data-issa.cirad.fr/sparql" with the following query and using the value "CIRAD - FRA", the visualization in Muvin works correctly with a limit of 100 in the query. However, increasing the limit to 500 or more results in a SyntaxError: Unexpected end of JSON input error.

### Query:

PREFIX fabio: <http://purl.org/spar/fabio/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX issa: <http://data-issa.cirad.fr/>
PREFIX issapr: <http://data-issa.cirad.fr/property/>
PREFIX oa: <http://www.w3.org/ns/oa#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX schema: <http://schema.org/>
PREFIX dce: <http://purl.org/dc/elements/1.1/>
PREFIX fabio: <http://purl.org/spar/fabio/>

SELECT DISTINCT ?uri ?title ?date ?type ?link ?ego ?alter
WHERE {
    BIND ("$value" AS ?ego)

    {
        ?uri dce:creator ?ego .
    }

    OPTIONAL {
        ?uri dce:creator ?alter .
        FILTER (?alter != ?ego) 
    }

    ?uri dct:title ?title ;
         dct:issued ?date ;
         schema:url ?link ;
         a ?documentType .

    # Déterminer le type de document
    BIND (IF (?documentType = fabio:ResearchPaper, "Article",
              IF (?documentType = fabio:Expression, "Monograph",
                  IF (?documentType = fabio:StillImage, "Map",
                      IF (?documentType = fabio:Book, "Book",
                          IF (?documentType = fabio:BookChapter, "Book Section",
                              IF (?documentType = fabio:ConferencePaper, "Conference Article", "Other")))))) AS ?type)
} LIMIT 500 OFFSET $offset

### Console Output on Muvin:

TypeError: Cannot read properties of undefined (reading 'value')
    at C:\Users\quent\Desktop\Master_2\Stage\muvin\datatools\transform.js:92:52
    at Array.map (<anonymous>)
    at C:\Users\quent\Desktop\Master_2\Stage\muvin\datatools\transform.js:92:35
    at Array.map (<anonymous>)
    at Transform.clean (C:\Users\quent\Desktop\Master_2\Stage\muvin\datatools\transform.js:88:36)
    at Transform.getData (C:\Users\quent\Desktop\Master_2\Stage\muvin\datatools\transform.js:201:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async C:\Users\quent\Desktop\Master_2\Stage\muvin\server.js:100:22

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