Jena's DESCRIBE behavior is pluggable. [1] If you can live with one "hop" on
bnode traversal, you can use a plain query with isBlank. I'm sure this could be
written better, but something like:
CONSTRUCT { ?sub ?pred ?obj }
WHERE {
{ VALUES ?sub { }
?sub ?pred ?obj . }
UNION
{ ?s
good afternoon;
> On 2017-04-15, at 11:43, Laura Morales wrote:
>
>> Blank node closure is non-trivial
>
> wouldn't be this the same problem with URLs as well?
yes, in general.
> For example if a node is pointing to another resource's URL and I want to
> retrieve some properties of that link
> Blank node closure is non-trivial
wouldn't be this the same problem with URLs as well? For example if a node is
pointing to another resource's URL and I want to retrieve some properties of
that linked resource from the same query?
In a trivial way, perhaps you can specify something like:
SELECT * WHERE {
?property ?object
OPTIONAL {
?object ?subProperty ?subObject .
FILTER (isBlank(?object))
}
}
This assumes nothing about structure and may perform badly.
On Fri, Apr 14, 2017 at 4:17 PM, Laura Morales wrot
Blank node closure is non-trivial and not part of the SPARQL specs. That
means, you either
a) have to do some pre-processing of the data
b) use some extensions, e.g. in Jena you can use a DESCRIBE query which
supports blank nodes closure, see [1] (Note, that DESCRIBE returns an
RDF graph instead o
If I have these nquands (in Turtle syntax)
ns:name "My name" ;
ns:address [
ns:street "Street name" ;
ns:number "42" .
] .
ns:name "Another name" ;
ns:address [
ns:street "Another street" ;
ns:n