Open mathib opened 4 years ago
At least with GraphDB, I might have found a workaround but it's specific for GraphDB. It's possible to get the internal GraphDB ID of each URI, BN, literal, etc.: http://graphdb.ontotext.com/documentation/free/query-behaviour.html?highlight=blank%20node
With the following query, the ID can be retrieved of a BN:
PREFIX ent: <http://www.ontotext.com/owlim/entity#>
SELECT * WHERE {
FILTER (isBlank(?bn))
?bn ent:id ?id .
} ORDER BY ?id
And with this query, the ID (xsd:long, eg 5660) can be used to query information
PREFIX ent: <http://www.ontotext.com/owlim/entity#>
SELECT * WHERE {
?s ent:id 5660 ; ?p ?o .
}
A more generic solution might be to find blank nodes by matching their projected string.
SELECT *
WHERE {
?bn ?p ?o .
BIND(STR(?bn) AS ?bnString)
FILTER(?bnString = "genid-6aa0586592bf40cc83e34d1771ad8adf-0")
}
This works for Stardog, but sadly not for GraphDB... (empty strings are returned for ?bnString
)
Expected Behavior
Being able to view triples with a BN as the subject, either through the details view on the BN when in object position or when focusing on the BN directly.
Actual Behavior
I can see BNs appear in the facet browser list and when viewing individual resources as long as the BNs are in the object position of triples. If I want to view details of a BN object, I cannot see the triples with this BN as the subject. If I click on the blank node, I end up on an empty LD-R page of that BN (no triples are shown, only the BN ID is presented). I played a bit with the settings in
reactor.js
for the property pointing to BNs and sethasBlankNode: 1
, but without success.I did some tests with GraphDB and Stardog.
With GraphDB, I receive an error from GraphDB, that it received an erroneous SPARQL query (BN is treated as an absolute URI):
'MALFORMED QUERY: Not a valid (absolute) IRI: genid-0ec5327183c642a3aff8f0b3208583c7-130'
With Stardog, I only get an error from LD-R
Steps to Reproduce the Problem
Specifications