Rdf Editor

Next:Transform Between Different RDF Syntaxes

  1. According to our registry, RDF Editor is capable of opening the files listed below. It is possible that RDF Editor can convert between the listed formats as well, the application’s manual can provide information about it. System requirements. The precise system requirements for the RDF Editor application are included in the.
  2. The new PDF-XChange Editor, the worthy successor of PDF-XChange Viewer, does not only include all features of PDF-XChange Viewer, including the only recently added OCR feature, but now also provides you with an option to edit existing PDF documents.
Free

RDF Studio is the easy, comprehensive RDF and ontology designer environment and tool kit. All you need to edit, browse and visualize RDF data on your desktop in an all-in-one package.

Rdf editorial

RDF Studio contains an array of intellisense features to help you build, or extend an ontology quickly using RDF autocompletion. We show you what you can do by guiding you through creating your own basic ontology, from scratch.

After this tutorial, you should be able to:

  • Create a new RDF document.
  • Define a number of classes and properties.
  • Define a number of individuals.
  • Use RDF autocompletion to help find the right ontology vocabulary to use.

Estimated time: 10 minutes

You should have already understood the following lesson (and pre-requisites) before you begin:

One of the main purposes of writing RDF is to build, or extend, an ontology. For this purpose, RDF Studio comes armed with a number useful tools to make this easier.

Rdf Editora

1. Create A New RDF Document

Rdf Editor Online

To learn how to make a simple ontology in RDF Studio, we will start by creating a new RDF document.

  1. Click on 'New...' in the FILE menu, or click 'Create A New RDF File' on the Start Page (the tab that is visible when you first open RDF Studio).
  2. Click on the 'Save as type' drop-down menu at the bottom of the New File window, and select 'Turtle Documents (.ttl)'.
  3. Enter the filename 'tutorial.ttl' into the filename box, and choose an appropriate folder to save our new document.

All being well, you should now see your new tutorial.ttl file appear in the Model Explorer panel. Expand the tutorial.ttl model node and click on the RDF Editor node, as we learned how to do in the Quick Start Tutorial.

You should now see the new Turtle template file as below:

Note that this template new Turtle file already contains prefix definitions for our standard RDF and RDFS namespaces, and some comments to give examples of how you might add your own prefixes and RDF statements to the document.

2. Reference Some Basic Vocabularies

Okay, now you're ready to reference some basic vocabularies. The ontology we're going to build is going to be for an e-commerce site, so we're going to need some commonly used e-commerce terms. That's okay, because RDF Studio comes built-in with the Good Relations ontology, which we will reference in our new ontology.

First, let's add a reference to the Good Relations ontology by adding its namespace. Start typing the following Turtle into your tutorial.ttl RDF editor (don't just copy and paste - you'll see why in a moment!):

Notice that as soon as you hit the '@' character, just like we found when building a SPARQL query in our previous tutorial, we find an immediate list of common RDF vocabularies in our autocomplete list for you to use in your own ontologies. Use the arrow keys to select the 'gr' (Good Relations) vocabulary namespace - you might want to remove the example prefix declaration comment at the same time.

Completely new to ontologies? We recommend you start with our acclaimed RDFS & OWL primer tutorial to get you started.

You should now see something like the following:

Notice that the Turtle syntax has been highlighted in different colors to make it clearer the different component parts of the Turtle ontology.

Because we're extending good relations with our own vocabulary, we'll need to add our own namespace http://www.linkeddatatools.com/example too by adding our own prefix underneath those that have already been added. Type in the following (this time, we won't be using any of the autocompleted namespaces so just ignore the autocomplete options and continue typing):

Rdf Editor

3. Add Our Own Brand And Company Identity Using Good Relations

Let's now extend good relations with our own classes and properties in our own namespace, which the RDF editor will help us to do.

Editor

We want to add a Linked Data Tools brand to our own ontology, so let's add an individual of the gr:Brand class underneath our prefix declarations, like so:

Notice as we type, RDF Studio picks up that we're using our reference Good Relations vocabulary and gives us in-depth help on what the terms mean in our tooltips. The icon next the term in the autocomplete list also tells you whether it is a property or a class you are adding, like so:

Select gr:Brand from the autocompletion list as shown above and hit enter. We now have our first individual, defining our e-commerce brand for Linked Data Tools, as shown below:

Now we'll add a few more declarations to finish off the basic definition of the Linked Data Tools company brand, this time using the standard RDFS vocabulary to add some helpful labels and comments. Type the following below the brand we just defined:

You should now see the following:

Notice as you type, again you can select the label and comment terms from the list without having to type them in manually yourself - just remember to terminate each line with a dot ('.').

As an exercise, experiment yourself with some of the terms using the Good Relations vocabulary. There are plenty of terms available you can use to enrich our company brand definition - from company location, to opening hours, to the specific products and services offered.

RDFe is built in Python 2.3, and requires the Pyrple RDF toolkit. Both are very easy to install on linux and Windows alike. Once you have them, you can download the RDFe source and run it:

Source code: rdfe-2003-11-30.tar.gz

  • size: 28,568 bytes
  • md5: fc247128cfaa07f6829528daf2318609

You can also browse the source via HTTP.

Documentation

The following is a copy of my seminal email, Schema-Aware FOAF Editor, to the rdfweb-dev mailing list.

Further to Danny's little-RDF-serialization email, I worked on a few ideas to see what the easiest way of entering RDF data on the command line is. It occured to me that since schemata can provide domain and range constraints, we might as well use them in an editor.

When combined with path searching for classes and properties a la $PATH and $CDPATH in bash, qnames, and some other features described below, it makes for a very intuitive prompt in each line--all the rest is context data given out by the program.

