Triply-Dev / YASGUI.YASQE-deprecated

Deprecated, see https://github.com/TriplyDB/Yasgui for the Yasgui monorepo
MIT License
73 stars 36 forks source link

How to add personal prefixe #133

Closed art-tom closed 6 years ago

art-tom commented 6 years ago

Hello,

How to add a personal prefix and automaticly insert in plugin. For example if I write roro: I would like to add automaticly prefix on top 'PREFIX roro: http://x...sdf..fd..'

I try to add with the command but I doesn't work : yasqe.addPrefixes = {roro: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"};

Thank in advance,

LaurensRietveld commented 6 years ago

Note that the documentation (see https://yasqe.yasgui.org/doc) uses a function syntax for the addPrefixes property. I.e., you have to add prefixes via a function: yasqe.addPrefixes({roro: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"})

art-tom commented 6 years ago

Ok thanks for the answer.

But if I ask the question, maybe your documentation is not clear for me. Please show me an example.

Thank in advance,

LaurensRietveld commented 6 years ago

I gave you an example in the my previous post

art-tom commented 6 years ago

Not work in my case.

 * Configuration de Yasqe et de son point de connexion
 */
var yasqe = YASQE(document.getElementById("yasqe"), {
    sparql: {
        endpoint: sparqled.config.endpoint,
        showQueryButton: true,
                namedGraphs: { 
                    default: sparqled.config.namedGraphs
                }
    },
});

 yasqe.addPrefixes({roro: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"});
art-tom commented 6 years ago

It's ok, in fact I test with existing prefix. Sorry