Jena2 Manager

An open source Java(tm) project under the Jabber Open Source License (JOSL).
Created by Jack Park
Version 0.5  24 November, 2003

Briefly stated, I needed a means by which I could quickly hack models and ontologies to learn how to use Jena2.  There remain many things to learn, and many things to finish coding in the program. I'm turning it loose so that others can contribute to its development. The JOSL license requires that those who fix things in the code or otherwise improve it return their code to the public. JOSL does not require that users use an open source license on new code that extends the licensed code. Download the entire project here. (6megabytes, including source, classes, jars).

Please note: I have some bandwidth I can share with those who wish to improve this program, but I have no, read: zero bandwidth for answering simple questions about how to install anything or what RDF means or anything like that. This project is for advanced hackers.

Here is what the program looks like when first booted::

j2-1

The program sports three tabs. One for creating and editing OntModels, one for creating and editing ModelRDBs, and one for viewing RDF stored in a MySQL database as illustrated next.

j2-2

This will have to serve as a quick and dirty user's manual for the time being.

To create a new Model or Ontology, click the New button, and you will see something that looks like this:

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:owl="http://www.w3.org/2002/07/owl#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"

xmlns:xsd="http://www.w3.org/2001/XMLSchema#"

xmlns="http://FIXME/FIXME#"

xml:base="http://FIXME/FIXME#" >

</rdf:RDF>

What you see are some pre-installed namespaces that you can edit, but, more importantly, two which you must edit.  All that is followed by a space where you can use the mouse to place the cursor in the space (above </rdf:RDF>) and right click to see a menu of things you can add to the code. The menu looks like this:

j2-3
If you choose, say, owl:Class, the evolving code looks like this:

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:owl="http://www.w3.org/2002/07/owl#"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"

xmlns:xsd="http://www.w3.org/2001/XMLSchema#"

xmlns="http://foo.org/myont#"

xml:base="http://foo.org/myont#" >

<owl:Class rdf:ID=" ">

</owl:Class>

</rdf:RDF>

Notice that rdf:ID in the owl:Class is a blank space. Be sure to fill it in with an appropriate ID

When an ontology or model is created, there are two options.
  1. Save the model or ontology to a database
  2. Union the model or ontology into an existing model or ontology which is displayed in the left pane of the editor tabs.
That's pretty much it.

One last thing before you start.

This system uses a secondary database called jenaindex which you must create. I decided it was easier to just create two tables, one for indexing the names of Models and one for indexing the names of Ontologies.  Instructions for creating that database involve the following considerations.
  1. You need to select a database username and a password (optional no password).
  2. You must have MySQL installed. The JDBC jar file is included in the download.
  3. Copy the script jenaindex.sql to MYSQL_HOME\bin where you will boot MySQL
  4. In a console in MYSQL_HOME\bin  type "mysql -u root"
  5. then type  "create database jenaindex;"
  6. then type "grant all on jenaindex.* to <username>@localhost [identified by <password>]; where things in brackets are optional, the line must end with the semicolon, and <username> and <password> belong to you.
  7. then type "use jenaindex"
  8. then type "source jenaindex.sql"
  9. Notice that, in the batch file supplied (windows -- someone else will have to add a script for *nix boxes) you must supply the same username and password following the part of the line where the class org.nex.manager.Main is called.
(c) 2003 Jack Park