views:

98

answers:

2

I am trying to get my head around using RDF to describe custom resources. I understand there are xmlns' out there such as Dublin Core and foaf which provide predefined element sets. How do I go about creating my own?

I may be barking up the wrong tree of course and should stick to xml + xsd?

A: 

RDFS + OWL is a combination used to define RDF schemata and ontologies.

Paul Butcher
+1  A: 

The short answer is that anyone can just write a collection of RDFS or OWL axioms in a file and start using it with their application. There's a low barrier to creating a new vocabulary or ontology, but there are some guiding principles.

For the actual act of creating the file containing the axioms (i.e. declarations if you're more comfortable with that terminology), I personally just write in the more-compact Turtle format using a text editor. I find this works well with source code control systems, and suits my way of working. There are editors out there if you want a more visual interface, with tools to help ensure correctness and consistency of what you are doing. Commonly used ontology editors are TopBraid Composer and Protege, but there are many others. If you do work in Turtle, but want to publish as RDF/XML or another format, Jena has a command-line tool for converting RDF files between different formats.

When it comes to publishing your vocabulary file, so that other people can use it, you should arrange that the namespace of your concepts resolves to the document describing them. So, if you create a vocabulary that specifies http://example.org/vocab/pet#Iguana, an HTTP GET on that URL, or on http://example.org/vocab/pet should deliver the ontology document itself. Better yet, you will implement HTTP content negotiation (conneg), so that users can request the document in application/rdf+xml, text/turtle etc formats. If your vocabulary is designed for use in-house on an intranet, or for demo/research purposes only, then publication isn't necessarily a step you need to take.

A key component of the linked-data or semantic web is that definitions are re-used where possible, so that applications can see how datasets interlink. For example, if your vocabulary has a concept of name, consider re-using the naming predicates from FOAF rather than invent your own. You mention Dublin Core - that vocabulary is widely re-used in other ontologies. This aspect of modelling can take some time to get right, but it will typically be an iterative process and that's OK. There are communities out there in which you can get help, and there are an increasing number of consultancies who offer professional assistance.

As with any software activity, the clearer you can be about your intended users and their requirements from the outset, the easier it will be to design your ontology.

Ian Dickinson