Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Niteuk opened this issue Jun 21, 2024 · 0 comments

Comments

@Niteuk
Copy link

Niteuk commented Jun 21, 2024

### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant