简体   繁体   中英

SPARQL query on Marklogic with LUBM data

I'm using MarkLogic as an RDF server and LUBM datasets to test some of my access control policy. I have loaded some .owl files (created by LUBM generator) in MarkLogic. After that, when I explore database, it looks like this:

截图

The problem is that when I try to query, it always returns "Your query returned an empty sequence". Here is some example query of LUBM data: http://swat.cse.lehigh.edu/projects/lubm/queries-sparql.txt

I suspect that the problem is that you've loaded the .owl files directly as XML, but not gotten them into the triples index. Given your OWL files, try using MLCP to load them .

Once you've done that, take a look in Query Console again. You should see documents with URIs like /triplestore/353b9c6d0ce5910f.xml . These will hold your triples in the format that MarkLogic expects to work with internally . (Don't worry, you can still export them in other formats.)

Next, check that you've got the triples index turned on for the database you're using. You can turn it on using the Admin UI (port 8001) or the Management API.

If all went well, you should be able to run a simple test using your browser: http://localhost:8060/v1/graphs/things . Replace the port number with that of an app server that uses your content database. If all went well, you should be shown some "things" represented by triples. Then try your queries again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM