The shiny RDF robot of power

RDFAuthor Tutorial

This tutorial explains how to create RDF instance data using RDFAuthor. We'll be creating data about Dan Brickley using the foaf schema. This isn't detailed documentation, but should get you started.

Note: These screenshots are out of date, but this tutorial is still correct. Some icons have been added to the toolbar which are irrelevant to what follows

  1. Open RDFAuthor

    This will present you with an empty document. The toolbar items have tooltips, so have a look at what they do if you want.

  2. Open Dan's Homepage

    We'll be grabbing most of our information from Dan's homepage open it in OmniWeb. I say 'Omniweb' because Explorer doesn't seem to type dragged URLs properly - something we need.

  3. Open The Schema Window

    The schema window is under the 'Tools' menu, or can be opened using 'alt-apple-s'. It comes with several useful schemas ready to be loaded. Import 'http://xmlns.com/foaf/0.1/' since that's all we'll be using. Once imported you'll see that there are now entries under 'Node Types' and 'Connection Properties' (foaf has both).

  4. Creating a 'foaf:person' Node

    We want a person to hang properties of, so open the foaf entry under 'node types' and drag 'Person' onto the big empty white rectangle in the document window.

    This will create an anonymous resource node of type 'person' at the point you dragged to. It's red because it is the currently selected item. Turn on all the display options (three buttons on middle of toolbar) so that you can see that the node is anonymous and has type 'Person'.

  5. Adding Dan's Homepage to the Model

    Move to Omniweb. Drag the url for the page into the model.

    You will now have a node with the id of Dan's homepage, but a genric type: resource.

    This should be a foaf:Document, so drag 'Document' from the schema window onto the newly created node. This will add a type to the node.

  6. Adding the Literal "Dan"

    This is pretty simple. Drag the text 'Dan' from Omniweb into the model. This creates a literal node containing 'Dan'. By selecting different nodes you'll see that resources are green, whereas literals are yellow. The currently selected item is red. You can select and move nodes using the 'Select and Move' mode in the toolbar (surprise). Tab and shift-tab also select items in the order (and reverse order, respectively) that they were added to the model. Incidently, the reason for not using Explorer is that it treats URLs like strings, so dragging URLs produces literals containing the URL - not what you want. This is simple to fix (using the info window - see below), but a pain.

  7. Add More Nodes

    You should now be able to add other information, and type it accordingly, from the web page.

  8. Adding Connections

    We now need to connect our subject (the anonymous 'Person') to all the information we have about Dan. Select the 'Add Connection' mode in the toolbar. Drag connections from the 'Person' to each of the other nodes. This creates connections (without properties) with the 'Person' as the subject, and the node pointed to as the object.

  9. Adding Properties to Connections

    We now need to state what kind of relation (property) our object bears to the subject. Open the foaf connection properties in the schema window. Drag the relevant properties onto each of the new connections, eg 'mbox' for the connections pointing to Dan's email addresses, 'firstName' for the connection pointing to the 'Dan' literal.

  10. The Final Model

    We've now pretty much finished. Hopefully you've got something much like the image below.

  11. Manually Adding Data

    There is, of course, plenty of data that isn't contained in Dan's homepage. For example, I happen to know that Dan uses the irc nick 'danbri'. We can add this by creating a new node and connecting with a 'nick' connection.

    The new node is completely wrong. It is an anonymous resource, whereas we want a literal 'danbri'. Select the offending node and open the info window (apple-shift-I), or simply double click on the node. This will open a window which displays information about the currently selected item. We want this to be a literal, so select 'Change to literal' and press 'Change' (or press return).

    Next we want the content of the literal to be 'danbri', so enter 'danbri' in the 'Content' field, and select 'Change' again.

  12. XML preview

    You can look at the XML/RDF serialisation of this model by clicking on the 'Toggle View' item in the toolbar. This replaces the graphical view with a text view containing the XML representation. You can't edit the model in text, but you can copy text from the preview.If there are any errors, however, a dialog box will pop up - see the next section for this.

  13. Dealing with Errors

    RDFAuthor attempts to prevent you making broken rdf - but it isn't perfect. Problems may show up on preview or export. To check for them click the 'Check Model' item in the toolbar (it's a big 'tick' icon). If there are any errors or warnings it will tell you and open a window containing a summary of the problems. Double-clicking on entries will select the problem item, and open the info window so that you can edit the item manually.

    Below I've added some two errors into the model (a connection with no property, which also begins at a literal), and one change which will raise a warning (one literal is empty).

  14. Saving and Exporting

    You can save RDFAuthor models just as you would any other document. You can also export the model as xml/rdf using the 'Export As' item in the file menu. Select the 'RDF/XML Document' option'. This will not work if the model has any errors (but it will tell you that export failed).


Damian Steer
Last modified: Thu Nov 08 20:36:05 GMT 2001