query multiple ttl files with sparql #4768
luisenriqueramos1977
started this conversation in
General
Replies: 1 comment 2 replies
-
Can you post your Java code? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have two simple ttl files with following data:
example1.ttl:
ns1:place1 a owl:NamedIndividual;
ns2:hasAddress address_1 .
example2.ttl:
ns2:address_1 a owl:NamedIndividual;
ns2:hasproperty1 property1 .
ns2:hasproperty2 property2 .
I uploaded the files with:
con.add(example1.ttl)
g.add(example2.ttl)
when I use sparql to get the address of place:
SELECT ?address
WHERE {
ns1:place1 ns2:hasAddress ?address .
}
I get the expected address object
when I ask for all properties of address object:
SELECT ?property ?value
WHERE {
ns2:address_1 ?property ?value .
}
I also get them, but when I ask for the properties of the address of the place:
SELECT ?property ?value
WHERE {
ns1:place1 ns2:hasAddress ?address .
?address ?property ?value .
}
I get a blank result, I wonder what should I be doing wrong?,
Because I was waiting to get all properties of the address.
Best regards
Luis
Beta Was this translation helpful? Give feedback.
All reactions