Hi
I may have misunderstood something but here is my problem.
I am using Jena API to get triples from this SPARQL endpoint:
http://sparql.sindice.com/sparql
My query is:
--------------
SELECT DISTINCT ?s ?o WHERE {
?s rdf:type rdfs:Class .
{?s foaf:name "species"@en .}
UNION {?s foaf:name "species" .}
OPTIONAL {?s owl:equivalentClass ?o .}
}
--------------
The query should return 5 results, each about a *blank node*. If you
send the query using the web interface above, you should get the
following results:
---------------------------
s o
nodeID://b122741495
http://purl.org/science/protein/bysequence/ncbi_gene.42069
nodeID://b122741495
http://purl.org/science/protein/bysequence/ncbi_gene.42504
nodeID://b122741495
http://purl.org/science/protein/bysequence/ncbi_gene.47877
nodeID://b122741495
http://purl.org/science/protein/bysequence/ncbi_gene.42945
nodeID://b122741495 nodeID://b122741495
---------------------------
However, using Java Jena API and the following, code, I get completely
different blank node IDs:
----------------------
s o
32ec7330:13d4066f80a:-7fff
http://purl.org/science/protein/bysequence/ncbi_gene.42069
32ec7330:13d4066f80a:-7fff
http://purl.org/science/protein/bysequence/ncbi_gene.42504
32ec7330:13d4066f80a:-7fff
http://purl.org/science/protein/bysequence/ncbi_gene.47877
32ec7330:13d4066f80a:-7fff
http://purl.org/science/protein/bysequence/ncbi_gene.42945
----------------------
Why are the IDs different? because they are different, I cannot do
further queries on the node at the sparql end point. What I mean is, if
I then query:
"Select ?p ?o where{32ec7330:13d4066f80a:-7fff ?p ?o .}"
I will have no results, because the node ID does not match with
"nodeID://b122741495".
Would really appreciate any insight to this!
--
Ziqi Zhang