BOR for Sesame-PRE2-release


Updating a Sesame distribution

As you already know, the 'official' version of BOR doesn't work on versions of Sesame since it's v0.95 release. That is because it uses the old sail API, which unfortunately was changed in v0.95 release. Also in all newer Sesame releases, the 'nl.aidministrator....' packages were renamed to 'org.openrdf...' so ... the old BOR woudn't work with them either. But you are lucky :-), because we got some free time these days and tweaked it a bit, so now we have a BOR version which works with the these new Sesame releases. It is tested with the latest Sesame taken as a fresh download from its http://sourceforge.net/projects/sesame site ('sesame-1.0-pre2-bin.tar.gz' distribution) and it works quite well.

The archive contains all the necessary files, which should be updated onto the folder of your current Sesame distribution/webapplication. Unpack the downloaded archive into the distribution folder(e.g where you already put the new Sesame release).

The archive contain:

Also do not forget to put your JDBC driver into the WEB-INF/lib folder and, of course, add your repository description to WEB-INF/system.conf, which should looks like:

	<repository id="sebor">            
		<title>SeBor</title>            
		<sailstack>                
			<sail class="com.ontotext.omm.bor.BorSail">                    
				<param name="daml.schema.url" value="http://localhost:8080/sesame/bor/2002/08/daml.fix.xml"/>                    
				<param name="bor.schema.url" value="http://localhost:8080/sesame/bor/2002/07/bor"/>                
			</sail>                
			<sail class="org.openrdf.sesame.sailimpl.rdbms.RdfSchemaRepository">                    
				<param name="jdbcDriver" value="org.gjt.mm.mysql.Driver"/>                    
				<param name="jdbcUrl" value="jdbc:mysql://localhost:3306/sebor"/>                    
				<param name="user" value="root"/>                    
				<param name="password" value=""/>                
			</sail>           
		</sailstack>            
		<!--Access Control List can contain zero or more 'user' elements-->            
		<acl worldReadable="true" worldWritable="true">                <
			user login="admin" readAccess="true" writeAccess="true"/>                
			<user login="sesame" readAccess="true" writeAccess="true"/>            
		</acl>        
	</repository>
	
check both URLs - "daml.schema.url" and "bor.schema.url" to point to the right locations onto your machine and also fix the "jdbcUrl" to point to the right database Also pay attention to the new class names - all Sesame packages begins with 'org.openrdf...' now.

A working example

Here is a short sketch, outlining the necessary steps, assuming that you already updated your Sesame distribution and the web application is now running:

Follow the initial URL:

  1. e.g. http://localhost:8080/sesame
  2. log-in (with 'localuserid'/'******') for example.
  3. Select '[SeBor repository]' and click on 'Go >>' button. On the second row of the top 'toolbar' frame should be visible a [ BOR Actions: Here... ], link, so be brave and - click on it.
  4. into the lower frame should appear 'BOR Actions' page where you can choose 'DAML+OIL import'
  5. put into the 'Source url' - http://localhost:8080/sesame/bor/demo/demo.daml.xml
    put into the 'Base url' - http://demo#
    and then click on 'import' button - a message 'Data imported' should appear, if all went fine of course, into result pane.
  6. once the data is imported, you may check '(Re)load tbox from repository' from the BOR actions menu to look on the resolved concepts

e.g. something like:

	(primitive-concept http://demo#Red)
	(primitive-concept http://demo#Wine)
	(define-concept http://demo#RedWine 
		(and http://demo#Red http://demo#Wine))
should appear.

You may execute a SeRQL query (click on SeRQL-S link from the toolbar) that will give you all the instances of class 'http://demo#Red', 'http://demo#Wine' and 'http://demo#RedWine' - here is an example query returning the instances of 'http://demo#Red' class

	select * from    
		{X} <rdf:type> {<demo:Red>}
	using namespace   
		demo = <!http://demo#>,   
		rdf = <!http://www.w3.org/1999/02/22-rdf-syntax-ns#>
which should give you an output as:
	http://demo#a-blood-drop
	http://demo#a-bottle-of-Merlot
the Wine class contain:
	http://demo#a-bottle-of-Chardonnay
	http://demo#a-bottle-of-Merlot
and finally the instances of RedWine:
	http://demo#a-bottle-of-Merlot

Further Support

We do not expect any difficulties, but ... who knows - so, do not hesitate and ask for further support.