4

In my graph I have the following assertions

  @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:[email protected]> .

I loaded the graph in GraphDB.

If I point the GraphDB's Visual Graph to :joesmith, I would like to see all the triples but I see this graph

enter image description here

foaf:givenname and foaf:family_name are not shown in the graph but they are in node details tab, and it's ok.

Instead the node http://www.example.org/~joe/ is not connected to :joesmith. It seems pretty wired, since there is an explicit assertion belonging to :joesmith

Is this a bug or a problem in my data?

3 Answers 3

3

This is definitely a bug. This bug affects Visual Graph functionality only. In the SPARQL results view, everything is fine.

The problem seems to be complex. There are two factors:

  • This namespace — <http://xmlns.com/foaf/0.1/> — is hardcoded somewhere.

  • This namespace is not proceeded correctly.

Let us consider the following examples.
Before each example, clear your repository and delete prefixes created in Setup > Namespaces.

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:[email protected]> .

As you have pointed out, <http://www.example.org/~joe/> is not shown.

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:[email protected]> .

In this case, <http://www.example.org/~joe/> is not shown.

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:[email protected]> .

In this case, <http://www.example.org/~joe/> is shown.

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:[email protected]> .

In this case, <http://www.example.org/~joe/> is shown.


I'll try to contact their support team directly by sending email.


UPDATE 1

They say there are four kinds of RDF terms:

  1. URIs
  2. Literals
  3. Blank nodes
  4. URIs considered by their team as "not real".

From GraphDB query logs, one can ascertain what 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: consistent handling of foaf/dbpedia predicates that point to IRIs but are treated as literals

Sign up to request clarification or add additional context in comments.

4 Comments

Yes, SPARQL results are fine. Why does case 4 work? PS: there is a typo in case 4 number
Ok, just seen the missing 's' in foaf namespace in case 4 ;)
This typo (xmln instead of xmlns) is intentional. The foaf: namespace in this case contains dot after domain name, but everything is fine.
Yep, I got that. Not having already seen xlmn, I wasn't understanding the difference from case 1. ;)
2

The Visual graph functionality shows resources (= things that have IRIs) and how they are connected. Since foaf:givenname and foaf:family_name point to literals they aren't shown in the graph. You are right that foaf is handled specially. The properties foaf:homepage and foaf:depiction are treated as if they point to literals (and hence are not shown) because they are used to refer to URLs on the internet and not as real RDF IRIs pointing to other resources in the graph. No other foaf properties are treated specially.

In a future version of GraphDB you'll have a more fine grained control over what's omitted.

Edited: not showing foaf:homepage in the side panel (where literals are shown) is inconsistent with hiding it from the graph. This will be addressed in the next version.

4 Comments

Another thing: if we are to be consistent we should do the same with foaf:mbox as it points to an email address and not an RDF resource.
According to this logic, shouldn't you consider as an literal any dereferenceble URI? Anyway, if foafname:homepage value is "in fact" a literal, why it is not displayed in the right sidepanel?
@PavelMihaylov, as Stanislav mentioned, in the side panel we can see only foaf:givenname and foaf:family_name as predicates ranging to a literal but foaf:mbox is not displayed there. If I search for http://www.example.org/~joe/ in the VisualGraph, it appears as a disconnected node...
Unfortunately there is no way to tell if a given IRI (something stored as an IRI and not a literal) was meant to refer to an RDF resource or be used as a URL. In the case of foaf:homepage we have used some human reasoning with the idea to have clearer graphs. Not displaying it in the side panel is definitely a bug and will be addressed in the next release.
0

Since GraphDB 8.3 you configure all of the queries of the Visual Graph 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/

1 Comment

Please just note if you want to promote or recommend your own product/blog, there are some guidelines in place for doing so. Following them will help you avoid giving the impression that you're spamming. Could you please edit to explicitly state your affiliation? (If you're not actually affiliated, it may be worth mentioning that as well.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.