GraphDB Visual graph does not display all triplets
My schedule has the following statements
@prefix : <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .
I have uploaded the graph to GraphDB.
If I point the GraphGB Visual Graph to :joesmith
, I would like to see all the triplets, but I see this graph
foaf:givenname
and are foaf:family_name
not displayed in the graph, but they are in the node details tab, which is fine.
Instead, node is http://www.example.org/~joe/
not connected to :joesmith
. This seems to be quite wired since there is an explicit statement belonging to:joesmith
Is this a bug or a problem in my data?
source to share
This is definitely a mistake. This error only affects the functionality of the Visual Graph. SPARQL results view is fine.
The problem seems complicated. There are two factors:
-
This namespace is
<http://xmlns.com/foaf/0.1/>
- somewhere, somewhere. -
This namespace is not being executed correctly.
Consider the following examples. Before each example, clear the repository and remove the prefixes created in the Settings> Namespaces folder.
Case 1
@prefix : <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .
As you pointed out, is <http://www.example.org/~joe/>
not displayed.
Case 2
@prefix : <http://www.example.org/~joe/contact.rdf#> .
@prefix foo: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:joesmith a foo:Person ;
foo:givenname "Joe" ;
foo:family_name "Smith" ;
foo:homepage <http://www.example.org/~joe/> ;
foo:mbox <mailto:joe.smith@example.org> .
In this case, it is <http://www.example.org/~joe/>
not displayed.
Case 3
@prefix : <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmlns.com/foaf/01/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .
In this case, is displayed <http://www.example.org/~joe/>
.
Case 4
@prefix : <http://www.example.org/~joe/contact.rdf#> .
@prefix foaf: <http://xmln.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
:joesmith a foaf:Person ;
foaf:givenname "Joe" ;
foaf:family_name "Smith" ;
foaf:homepage <http://www.example.org/~joe/> ;
foaf:mbox <mailto:joe.smith@example.org> .
In this case, is displayed <http://www.example.org/~joe/>
.
I will try to contact support directly by sending an email.
UPDATE 1
It is said that there are four kinds of RDF term:
- URIs
- literals
- Empty nodes
- URIs considered "not real" by their team.
From the GraphDB query logs, you can figure out which URIs are of the fourth kind.
BIND (strstarts(str(?p), "http://purl.org/dc/terms/") ||
strstarts(str(?p), "http://dbpedia.org/ontology/subsidiary") AS ?isMeta)
FILTER(!strstarts(str(?p), "http://www.w3.org/2002/07/owl#")
&& !strstarts(str(?p), "http://www.w3.org/1999/02/22-rdf-syntax-ns#")
&& !strstarts(str(?p), "http://www.w3.org/2000/01/rdf-schema#")
&& !strstarts(str(?p), "http://www.openrdf.org/schema/sesame#")
&& !strstarts(str(?p), "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl")
&& !strstarts(str(?p), "http://www.w3.org/ns/prov")
&& !strstarts(str(?p), "http://dbpedia.org/ontology/wikiPage")
&& !strstarts(str(?p), "http://dbpedia.org/property/wikiPage")
&& !strstarts(str(?p), "http://www.omg.org/spec/")
&& !strstarts(str(?p), "http://www.wikidata.org/entity/")
&& !strstarts(str(?p), "http://factforge.net/")
&& ?p != <http://dbpedia.org/property/logo>;
&& ?p != <http://dbpedia.org/property/hasPhotoCollection>;
&& ?p != <http://dbpedia.org/property/website>;
&& ?p != <http://dbpedia.org/property/homepage>;
&& ?p != <http://dbpedia.org/ontology/thumbnail>;
&& ?p != <http://xmlns.com/foaf/0.1/depiction>;
&& ?p != <http://xmlns.com/foaf/0.1/homepage>;
)
UPDATE 2
In GraphDB 8.3, it was fixed in some way:
GDB-2076 - Visual graph: sequential processing of foaf / dbpedia predicates that point to IRIs but are treated as literals
source to share
The visual graph functionality shows resources (= objects with IRI) and how they are connected. Since foaf: givenname and foaf: family_name point to literals, they are not displayed in the graph. You are correct that foaf is being handled on purpose. The foaf: homepage and foaf: image properties are treated as if they were pointing to literals (and therefore not shown) because they are used to refer to URLs on the internet, not as real RDF IRIs pointing to others resources on the chart. No other properties of the foam are specially treated.
In a future version of GraphDB, you'll have finer control over what's left out.
Edited: not shown foaf: home page in sidebar (where literals are shown) is incompatible with hiding it from graph. This will be covered in the next version.
source to share
Starting with GraphDB 8.3, you configure all visual graph queries by creating your own visual graph config. Check the documentation here. http://graphdb.ontotext.com/documentation/enterprise/devhub/custom-graph-views.html?highlight=visual%20graph%20config
There is also a webinar. https://www.ontotext.com/custom-graph-views-webinar-recording/
source to share