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?
RDF Schema is written in RDF using the terms described in this document. These resources are used to determine characteristics of other resources, such as the domains and ranges of properties. The RDF Schema class and property system is similar to the type systems of object-oriented programming languages such as Java.
RDF is a data model that provides a way to express simple statements about resources, using named properties and values. The RDF Vocabulary Description Language 1.0 (or RDF Schema or RDFS) is a language that can be used to define the vocabulary (i.e., the terms) to be used in an RDF graph.
RDF Schema (Resource Description Framework Schema, variously abbreviated as RDFS, RDF(S), RDF-S, or RDF/S) is a set of classes with certain properties using the RDF extensible knowledge representation data model, providing basic elements for the description of ontologies.
RDF vocabularies can describe relationships between vocabulary items from multiple independently developed vocabularies. Since URI-References are used to identify classes and properties in the Web, it is possible to create new properties that have a domain or range whose value is a class defined in another namespace.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With