1

Ontotext GraphDB 9.1.1, Free Edition Centos7 3.10.0-1062.9.1.el7.x86_64

One of my graph that contains blank nodes like this:

@prefix : <urn:ex:> .
:John :weight [ :value "5" ;
                :unit  "kg"  ] .

When I searching John in the Explore/Graphs Overview for the default graph, triples are displayed and the subject :John has a object called _:node3.

However, the object is displayed as text rather than a resource link like a :John.

And I click Visual Graph for :John, nothing is displayed.I tried Advanced Graph Configuration, also failed.

I found some solution that using CONCAT to merge object, but it's not enough graceful.

What I expect is that blank nodes could be displayed on Overview and Visual Graph.

Is that possible no matter what version of graphDB?

Thanks!

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
ilikecola
  • 23
  • 2

1 Answers1

0

A blank node is a node that does not have a IRI as its identifier. That's the reason the Visual Graph shows only IRIs. Ideally you should avoid using blank nodes as it will be inconsistent with the fact that :John is IRI and you are using blank node to define it's properties.Here's a workaround (I'm not sure if you found this one):

prefix : <urn:ex:>
CONSTRUCT { 
    :John :weight ?value
} WHERE {
    :John :weight ?bnode.
    ?bnode :value ?nameLiteral;
       :unit "kg" .
    BIND( IRI(CONCAT("http://test", ?nameLiteral)) as ?value)
}
Konstantin Petrov
  • 1,058
  • 6
  • 11
  • Thank you for your answer.But example :John is the simplest subject in actual dataset, in some case CONCAT cannot be used to merge these object.Is it possible that using some auto-generated IRI to identify blank node? – ilikecola Mar 06 '20 at 17:08
  • 1
    I find this resistance by OntoText to treat blank nodes with respect entirely unsatisfying. There is nothing inconsistent with the use of blank nodes as shown and is documented throughout Semantic Web ontologies using just such an example to capture compound properties. VCard uses this for the vcard:n property to link the component parts of a name (vcard:family-name, vcard:given-name, etc.). Well established datasets use blank nodes for many reasons. Standard containers and collection use blank nodes by design. Reification often uses blank nodes. They should be treated just like IRIs. – AtesComp Mar 24 '21 at 22:27