Dan Connolly complained on rdfweb-dev about FOAF’s redundant inverse properties (depicts/depiction, page/topic), and pointed to this TimBL post, which mentions a nice pattern for designing RDF vocabularies that should be adopted more widely.
Avoid inverse properties. There’s no need to clutter your namespace with redundant inverse properties. Have either
ex:child in your vocabulary, but not both. It doesn’t really matter which; just pick one and stick with it. That way, there are less ways to express the same thing, and that’s good for interoperability.
Of course, if you find out that someone else has independently invented an inverse of your property, then linking to it using
owl:inverseOf is a good idea.
Display back links just like forward links. I’m doing this the wrong way in D2R Server‘s RDF browser. Here’s a screenshot showing an RDF representation of this blog’s Semantic Web category (click to enlarge):
The category has three “forward” properties: It has a type of
skos:Concept, a prefLabel of “Semantic Web”, and a page about it at http://dowhatimean.net/category/semantic-web/.
It also has a bunch of “backward” properties: It is the subject of a number of blog posts. These point “the other way”, that is, from some other resource to the category. The category is the object of the RDF statement, not the subject.
I’m displaying the two types of properties in two different columns. A better way would be to use a single column, and use
rdfs:labels instead of QNames for the properties: has type instead of
rdf:type, and is subject of instead of
skos:subject. Someone browsing the Semantic Web doesn’t care about the distinction between forward and backward properties, they just need to know that the resource is linked to some other resource. And therefore both should be visually represented the same way.
Provide inverse labels in vocabularies. But where do I get this “is subject of” label from? Vocabulary authors usually attach
rdfs:labels to their properties, and they work beautifully in the forward case, but there is no
rdfs:backwardsLabel that could be used in the backwards case.
Here’s Tim’s solution: Introduce an anonymous inverse property and attach the label to it.
skos:subject rdfs:label "has subject" . skos:subject owl:inverseOf [ rdfs:label "is subject of" ] .
I think it’s a beautiful solution, and building the Semantic Web would become easier if it was widely adopted by vocabulary publishers.