sparna-git / Sparnatural

Sparnatural : visual knowledge graph explorer with SPARQL, in the browser, configurable with SHACL
http://sparnatural.eu
GNU Lesser General Public License v3.0
225 stars 41 forks source link

When loading this query, the correct order of variables is not retained #630

Closed tfrancart closed 2 months ago

tfrancart commented 2 months ago

See the new dbpedia-demo-en demo, query 3:

{
    "distinct": true,
    "variables": [
        {
            "termType": "Variable",
            "value": "Person_1"
        },
        {
            "termType": "Variable",
            "value": "Category_2"
        },
        {
            "termType": "Variable",
            "value": "Movement_6"
        },
        {
            "termType": "Variable",
            "value": "Artwork_8"
        },
        {
            "termType": "Variable",
            "value": "Museum_10"
        }
    ],
    "order": null,
    "branches": [
        {
            "line": {
                "s": "Person_1",
                "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_classifiedIn",
                "o": "Category_2",
                "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
                "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Category",
                "values": [
                    {
                        "label": "19th-century French women artists",
                        "rdfTerm": {
                            "type": "uri",
                            "value": "http://dbpedia.org/resource/Category:19th-century_French_women_artists"
                        }
                    }
                ]
            },
            "children": []
        },
        {
            "line": {
                "s": "Person_1",
                "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_movement",
                "o": "Movement_6",
                "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
                "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Movement",
                "values": []
            },
            "children": [],
            "optional": true
        },
        {
            "line": {
                "s": "Person_1",
                "p": "https://data.mydomain.com/ontologies/sparnatural-config/Person_created",
                "o": "Artwork_8",
                "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Person",
                "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
                "values": []
            },
            "children": [
                {
                    "line": {
                        "s": "Artwork_8",
                        "p": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork_displayedAt",
                        "o": "Museum_10",
                        "sType": "https://data.mydomain.com/ontologies/sparnatural-config/Artwork",
                        "oType": "https://data.mydomain.com/ontologies/sparnatural-config/Museum",
                        "values": []
                    },
                    "children": [],
                    "optional": true
                }
            ],
            "optional": true
        }
    ]
}