1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/usr/bin/gjs
const { GLib, Gio, Tsparql } = imports.gi
try {
let connection = Tsparql.SparqlConnection.new(
Tsparql.SparqlConnectionFlags.NONE,
null, // Database location, None creates it in-memory
Tsparql.sparql_get_ontology_nepomuk(), // Ontology location
null);
let bus = Gio.bus_get_sync(Gio.BusType.SESSION, null)
let endpoint = Tsparql.EndpointDBus.new(
connection, bus, null, null);
let loop = GLib.MainLoop.new(null, false);
loop.run();
connection.close();
} catch (e) {
printerr(`Error: ${e.message}`)
}
|