You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Greg Albiston <an...@apache.org> on 2014/06/18 12:38:40 UTC
CMS diff: Jena Assembler howto
Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena.apache.org/documentation%2Fassembler%2Fassembler-howto.mdtext
Greg Albiston
Index: trunk/content/documentation/assembler/assembler-howto.mdtext
===================================================================
--- trunk/content/documentation/assembler/assembler-howto.mdtext (revision 1603331)
+++ trunk/content/documentation/assembler/assembler-howto.mdtext (working copy)
@@ -1,5 +1,8 @@
Title: Jena Assembler howto
+Added an example to the ReasonerFactory section showing how to add a custom reasoner and schema.
+These elements are included in the section but no example is given elsewhere on the page.
+
## Introduction
This document describes the vocabulary and effect of the built-in
@@ -389,6 +392,25 @@
come equipped with this method; for other factories, see the
documentation.
+##### Custom Reasoner with Schema
+
+The following adds a custom reasoner to an inference model backed by a TDB dataset. A schema is loaded from file into a memory model and added to the reasoner.
+Since ja:reasonerClass is being used the customer reasoner needs to be available on the Classpath of the application.
+
+ eg:custom-schema-example a ja:MemoryModel;
+ ja:content [
+ ja:externalContent <file:////path/to/my/schema.owl>
+ ]
+ .
+
+ eg:custom-reasoner-example a ja:InfModel ;
+ ja:baseModel eg:tdb-graph ;
+ ja:reasoner [
+ ja:reasonerClass "org.my.custom.package.CustomReasonerFactory";
+ ja:schema eg:custom-schema-example
+ ]
+ .
+
#### Rulesets
A `RuleSet` specification allows rules (for ReasonerFactories) to