First of all, what you can't see in the example above is that before you can use the editor, it asks you for some schemata to use. I fed it the RDF, RDFS, OWL, FOAF, and DC schemata, merged them, and then applied the rdfs-closure rules. There were 1044 statements before applying the rules, and 2096 after. It then saves the results locally to a file so that it doesn't have to download from the Web and do the reasoning again every time it loads (it takes a while!).

When initialized with the schema already loaded, as in the example above, it'll prompt for a particular type of data to be entered: RES> for a resource, LIT> for a literal, or PROP> for an rdf:Property instance. It prompts me for a subject with the type of RES first of all, so I give it 'Person'.

It looks through its path, which at the moment is set to 'rdf:rdfs:owl:foaf:dc'. The problem with searching through paths is that if, for example, RDF suddenly sprouted an rdf:name property, I'd be flummoxed when entering 'name' in and getting it to path-search. @@ It should therefore be possible to change the current subject or predicate in the editor.

So the subject is initially set to foaf:Person. Now it shows what the current subject is in the prompt, and asks me for a PROP to apply. I give it 'name', which it resolves to foaf:name.

Free

Now for the first clever bit. It looks at the schemata, and sees that I declared a couple of things in my local editorial schema: 'foaf:name rdfe:domain foaf:Person . foaf:Person rdfe:disjointWith rdfs:Class .' Note that I've used rdfe: instead of rdfs: and owl:, since these constraints aren't actually in the FOAF schema. What I'm saying is that locally, for this editor, I will only ever use foaf:name on foaf:Person instances, and that foaf:Person is disjoint with rdfs:Class.

Upon seeing this information, the editor decides that 'foaf:Person foaf:name' is not a valid start to a triple, and so it decides that what I really meant is '_:person rdf:type foaf:Person . _:person foaf:name' and accordingly makes the typed statement and resets the subject to be a bNode. It represents bNodes using the '_' (underscore), as shown in the next prompt:

Rdf Editor

Note here that it also automatically knows that the object of foaf:name is an rdfs:Literal, and so it prompts for LIT> instead of RES>. This means that I don't have to use <> for URIs and ' for Literals, since it should automatically decide.

Aside: note that rdfs:Literal is a subClassOf rdfs:Resource... so there's a minor problem there, though I'm resolving that at the moment by saying that if there's only rdfs:Literal in the range of the property, prompt for LIT>, if there's both, I could probably guess what's meant by using some heuristic (e.g. if the entered object contains a space, then it's a literal), and if there's no rdfs:Literal in the property ranges, prompt for RES>.

Now it asks for another property, and I give it knows. I then say that I know a person.

Again, more reasoning: the range of foaf:knows is foaf:Person, so it creates a new subject and types it as being a Person instead of using Person itself as the object. It then says that I know this new subject. To show that we've moved into the graph a bit further, as it were, it indents. So I'm now entering properties for the Person that I foaf:know. I add a name arc.

I give it libby's name, and then enter nothing as a property. Entering nothing as a property makes it go up to the previous level. So now I'm back to entering in properties about myself. I bung in homepage, and it correctly guesses foaf:homepage and prompts for a resource.

I gave it a blank property and blank subject resource to exit the program. I've also been experimenting with commands, which start with '@' (an at-sign), so I could enter @quit to quit, @subj to view the current subject in full, and so on.

Just before the program quits, it pipes out the N-Triples of the result to STDOUT. All of the prompts are on STDIN. Here's what I got for the example above, using QNames to make it readable:

Here's another example:

The new features of note here are a) if it can't find a property in the current schemata, it says so, and b) '+' (plus-sign) is used to denote a URI as a subject. I'm glad it guessed that rdfs:label was a literal straight off, since it meant I didn't have to add it to my local.nt schema and rebuild the whole lot.

In making the editor, I came across a number of issues, many with FOAF since that's what I've been using to test it generally (and what I think it'll be most useful for--it's what Danny's original example was about).

The first issue is that auto-discovery of the FOAF schema is hard, because it's embedded in the HTML. I had to write something to extract the rdf:RDF from there, and it's all regexp based, of course. Plus, if you want the charset of the embedded RDF, you have to parse it out of the HTML MIME type header, or from http-equiv, which is really horky. I could've sent accept: application/rdf+xml, but the rdf:RDF in the HTML specification is more up-to-date.

So I don't believe that embedding the schema in the HTML is a good idea. If it were <link>'d, as recommended, it would have solved the regexp problem (what happens if there's '</rdf:RDF>' in a literal?), and the charset problem. I suggest that the specification be changed to use that method.

Secondly, there are some things missing from the schema. I already pinged danbri on #foaf about adding rdfs:Resource as a domain for foaf:name (actually, I was wanting foaf:Agent or foaf:Person, but oh well--I just added it to my local schema), but foaf:nick is also missing rdfs:Literal as a range.

I'm sure that the editor could have many more features, and that it's actually not all that useful, and there are probably GUI schema-aware RDF editors already that are much better, so I'd be interested to hear about any parallel research or feature requests.

Rdf Editorial

As my colophon, I'd like to note that I've been doing this schema-aware via RDFS-Closure sort of stuff for a couple of years now, and that for me it's quite a pointer to how RDF can actually be useful. My previous experiments were in validating RDF, which I found useful in debugging the EARL schema.

If you've any comments or feedback, please don't hesitate to contact me: you can either email me at sean@mysterylights.com, or speak to me on IRC as sbp on irc.freenode.net (on #rdfig, #sbp, and #foaf). IRC is preferred at the moment.

Rdf Editor Javascript

Sean B. Palmer