Sesame Triple Store

Sesame is an open source framework for storage, inferencing and querying of RDF data

  • check out this repository
  • cd customrulereasoner/trunk && mvn install
  • the it depends, how you're used to create your repositories
    console: put the customrulereasoner.jar into the according lib folder and use the following template:
    #
    # Sesame configuration template for a native RDF repository with
    # RDF Schema and Custom inferencing
    #
    @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
    @prefix rep: <http://www.openrdf.org/config/repository#>.
    @prefix sr: <http://www.openrdf.org/config/repository/sail#>.
    @prefix sail: <http://www.openrdf.org/config/sail#>.
    @prefix ns: <http://www.openrdf.org/config/sail/native#>.
    @prefix custom: <http://www.openrdf.org/config/sail/custom#>.
    @prefix ms: <http://www.openrdf.org/config/sail/memory#>.
    
    [] a rep:Repository ;
       rep:repositoryID "xpd-154-sesamenative" ;
       rdfs:label "CustomRuleReasoner-NATIVE" ;
       rep:repositoryImpl [
          rep:repositoryType "openrdf:SailRepository" ;
          sr:sailImpl [
             sail:sailType "openrdf:CustomRuleReasoner" ;
             sail:delegate [
                  sail:sailType "openrdf:NativeStore" ;
                  ns:tripleIndexes "spoc"
             ]
          ]
       ].
  • write some rules (see below for examples) into a file and import the file into the ruledef context, approximately like so:
    repcon.add(FileUtils.openInputStream(new File("/templates/rules-skos.ttl")),
        "",
        RDFFormat.TURTLE,
        new Resource[] { CustomRuleReasonerSchema.RULEDEF_CONTEXT }
    );
  • now just use the repository, easiest:
    LocalRepositoryManger LRM = new LocalRepositoryManager(new File("path/to/sesameroot/"));
    LRM.initialize();
    Repository rep = LRM.getRepository("mycustom");
    ...
  • you may run into the following problems:
    1. class not found: make sure the jar is in place
    2. unsupported sail type: make sure the factories are loaded
      • if problem occures in console: edit Console.java source code and enter the following line somewhere in the constructor or like this: SailRegistry.getInstance().add(new CustomRuleReasonerFactory());
      • if problem occurs in webapp or so, best is to write this line into a webappcontextlistener
      • if problem occurs in sesame-workbench (write a webappcontextlistener) and add to sesame-workbench's web.xml

Jakobitsch Juergen, tschyrgie@yahoo.com, www.turnguard.com

Maillist

RDMBS store

The details about Native store

The details about Elmo engine

2) See the complete discussion in maillist