I have simple RDF data set with following values: user, url, time and ip. I can list all the data using:
SELECT DISTINCT * WHERE { ?s ?p ?o }
But now I need to list all the data with specific user. I would very much appreciate if the data from the query would be in the same format as the data from above query but it is not necessary.
I tried this and some modifications to this but none of it seems to work:
SELECT DISTINCT * WHERE { ?s ?p ?o. ?u foaf:user username. }
I am just starting to work with Jena and SPARQL and any help will be much appreciated. Thanks in advance.
EDIT: @AKSW foaf:user
works because foaf
is my own prefix I defined. I struggled with getting the queries working and had no clue what I was doing. This is something I hadn't clean up yet.
I ended up using query SELECT DISTINCT * WHERE {?u foaf:name USER_NAME_LITERAL . ?u ?p ?o . }
which was the one you suggested, so thank you. If you post it as answer I will mark it as accepted.