you could create your own procedure. like: create procedure INSERT_SPARQL_RESULT ( in query VARCHAR ) { DECLARE state, msg, descs, rows any; exec('SPARQL ' || query, state, msg, vector (), 0, descs, rows); declare i INTEGER; for(i:=0;i<LENGTH(rows);i:=i+1){ INSERT INTO tablename VALUES (rows[i][0], rows[i][1]); } }; It is important to add...
If you not sure about the graph-name, you might look them up in the LinkedData tab in you Virtuoso conductor. It should also be possible to use VirtModel.openDatabaseModel without a graph name (connectionURL, username, password)...
The dynamism of Linked Data Views is in the data you see through the VIEW. The definition of the VIEW is not itself dynamic. Schema definitions of RDB databases are typically fairly static; changes here are not reflected automatically through Virtuoso's Linked Data Views. Data in RDF databases is typically...
Rebuilding the database did not correct the problem. I was, however, able to get a working version by taking the following steps. Some of them may have been unnecessary, but given how long it takes, I haven't done controlled experiments to narrow things down to the minimum. First, delete the...
sparql,semantics,semantic-web,virtuoso
The query you've shown us might not be the same as the query you're actually running. First, the fact that the error message says "line 1" makes me wonder whether you've actually got the query run all onto one line. That can make it easy to get typo problems. When...
You can use Sesame's QueryResultIO utility for this. Simplest way is to just let it parse the stream into a query result object. Like so: InputStream in = ...; TupleQueryResult result = QueryResultIO.parse(in, TupleQueryResultFormat.SPARQL); The above is hardwired to create a result object. If you want more control over the...
java,eclipse,ubuntu,terminal,virtuoso
I have had a hard time trying to get commands run using Runtime.exec() in the past. Anyways I have shifted to using ProcessBuilder as follows: ProcessBuilder pbuilder = new ProcessBuilder("bash", "-c", <<your command as string>>); File err = new File("err.txt"); try { pbuilder.redirectError(err); Process p = pbuilder.start(); p.waitFor(); } catch...
You can transform the URI into a string and then filter based on what it starts with. The keyword you need to use is STRSTARTS: select distinct * where{ ?s ?p ?o filter(STRSTARTS(str(?s), "http://test.com/")) } or you can use regular expressions with the ^ sign: select distinct * where{ ?s...
IRIs are case sensitive. Notice that in your ontology owl:Class uses a majuscule C: <owl:Class rdf:about="#1st_Generation"> <rdfs:label>1st_Generation</rdfs:label> <rdfs:subClassOf rdf:resource="#Antibiotics"/> </owl:Class> That needs to be the case in your SPARQL query as well. And, if you haven't elsewhere, you'll need to define the prefix. If you stored the data in a...
Questions specifically regarding Virtuoso are generally best raised on the public OpenLink Discussion Forums, the Virtuoso Users mailing list, or through a confidential Support Case. That said... Queries against remote files cannot be run through Virtuoso. But, Virtuoso can be told to import those files (whether via the Sponger or...
Rather than providing just the filename, use a file URI instead. E.g.: graph.read("file:///tmp/index.rdf", "RDF/XML"); ...
java,alias,sparql,jena,virtuoso
I see you also asked this on the OpenLink Software Support Forums... (ObDisclaimer: I work for OpenLink Software.) I've also posted this answer there. The error you're encountering is coming from the Jena parser, not from Virtuoso nor the Virtuoso Jena Provider. First thing is to correct the query to...
< and > are illegal in URIs so the parser is going to get upset if used directly. CLEAR can be thought of as a short form of DELETE so you can try: DELETE { GRAPH ?g { ?s ?p ?o } } WHERE { GRAPH ?g { ?s ?p...
I believe you cannot put the unicode characters in the URI. What you could do is to filter them through a regular expression. Here is what I came up with: select distinct ?abstract ?thumbnail where {?uri rdfs:label ?label. ?uri dbpedia-owl:abstract ?abstract ; dbpedia-owl:thumbnail ?thumbnail . FILTER (REGEX(STR(?label), "^Albrecht D\u00fcrer")) ....
The result http://it.dbpedia.org 86712483 in your original query means that there are 86712483 in the graph named http://it.dbpedia.org. Your second query: select ?museum, ?artwork where { ?museum a <http://dbpedia.org/ontology/Museum>. ?museum <http://dbpedia.org/ontology/address> ?address. ?artwork <http://dbpedia.org/ontology/location> ?museum. filter contains(?address, "Firenze") } is a query over the default graph. Some SPARQL endpoints make...
No need to create a sparql endpoint, since it's already there. Check the inserted RDF data on your Virtuoso instance sparql endpoint http://cname:port/sparql (usually: http://localhost:8890/sparql). To do some test queries, use the web interface of Virtuoso (the conductor) http://localhost:8890/conductor and go to the 'Linked Data' tab. Enter a query like:...
order,rdf,sparql,semantic-web,virtuoso
The virtuoso version is: 07.00.3203 . Funny enough I have tried the same example in an old virtuoso instance we have for testing (ver: 06.01.3127) and it works perfectly, so it must be a bug. For those who want to replicate the bug, the triples are the following: https://mega.co.nz/#!QldDySoD!vCnGqlYFCA5-jyMzq3GuRH39Kb2nMiUARG752G1pfAs...
You can use strstarts(string,prefix) to check whether string begins with prefix. You can use the str function to get the string representation of a IRI, including IRIs generated from prefixes. E.g., if you have prefix ex: <http://example.org/>, then ex: by itself is a legal IRI, and str(ex:) produces "http://example.org/". That...