You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2013/02/11 17:01:43 UTC
svn commit: r1444841 [1/6] - in /jena/trunk/jena-sdb/src-dev: dbtest/ dev/
java/ java/dbtest/ java/dev/ resources/ resources/etc/
resources/vocabularies/
Author: andy
Date: Mon Feb 11 16:01:41 2013
New Revision: 1444841
URL: http://svn.apache.org/r1444841
Log:
Tidy up dev support
Added:
jena/trunk/jena-sdb/src-dev/java/
jena/trunk/jena-sdb/src-dev/java/dbtest/
- copied from r1442541, jena/trunk/jena-sdb/src-dev/dbtest/
jena/trunk/jena-sdb/src-dev/java/dev/
- copied from r1442541, jena/trunk/jena-sdb/src-dev/dev/
jena/trunk/jena-sdb/src-dev/java/dev/Main.java
jena/trunk/jena-sdb/src-dev/resources/
jena/trunk/jena-sdb/src-dev/resources/etc/
jena/trunk/jena-sdb/src-dev/resources/etc/daml-micro.rules
jena/trunk/jena-sdb/src-dev/resources/etc/dig-daml-axioms.rdf
jena/trunk/jena-sdb/src-dev/resources/etc/dig-owl-axioms.rdf
jena/trunk/jena-sdb/src-dev/resources/etc/location-mapping.ex
jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy-test.rdf
jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy.rdf
jena/trunk/jena-sdb/src-dev/resources/etc/owl-b.rules
jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-micro.rules
jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-mini.rules
jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-old.rules
jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb.rules
jena/trunk/jena-sdb/src-dev/resources/etc/owl.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-b-tuned.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-b.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-fb-lp-expt.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-fb-tgc-noresource.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-fb-tgc-simple.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-fb-tgc.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-fb.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs-noresource.rules
jena/trunk/jena-sdb/src-dev/resources/etc/rdfs.rules
jena/trunk/jena-sdb/src-dev/resources/etc/schemagen_example.rdf
jena/trunk/jena-sdb/src-dev/resources/vocabularies/
jena/trunk/jena-sdb/src-dev/resources/vocabularies/assembler.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/daml+oil-2000-12.daml
jena/trunk/jena-sdb/src-dev/resources/vocabularies/daml+oil.daml
jena/trunk/jena-sdb/src-dev/resources/vocabularies/dublin-core_11.xml
jena/trunk/jena-sdb/src-dev/resources/vocabularies/dublin-core_terms.xml
jena/trunk/jena-sdb/src-dev/resources/vocabularies/dublin-core_types.xml
jena/trunk/jena-sdb/src-dev/resources/vocabularies/jena-model-spec.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/jenavocab.rdf
jena/trunk/jena-sdb/src-dev/resources/vocabularies/location-mapping-rdfs.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/ont-event.rdf
jena/trunk/jena-sdb/src-dev/resources/vocabularies/ont-manager.rdf
jena/trunk/jena-sdb/src-dev/resources/vocabularies/owl.owl
jena/trunk/jena-sdb/src-dev/resources/vocabularies/rdf-schema.rdf
jena/trunk/jena-sdb/src-dev/resources/vocabularies/result-set.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/test-manifest-x.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/test-manifest.n3
jena/trunk/jena-sdb/src-dev/resources/vocabularies/test-query.n3
Removed:
jena/trunk/jena-sdb/src-dev/dbtest/
jena/trunk/jena-sdb/src-dev/dev/
Added: jena/trunk/jena-sdb/src-dev/java/dev/Main.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/java/dev/Main.java?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/java/dev/Main.java (added)
+++ jena/trunk/jena-sdb/src-dev/java/dev/Main.java Mon Feb 11 16:01:41 2013
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package dev;
+
+import sdb.sdbquery ;
+
+public class Main
+{
+
+ public static void main(String[] args)
+ {
+ sdbquery.main("--sdb=sdb.ttl", "--set", "sdb:unionDefaultGraph=true", "SELECT * { ?s ?p ?o }") ;
+ //sdbquery.main("--sdb=sdb.ttl", "--set", "http://jena.hpl.hp.com/SDB/symbol#unionDefaultGraph=true", "SELECT * { ?s ?p ?o }") ;
+ }
+
+}
+
+
+
Added: jena/trunk/jena-sdb/src-dev/resources/etc/daml-micro.rules
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/daml-micro.rules?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/daml-micro.rules (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/daml-micro.rules Mon Feb 11 16:01:41 2013
@@ -0,0 +1,83 @@
+#------------------------------------------------------------------
+# Micro ruleset for DAML. This is just the core RDFS rules plus
+# the extensional rules for domain/range, plus some DAML axioms.
+# $Id: daml-micro.rules,v 1.7 2005-04-06 23:07:17 ian_dickinson Exp $
+#------------------------------------------------------------------
+
+#------------------------------------------------------------------
+# Tabling directives
+#------------------------------------------------------------------
+
+-> tableAll().
+
+#------------------------------------------------------------------
+# RDFS Closure rules
+#------------------------------------------------------------------
+
+[rdfs2: (?p rdfs:domain ?c) -> [(?x rdf:type ?c) <- (?x ?p ?y)] ]
+[rdfs3: (?p rdfs:range ?c) -> [(?y rdf:type ?c) <- (?x ?p ?y)] ]
+[rdfs5b: (?a rdf:type rdf:Property) -> (?a rdfs:subPropertyOf ?a)]
+[rdfs6: (?p rdfs:subPropertyOf ?q), notEqual(?p,?q) -> [ (?a ?q ?b) <- (?a ?p ?b)] ]
+[rdfs7: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]
+[rdfs10: (?x rdf:type rdfs:ContainerMembershipProperty) -> (?x rdfs:subPropertyOf rdfs:member)]
+
+[rdfs2-partial: (?p rdfs:domain ?c) -> (?c rdf:type rdfs:Class)]
+[rdfs3-partial: (?p rdfs:range ?c) -> (?c rdf:type rdfs:Class)]
+
+# Either version should work, pure back one scales better.
+# rdfs9: (?x rdfs:subClassOf ?y) -> [ (?a rdf:type ?y) <- (?a rdf:type ?x)] ]
+[rdfs9-alt: (?a rdf:type ?y) <- (?x rdfs:subClassOf ?y), (?a rdf:type ?x) ]
+
+# Not needed - replaced by TGC front end
+#[rdfs8: (?a rdfs:subClassOf ?b), (?b rdfs:subClassOf ?c) -> (?a rdfs:subClassOf ?c)]
+#[rdfs5a: (?a rdfs:subPropertyOf ?b), (?b rdfs:subPropertyOf ?c) -> (?a rdfs:subPropertyOf ?c)]
+
+
+#------------------------------------------------------------------
+# RDFS iff extensions needed for OWL
+#------------------------------------------------------------------
+
+[rdfs2a: (?x rdfs:domain ?y), (?y rdfs:subClassOf ?z) -> (?x rdfs:domain ?z)]
+[rdfs3a: (?x rdfs:range ?y), (?y rdfs:subClassOf ?z) -> (?x rdfs:range ?z)]
+
+#------------------------------------------------------------------
+# Some useful daml axioms
+#------------------------------------------------------------------
+
+-> (daml:subPropertyOf rdfs:subPropertyOf rdfs:subPropertyOf).
+-> (rdfs:subPropertyOf rdfs:subPropertyOf daml:subPropertyOf).
+
+-> (daml:subClassOf rdfs:subPropertyOf rdfs:subClassOf).
+-> (rdfs:subClassOf rdfs:subPropertyOf daml:subClassOf).
+
+-> (daml:type rdfs:subPropertyOf rdf:type).
+-> (rdf:type rdfs:subPropertyOf daml:type).
+
+-> (daml:value rdfs:subPropertyOf rdf:value).
+-> (rdf:value rdfs:subPropertyOf daml:value).
+
+-> (daml:domain rdfs:subPropertyOf rdfs:domain).
+-> (rdfs:domain rdfs:subPropertyOf daml:domain).
+
+-> (daml:range rdfs:subPropertyOf rdfs:range).
+-> (rdfs:range rdfs:subPropertyOf daml:range).
+
+-> (daml:label rdfs:subPropertyOf rdfs:label).
+-> (rdfs:label rdfs:subPropertyOf daml:label).
+
+-> (daml:comment rdfs:subPropertyOf rdfs:comment).
+-> (rdfs:comment rdfs:subPropertyOf daml:comment).
+
+-> (daml:Literal rdfs:subClassOf rdfs:Literal).
+-> (rdfs:Literal rdfs:subClassOf daml:Literal).
+
+-> (daml:Property rdfs:subClassOf rdf:Property).
+-> (rdf:Property rdfs:subClassOf daml:Property).
+
+-> (daml:ObjectProperty rdfs:subClassOf rdf:Property).
+-> (daml:DatatypeProperty rdfs:subClassOf rdf:Property).
+
+# need this rule so that improved individual detection code works with DAML sources
+# [thing1: (?x rdf:type ?C), (?C rdf:type daml:Class) -> (?x rdf:type daml:Thing)]
+[thing1: (?C rdf:type daml:Class) -> (?C rdfs:subClassOf daml:Thing)]
+-> (daml:Thing rdf:type daml:Class).
Added: jena/trunk/jena-sdb/src-dev/resources/etc/dig-daml-axioms.rdf
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/dig-daml-axioms.rdf?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/dig-daml-axioms.rdf (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/dig-daml-axioms.rdf Mon Feb 11 16:01:41 2013
@@ -0,0 +1,355 @@
+<!-- $Revision 1.7 $ of $Date 2001/06/06 01:38:21 $. -->
+
+<rdf:RDF
+ xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
+ xmlns ="http://www.daml.org/2001/03/daml+oil#"
+ xml:base ="http://www.daml.org/2001/03/daml+oil"
+>
+
+<!-- (meta) classes of "object" and datatype classes -->
+
+<rdfs:Class rdf:ID="Class">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="Datatype">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdfs:Class>
+
+<!-- Pre-defined top/bottom thing/nothing most/least-general (object) classes. -->
+
+<Class rdf:ID="Thing">
+ <unionOf rdf:parseType="daml:collection">
+ <rdfs:Class rdf:about="#Nothing"/>
+ <rdfs:Class>
+ <complementOf rdf:resource="#Nothing"/>
+ </rdfs:Class>
+ </unionOf>
+</Class>
+
+<Class rdf:ID="Nothing">
+ <rdfs:label>Nothing</rdfs:label>
+ <rdfs:comment>the class with no things in it.</rdfs:comment>
+ <complementOf rdf:resource="#Thing"/>
+</Class>
+
+<!-- Terms for building classes from other classes. -->
+
+<Property rdf:ID="equivalentTo"> <!-- equals? equiv? renames? -->
+ <rdfs:label>equivalentTo</rdfs:label>
+</Property>
+
+<Property rdf:ID="sameClassAs">
+ <rdfs:subPropertyOf rdf:resource="#equivalentTo"/>
+ <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#subClassOf"/>
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</Property>
+
+<Property rdf:ID="samePropertyAs">
+ <rdfs:subPropertyOf rdf:resource="#equivalentTo"/>
+ <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#subPropertyOf"/>
+</Property>
+
+<Property rdf:ID="sameIndividualAs">
+ <rdfs:subPropertyOf rdf:resource="#equivalentTo"/>
+ <rdfs:domain rdf:resource="#Thing"/>
+ <rdfs:range rdf:resource="#Thing"/>
+</Property>
+
+<rdf:Property rdf:ID="disjointWith">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</rdf:Property>
+
+<Property rdf:ID="differentIndividualFrom">
+ <rdfs:domain rdf:resource="#Thing"/>
+ <rdfs:range rdf:resource="#Thing"/>
+</Property>
+
+
+<!-- NOTE: the Disjoint class has been deleted: use disjointWith -->
+<!-- or disjointUnionOf instead. -->
+
+<rdf:Property rdf:ID="unionOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="disjointUnionOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="intersectionOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="complementOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</rdf:Property>
+
+<!-- Term for building classes by enumerating their elements -->
+
+<rdf:Property rdf:ID="oneOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#List"/>
+</rdf:Property>
+
+<!-- Terms for building classes by restricting their properties. -->
+
+<rdfs:Class rdf:ID="Restriction">
+ <rdfs:subClassOf rdf:resource="#Class"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="onProperty">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="toClass">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="hasValue">
+ <rdfs:domain rdf:resource="#Restriction"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="hasClass">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdf:Property>
+
+<!-- Note that cardinality restrictions on transitive properties, or -->
+<!-- properties with transitive sub-properties, compromise decidability. -->
+
+<rdf:Property rdf:ID="minCardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="maxCardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="cardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="hasClassQ">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="minCardinalityQ">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="maxCardinalityQ">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="cardinalityQ">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/10/XMLSchema#nonNegativeInteger"/>
+</rdf:Property>
+
+<!-- Classes and Properties for different kinds of Property -->
+
+<rdfs:Class rdf:ID="ObjectProperty">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="DatatypeProperty">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="inverseOf">
+ <rdfs:domain rdf:resource="#ObjectProperty"/>
+ <rdfs:range rdf:resource="#ObjectProperty"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="TransitiveProperty">
+ <rdfs:subClassOf rdf:resource="#ObjectProperty"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="UniqueProperty">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="UnambiguousProperty">
+ <rdfs:subClassOf rdf:resource="#ObjectProperty"/>
+</rdfs:Class>
+
+<!-- List terminology. -->
+
+<rdfs:Class rdf:ID="List">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/>
+</rdfs:Class>
+
+<List rdf:ID="nil">
+</List>
+
+<rdf:Property rdf:ID="first">
+ <rdfs:domain rdf:resource="#List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="rest">
+ <rdfs:domain rdf:resource="#List"/>
+ <rdfs:range rdf:resource="#List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="item">
+ <rdfs:domain rdf:resource="#List"/>
+</rdf:Property>
+
+<!-- A class for ontologies themselves... -->
+
+<rdfs:Class rdf:ID="Ontology">
+</rdfs:Class>
+
+<rdf:Property rdf:ID="versionInfo">
+</rdf:Property>
+
+<!-- Importing, i.e. assertion by reference -->
+
+<rdf:Property rdf:ID="imports">
+</rdf:Property>
+
+<!-- Importing terms from RDF/RDFS -->
+
+<!-- first, assert the contents of the RDF schema by reference -->
+<!--Ontology rdf:about="">
+ <imports rdf:resource="http://www.w3.org/2000/01/rdf-schema"/>
+</Ontology-->
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Resource">
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Class">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#subClassOf">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#subPropertyOf">
+ <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#comment">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#label">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#domain">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#range">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#seeAlso">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#isDefinedBy">
+ <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Literal">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Container">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#member">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Datatype">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdfs:Class>
+
+
+<rdf:Property rdf:ID="subPropertyOf">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#subPropertyOf"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="Literal">
+ <sameClassAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="Property">
+ <sameClassAs rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="type">
+ <samePropertyAs rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="value">
+ <samePropertyAs rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#value"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="subClassOf">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#subClassOf"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="domain">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#domain"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="range">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#range"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="label">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="comment">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#comment"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="seeAlso">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="isDefinedBy">
+ <samePropertyAs rdf:resource="http://www.w3.org/2000/01/rdf-schema#isDefinedBy"/>
+ <rdfs:subPropertyOf rdf:resource="#seeAlso"/>
+</rdf:Property>
+
+</rdf:RDF>
+
Added: jena/trunk/jena-sdb/src-dev/resources/etc/dig-owl-axioms.rdf
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/dig-owl-axioms.rdf?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/dig-owl-axioms.rdf (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/dig-owl-axioms.rdf Mon Feb 11 16:01:41 2013
@@ -0,0 +1,328 @@
+<?xml version="1.0"?>
+<!DOCTYPE rdf:RDF [
+ <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
+ <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
+ <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
+ <!ENTITY owl "http://www.w3.org/2002/07/owl#" >
+ ]>
+
+<rdf:RDF
+ xmlns ="&owl;"
+ xmlns:owl ="&owl;"
+ xml:base ="http://www.w3.org/2002/07/owl"
+ xmlns:rdf ="&rdf;"
+ xmlns:rdfs="&rdfs;"
+>
+
+<!--Ontology rdf:about="">
+ <imports rdf:resource="http://www.w3.org/2000/01/rdf-schema"/>
+ <rdfs:isDefinedBy rdf:resource="http://www.w3.org/TR/2004/REC-owl-semantics-20040210/" />
+ <rdfs:isDefinedBy rdf:resource="http://www.w3.org/TR/2004/REC-owl-test-20040210/" />
+ <rdfs:isDefinedBy rdf:resource="http://www.w3.org/TR/2004/REC-owl-features-20040210/" />
+ <rdfs:comment>This file specifies in RDF Schema format the
+ built-in classes and properties that together form the basis of
+ the RDF/XML syntax of OWL Full, OWL DL and OWL Lite.
+ We do not expect people to import this file
+ explicitly into their ontology. People that do import this file
+ should expect their ontology to be an OWL Full ontology.
+ </rdfs:comment>
+ <versionInfo>10 February 2004</versionInfo>
+</Ontology-->
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Resource">
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Class">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#subClassOf">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#subPropertyOf">
+ <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#comment">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#label">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#domain">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#range">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#seeAlso">
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#isDefinedBy">
+ <rdfs:subPropertyOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#seeAlso"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Literal">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Container">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#ContainerMembershipProperty">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:about="http://www.w3.org/2000/01/rdf-schema#member">
+ <rdfs:domain rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+ <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/>
+</rdf:Property>
+
+<rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Datatype">
+ <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>
+</rdfs:Class>
+
+
+
+<rdfs:Class rdf:ID="Class">
+ <rdfs:subClassOf rdf:resource="&rdfs;Class"/>
+</rdfs:Class>
+
+<Class rdf:ID="Thing">
+ <unionOf rdf:parseType="Collection">
+ <Class rdf:about="#Nothing"/>
+ <Class>
+ <complementOf rdf:resource="#Nothing"/>
+ </Class>
+ </unionOf>
+</Class>
+
+<Class rdf:ID="Nothing">
+ <complementOf rdf:resource="#Thing"/>
+</Class>
+
+<rdf:Property rdf:ID="equivalentClass">
+ <rdfs:subPropertyOf rdf:resource="&rdfs;subClassOf"/>
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="disjointWith">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="equivalentProperty">
+ <rdfs:subPropertyOf rdf:resource="&rdfs;subPropertyOf"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="sameAs">
+ <rdfs:domain rdf:resource="#Thing"/>
+ <rdfs:range rdf:resource="#Thing"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="differentFrom">
+ <rdfs:domain rdf:resource="#Thing"/>
+ <rdfs:range rdf:resource="#Thing"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="AllDifferent">
+</rdfs:Class>
+
+<rdf:Property rdf:ID="distinctMembers">
+ <rdfs:domain rdf:resource="#AllDifferent"/>
+ <rdfs:range rdf:resource="&rdf;List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="unionOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="&rdf;List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="intersectionOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="&rdf;List"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="complementOf">
+ <rdfs:domain rdf:resource="#Class"/>
+ <rdfs:range rdf:resource="#Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="oneOf">
+ <rdfs:domain rdf:resource="&rdfs;Class"/>
+ <rdfs:range rdf:resource="&rdf;List"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="Restriction">
+ <rdfs:subClassOf rdf:resource="#Class"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="onProperty">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&rdf;Property"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="allValuesFrom">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&rdfs;Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="hasValue">
+ <rdfs:domain rdf:resource="#Restriction"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="someValuesFrom">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&rdfs;Class"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="minCardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="maxCardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="cardinality">
+ <rdfs:domain rdf:resource="#Restriction"/>
+ <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="ObjectProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="DatatypeProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="inverseOf">
+ <rdfs:domain rdf:resource="#ObjectProperty"/>
+ <rdfs:range rdf:resource="#ObjectProperty"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="TransitiveProperty">
+ <rdfs:subClassOf rdf:resource="#ObjectProperty"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="SymmetricProperty">
+ <rdfs:subClassOf rdf:resource="#ObjectProperty"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="FunctionalProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="InverseFunctionalProperty">
+ <rdfs:subClassOf rdf:resource="&owl;ObjectProperty"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="AnnotationProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<AnnotationProperty rdf:about="&rdfs;label"/>
+<AnnotationProperty rdf:about="&rdfs;comment"/>
+<AnnotationProperty rdf:about="&rdfs;seeAlso"/>
+<AnnotationProperty rdf:about="&rdfs;isDefinedBy"/>
+
+<rdfs:Class rdf:ID="Ontology">
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="OntologyProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<rdf:Property rdf:ID="imports">
+ <rdf:type rdf:resource="#OntologyProperty"/>
+ <rdfs:domain rdf:resource="#Ontology"/>
+ <rdfs:range rdf:resource="#Ontology"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="versionInfo">
+ <rdf:type rdf:resource="#AnnotationProperty"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="priorVersion">
+ <rdf:type rdf:resource="#OntologyProperty"/>
+ <rdfs:domain rdf:resource="#Ontology"/>
+ <rdfs:range rdf:resource="#Ontology"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="backwardCompatibleWith">
+ <rdf:type rdf:resource="#OntologyProperty"/>
+ <rdfs:domain rdf:resource="#Ontology"/>
+ <rdfs:range rdf:resource="#Ontology"/>
+</rdf:Property>
+
+<rdf:Property rdf:ID="incompatibleWith">
+ <rdf:type rdf:resource="#OntologyProperty"/>
+ <rdfs:domain rdf:resource="#Ontology"/>
+ <rdfs:range rdf:resource="#Ontology"/>
+</rdf:Property>
+
+<rdfs:Class rdf:ID="DeprecatedClass">
+ <rdfs:subClassOf rdf:resource="&rdfs;Class"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="DeprecatedProperty">
+ <rdfs:subClassOf rdf:resource="&rdf;Property"/>
+</rdfs:Class>
+
+<rdfs:Class rdf:ID="DataRange">
+</rdfs:Class>
+
+<rdfs:Datatype rdf:about="&xsd;float" />
+<rdfs:Datatype rdf:about="&xsd;double" />
+<rdfs:Datatype rdf:about="&xsd;int" />
+<rdfs:Datatype rdf:about="&xsd;long" />
+<rdfs:Datatype rdf:about="&xsd;short" />
+<rdfs:Datatype rdf:about="&xsd;byte" />
+<rdfs:Datatype rdf:about="&xsd;unsignedByte" />
+<rdfs:Datatype rdf:about="&xsd;unsignedShort" />
+<rdfs:Datatype rdf:about="&xsd;unsignedInt" />
+<rdfs:Datatype rdf:about="&xsd;unsignedLong" />
+<rdfs:Datatype rdf:about="&xsd;decimal" />
+<rdfs:Datatype rdf:about="&xsd;integer" />
+<rdfs:Datatype rdf:about="&xsd;nonPositiveInteger" />
+<rdfs:Datatype rdf:about="&xsd;nonNegativeInteger" />
+<rdfs:Datatype rdf:about="&xsd;positiveInteger" />
+<rdfs:Datatype rdf:about="&xsd;negativeInteger" />
+<rdfs:Datatype rdf:about="&xsd;boolean" />
+<rdfs:Datatype rdf:about="&xsd;string" />
+<rdfs:Datatype rdf:about="&xsd;anyURI" />
+<rdfs:Datatype rdf:about="&xsd;hexBinary" />
+<rdfs:Datatype rdf:about="&xsd;base64Binary " />
+<rdfs:Datatype rdf:about="&xsd;date" />
+<rdfs:Datatype rdf:about="&xsd;time" />
+<rdfs:Datatype rdf:about="&xsd;dateTime" />
+<rdfs:Datatype rdf:about="&xsd;duration" />
+<rdfs:Datatype rdf:about="&xsd;gDay" />
+<rdfs:Datatype rdf:about="&xsd;gMonth" />
+<rdfs:Datatype rdf:about="&xsd;gYear" />
+<rdfs:Datatype rdf:about="&xsd;gYearMonth" />
+<rdfs:Datatype rdf:about="&xsd;gMonthDay" />
+
+</rdf:RDF>
+
+
Added: jena/trunk/jena-sdb/src-dev/resources/etc/location-mapping.ex
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/location-mapping.ex?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/location-mapping.ex (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/location-mapping.ex Mon Feb 11 16:01:41 2013
@@ -0,0 +1,47 @@
+## EXAMPLE
+
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix lm: <http://jena.hpl.hp.com/2004/08/location-mapping#> .
+
+# Application location to alternative location mappings.
+#
+# + Order does not matter.
+# + The location mapping parser looks for lm:mapping properties
+# and uses the object value so this can be written in several different styles.
+#
+# The translation algorithm is:
+#
+# 1 - Exact mappings: these are tried before attempting a prefix match.
+# 2 - By prefix: find the longest matching prefix
+# 3 - Use the original if no alternative.
+
+# Use N3's , (multiple objects => multiple statements of same subject and predicate)
+# Note the commas
+
+## -- Example 1
+
+[] lm:mapping
+ [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] ,
+ [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] ,
+ [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ] ,
+ .
+
+## -- Example 2
+
+# This is exactly the same graph using the ; syntax of N3
+# Multiple statements with the same subject - and we used the same predicate.
+
+## [] lm:mapping [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] ;
+## lm:mapping [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] ;
+## lm:mapping [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ] ;
+## .
+
+## -- Example 3
+
+# Different graph - same effect. The fact there are different subjects is immaterial.
+
+## [] lm:mapping [ lm:name "file:foo.n3" ; lm:altName "file:etc/foo.n3" ] .
+## [] lm:mapping [ lm:prefix "file:etc/" ; lm:altPrefix "file:ETC/" ] .
+## [] lm:mapping [ lm:name "file:etc/foo.n3" ; lm:altName "file:DIR/foo.n3" ] .
Added: jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy-test.rdf
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy-test.rdf?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy-test.rdf (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy-test.rdf Mon Feb 11 16:01:41 2013
@@ -0,0 +1,58 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE rdf:RDF [
+ <!ENTITY jena 'http://jena.hpl.hp.com/schemas/'>
+
+ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
+ <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
+ <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
+ <!ENTITY base '&jena;2003/03/ont-manager'>
+ <!ENTITY ont '&base;#'>
+]>
+
+<rdf:RDF
+ xmlns:rdf ="&rdf;"
+ xmlns:rdfs="&rdfs;"
+ xmlns ="&ont;"
+ xml:base ="&base;"
+>
+
+<!--
+ An augmented set of mappings for locally cached ontologies, used in the test scripts
+
+ Author: Ian Dickinson, mailto:ian_dickinson@users.sourceforge.net
+ CVS: $Id: ont-policy.rdf,v 1.5 2003/11/06 17:37:24 ian_dickinson Exp $
+-->
+
+<DocumentManagerPolicy>
+ <!-- policy for controlling the document manager's behaviour -->
+ <processImports rdf:datatype="&xsd;boolean">true</processImports>
+ <cacheModels rdf:datatype="&xsd;boolean">true</cacheModels>
+</DocumentManagerPolicy>
+
+
+<OntologySpec>
+ <!-- local version of the OWL language ontology (in OWL) -->
+ <publicURI rdf:resource="http://www.w3.org/2002/07/owl" />
+ <altURL rdf:resource="file:vocabularies/owl.owl" />
+ <language rdf:resource="http://www.w3.org/2002/07/owl#" />
+ <prefix rdf:datatype="&xsd;string">owl</prefix>
+</OntologySpec>
+
+<OntologySpec>
+ <!-- local version of the RDFS vocabulary -->
+ <publicURI rdf:resource="http://www.w3.org/2000/01/rdf-schema" />
+ <altURL rdf:resource="file:vocabularies/rdf-schema.rdf" />
+ <language rdf:resource="http://www.w3.org/2000/01/rdf-schema#" />
+ <prefix rdf:datatype="&xsd;string">rdfs</prefix>
+</OntologySpec>
+
+<OntologySpec>
+ <publicURI rdf:resource="http://www.daml.org/2001/03/daml+oil" />
+ <altURL rdf:resource="file:vocabularies/daml+oil.daml" />
+ <language rdf:resource="http://www.daml.org/2001/03/daml+oil#" />
+ <prefix rdf:datatype="&xsd;string">daml</prefix>
+</OntologySpec>
+
+
+</rdf:RDF>
Added: jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy.rdf
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy.rdf?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy.rdf (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/ont-policy.rdf Mon Feb 11 16:01:41 2013
@@ -0,0 +1,64 @@
+<?xml version='1.0'?>
+
+<!DOCTYPE rdf:RDF [
+ <!ENTITY jena 'http://jena.hpl.hp.com/schemas/'>
+
+ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
+ <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
+ <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#'>
+ <!ENTITY base '&jena;2003/03/ont-manager'>
+ <!ENTITY ont '&base;#'>
+]>
+
+<rdf:RDF
+ xmlns:rdf ="&rdf;"
+ xmlns:rdfs="&rdfs;"
+ xmlns ="&ont;"
+ xml:base ="&base;"
+>
+
+<!--
+ The default set of mappings for locally cached ontologies
+
+ Author: Ian Dickinson, mailto:ian_dickinson@users.sourceforge.net
+ CVS: $Id: ont-policy.rdf,v 1.8 2009-10-06 13:04:42 ian_dickinson Exp $
+-->
+
+<DocumentManagerPolicy>
+ <!-- policy for controlling the document manager's behaviour -->
+ <processImports rdf:datatype="&xsd;boolean">true</processImports>
+ <cacheModels rdf:datatype="&xsd;boolean">true</cacheModels>
+</DocumentManagerPolicy>
+
+
+<OntologySpec>
+ <!-- local version of the OWL language ontology (in OWL) -->
+ <publicURI rdf:resource="http://www.w3.org/2002/07/owl" />
+ <!-- uncomment the following line to re-direct attempts to http get the file
+ <altURL rdf:resource="file:vocabularies/owl.owl" /-->
+ <language rdf:resource="http://www.w3.org/2002/07/owl" />
+ <prefix rdf:datatype="&xsd;string">owl</prefix>
+</OntologySpec>
+
+<OntologySpec>
+ <!-- local version of the RDFS vocabulary -->
+ <publicURI rdf:resource="http://www.w3.org/2000/01/rdf-schema" />
+ <!-- uncomment the following line to re-direct attempts to http get the file
+ <altURL rdf:resource="file:vocabularies/rdf-schema.rdf" /-->
+ <language rdf:resource="http://www.w3.org/2000/01/rdf-schema" />
+ <prefix rdf:datatype="&xsd;string">rdfs</prefix>
+</OntologySpec>
+
+<!-- Removed as a default entry from Jena 2.6 onwards
+<OntologySpec>
+ <!- - local version of the DAML vocabulary - ->
+ <publicURI rdf:resource="http://www.daml.org/2001/03/daml+oil" />
+ <!- - uncomment the following line to re-direct attempts to http get the file
+ <altURL rdf:resource="file:vocabularies/daml+oil.daml" /- ->
+ <language rdf:resource="http://www.daml.org/2001/03/daml+oil" />
+ <prefix rdf:datatype="&xsd;string">daml</prefix>
+</OntologySpec>
+-->
+
+
+</rdf:RDF>
Added: jena/trunk/jena-sdb/src-dev/resources/etc/owl-b.rules
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/owl-b.rules?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/owl-b.rules (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/owl-b.rules Mon Feb 11 16:01:41 2013
@@ -0,0 +1,306 @@
+#------------------------------------------------------------------
+# OWL rule set v0.1
+# This rule set is design to implement owl(f)lite using pure
+# tabled backward chaining. It is experimental and not fully debugged.
+# $Id: owl-b.rules,v 1.7 2004-07-02 08:08:21 der Exp $
+#------------------------------------------------------------------
+
+#------------------------------------------------------------------
+# RDFS Axioms
+#------------------------------------------------------------------
+
+-> (rdf:type rdfs:range rdfs:Class).
+-> (rdfs:Resource rdf:type rdfs:Class).
+-> (rdfs:Literal rdf:type rdfs:Class).
+-> (rdf:Statement rdf:type rdfs:Class).
+-> (rdf:nil rdf:type rdf:List).
+-> (rdf:subject rdf:type rdf:Property).
+-> (rdf:object rdf:type rdf:Property).
+-> (rdf:predicate rdf:type rdf:Property).
+-> (rdf:first rdf:type rdf:Property).
+-> (rdf:rest rdf:type rdf:Property).
+
+-> (rdfs:subPropertyOf rdfs:domain rdf:Property).
+-> (rdfs:subClassOf rdfs:domain rdfs:Class).
+-> (rdfs:domain rdfs:domain rdf:Property).
+-> (rdfs:range rdfs:domain rdf:Property).
+-> (rdf:subject rdfs:domain rdf:Statement).
+-> (rdf:predicate rdfs:domain rdf:Statement).
+-> (rdf:object rdfs:domain rdf:Statement).
+-> (rdf:first rdfs:domain rdf:List).
+-> (rdf:rest rdfs:domain rdf:List).
+
+-> (rdfs:subPropertyOf rdfs:range rdf:Property).
+-> (rdfs:subClassOf rdfs:range rdfs:Class).
+-> (rdfs:domain rdfs:range rdfs:Class).
+-> (rdfs:range rdfs:range rdfs:Class).
+-> (rdf:type rdfs:range rdfs:Class).
+-> (rdfs:comment rdfs:range rdfs:Literal).
+-> (rdfs:label rdfs:range rdfs:Literal).
+-> (rdf:rest rdfs:range rdf:List).
+
+-> (rdf:Alt rdfs:subClassOf rdfs:Container).
+-> (rdf:Bag rdfs:subClassOf rdfs:Container).
+-> (rdf:Seq rdfs:subClassOf rdfs:Container).
+-> (rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property).
+
+-> (rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso).
+
+-> (rdf:XMLLiteral rdf:type rdfs:Datatype).
+-> (rdfs:Datatype rdfs:subClassOf rdfs:Class).
+
+#------------------------------------------------------------------
+# RDFS Closure rules
+#------------------------------------------------------------------
+
+# This one could be omitted since the results are not really very interesting!
+#[rdf1: (?x ?p ?y) -> (?x rdf:type rdfs:Resource)]
+#[rdf1b: (?x ?p ?y), notLiteral(?y) -> (?y rdf:type rdfs:Resource)]
+#[rdf4: (?x ?p ?y) -> (?p rdf:type rdf:Property)]
+#[rdfs7b: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf rdfs:Resource)]
+
+
+[rdfs2: bound(?c) (?p rdfs:domain ?c) (?x ?p ?y) -> (?x rdf:type ?c)]
+[rdfs2: unbound(?c) (?x ?p ?y), (?p rdfs:domain ?c) -> (?x rdf:type ?c)]
+
+[rdfs3: bound(?c) (?p rdfs:range ?c) (?x ?p ?y) -> (?y rdf:type ?c)]
+[rdfs3: unbound(?c) (?x ?p ?y), (?p rdfs:range ?c) -> (?y rdf:type ?c)]
+
+[rdfs5a: unbound(?c) (?a rdfs:subPropertyOf ?b), (?b rdfs:subPropertyOf ?c) -> (?a rdfs:subPropertyOf ?c)]
+[rdfs5a: bound(?c) (?b rdfs:subPropertyOf ?c) (?a rdfs:subPropertyOf ?b)-> (?a rdfs:subPropertyOf ?c)]
+
+[rdfs5b: (?a rdf:type rdf:Property) -> (?a rdfs:subPropertyOf ?a)]
+
+[rdfs6: unbound(?q) (?a ?p ?b) (?p rdfs:subPropertyOf ?q) -> (?a ?q ?b)]
+[rdfs6: bound(?q) (?p rdfs:subPropertyOf ?q) (?a ?p ?b) -> (?a ?q ?b)]
+
+[rdfs7: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]
+
+[rdfs8: unbound(?c) (?a rdfs:subClassOf ?b) (?b rdfs:subClassOf ?c) -> (?a rdfs:subClassOf ?c)]
+[rdfs8: bound(?c) (?b rdfs:subClassOf ?c) (?a rdfs:subClassOf ?b) -> (?a rdfs:subClassOf ?c)]
+
+[rdfs9: bound(?y) (?x rdfs:subClassOf ?y) (?a rdf:type ?x) -> (?a rdf:type ?y)]
+[rdfs9: unbound(?y) (?a rdf:type ?x) (?x rdfs:subClassOf ?y) -> (?a rdf:type ?y)]
+
+[rdfs10: (?x rdf:type rdfs:ContainerMembershipProperty) -> (?x rdfs:subPropertyOf rdfs:member)]
+
+#------------------------------------------------------------------
+# RDFS iff extensions needed for OWL
+#------------------------------------------------------------------
+[rdfs2a: (?x rdfs:domain ?y), (?y rdfs:subClassOf ?z) -> (?x rdfs:domain ?z)]
+[rdfs3a: (?x rdfs:range ?y), (?y rdfs:subClassOf ?z) -> (?x rdfs:range ?z)]
+
+#------------------------------------------------------------------
+# OWL axioms
+#------------------------------------------------------------------
+
+-> (rdf:first rdf:type owl:FunctionalProperty).
+-> (rdf:rest rdf:type owl:FunctionalProperty).
+
+-> (rdfs:domain owl:SymmetricProperty owl:ObjectProperty).
+-> (rdfs:domain owl:TransitiveProperty owl:ObjectProperty).
+-> (rdfs:domain owl:InverseFunctionalProperty owl:ObjectProperty).
+
+-> (rdfs:range owl:ObjectProperty owl:Thing).
+-> (rdfs:domain owl:ObjectProperty owl:Thing).
+
+-> (owl:Class rdfs:subClassOf rdfs:Class).
+-> (owl:Restriction rdfs:subClassOf owl:Class).
+
+# Omitted since this owl:Class is likelty to die anyway.
+#-> (rdfs:Class rdfs:subClassOf owl:Class).
+
+-> (owl:Thing rdf:type owl:Class).
+
+# These might need to be pre-expanded in the initial rule set
+-> (owl:equivalentProperty rdf:type owl:SymmetricProperty).
+-> (owl:equivalentProperty rdf:type owl:TransitiveProperty).
+-> (owl:equivalentClass rdf:type owl:SymmetricProperty).
+-> (owl:equivalentClass rdf:type owl:TransitiveProperty).
+-> (owl:sameIndividualAs rdf:type owl:SymmetricProperty).
+-> (owl:sameIndividualAs rdf:type owl:TransitiveProperty).
+-> (owl:sameIndividualAs owl:equivalentProperty owl:sameAs).
+-> (owl:differentFrom rdf:type owl:SymmetricProperty).
+
+-> (owl:intersectionOf rdfs:domain owl:Class).
+
+#------------------------------------------------------------------
+# OWL Rules
+#------------------------------------------------------------------
+
+#------------------------------------------------------------------
+# Class rules
+# (Note: compiling intersectionOf to an n+1 rule set is done procedurally)
+#------------------------------------------------------------------
+
+# Identify restriction assertions
+
+[restriction1: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:someValuesFrom ?D)
+ -> (?C owl:equivalentClass some(?P, ?D))]
+
+[restriction2: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:allValuesFrom ?D)
+ -> (?C owl:equivalentClass all(?P, ?D))]
+
+[restriction3: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:minCardinality ?X)
+ -> (?C owl:equivalentClass min(?P, ?X))]
+
+[restriction4: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:maxCardinality ?X)
+ -> (?C owl:equivalentClass max(?P, ?X))]
+
+[restriction5: (?C rdf:type owl:Restriction), (?C owl:onProperty ?P), (?C owl:cardinality ?X)
+ -> (?C owl:equivalentClass card(?P, ?X)),
+ (?C rdfs:subClassOf min(?P, ?X)),
+ (?C rdfs:subClassOf max(?P, ?X)) ]
+
+[restriction6: (?C rdfs:subClassOf min(?P, ?X)), (?C rdfs:subClassOf max(?P, ?X))
+ -> (?C rdfs:subClassOf card(?P, ?X))]
+
+# Needed for the case where ?R is a restriction literal and so does not appear in the subject position
+
+[restrictionSubclass1: bound(?D) (?D owl:equivalentClass ?R), isFunctor(?R),
+ (?X rdf:type ?R)-> (?X rdf:type ?D)]
+
+[restrictionSubclass1: unbound(?D) (?X rdf:type ?R), isFunctor(?R),
+ (?D owl:equivalentClass ?R) -> (?X rdf:type ?D)]
+
+[restrictionSubclass2: bound(?R), isFunctor(?R), (?D owl:equivalentClass ?R),
+ (?X rdf:type ?D) -> (?X rdf:type ?R)]
+
+[restrictionSubclass2: unbound(?R), (?X rdf:type ?D), (?D owl:equivalentClass ?R),
+ isFunctor(?R) -> (?X rdf:type ?R)]
+
+# Interactions between cardinalities and some/all
+
+[restrictionProc1: (?X rdf:type, max(?P, 1)), (?X, rdf:type, some(?P, ?C))
+ -> (?X rdf:type all(?P, ?C))]
+
+[restrictionProc2a: unbound(?X), (?P rdf:type owl:FunctionalProperty), (?X, rdf:type, some(?P, ?C))
+ -> (?X rdf:type all(?P, ?C))]
+
+[restrictionProc2b: bound(?X),(?X, rdf:type, some(?P, ?C)), (?P rdf:type owl:FunctionalProperty),
+ -> (?X rdf:type all(?P, ?C))]
+
+[restrictionProc4a: (?X rdf:type all(?P, ?C)), (?X ?P ?Y), notEqual(?P, rdf:type)
+ -> (?X rdf:type some(?P, ?C))]
+
+[restrictionProc4b: unbound(?Y), (?X rdf:type all(?P, ?C)), (?X ?P ?Y), notEqual(?P, rdf:type)
+ -> (?Y rdf:type ?C)]
+
+[restrictionProc4c: bound(?Y), (?X ?P ?Y), (?X rdf:type all(?P, ?C)), notEqual(?P, rdf:type)
+ -> (?Y rdf:type ?C)]
+
+[restrictionProc5: (?P rdfs:range ?C), (?X ?P *), notFunctor(?C) -> (?X rdf:type some(?P, ?C))]
+
+[restrictionProc6: (?D owl:equivalentClass all(?P, ?C)) (?P rdfs:range ?C)
+ -> (owl:Thing rdfs:subClassOf ?D)]
+
+[restrictionProc7: (?A rdf:type max(?P, 1)), (?A ?P ?B), (?A ?P ?C) -> (?B owl:sameIndividualAs ?C)]
+
+[restrictionProc8: (?X rdf:type min(?P, 1)), (?X rdf:type max(?P, 0)) -> (?X rdf:type owl:Nothing)]
+
+[restrictionProc9: (?X rdf:type max(?P, 0)) (?X ?P *) -> (?X rdf:type owl:Nothing)]
+
+## Omitted 10 for now, requires prototype generation
+
+[restrictionProc11: (?P rdf:type owl:FunctionalProperty), (?X rdf:type owl:Thing)
+ -> (?X rdf:type max(?P, 1))]
+
+#[restrictionProc12: bound (?D), (?D rdf:type owl:Class), (?P rdfs:range ?C), notFunctor(?C)
+# -> (?D rdfs:subClassOf all(?P, ?C)) ]
+[restrictionProc12: bound(?P), (?P rdfs:range ?C), (?D rdf:type owl:Class), notFunctor(?C)
+ -> (?D rdfs:subClassOf all(?P, ?C)) ]
+
+[restrictionProc13: (owl:Thing rdfs:subClassOf all(?P, ?C)) -> (?P rdfs:range ?C)]
+
+#[restrictionProc13: (owl:Thing rdfs:subClassOf all(?P, ?C))
+# -> (?P rdfs:range ?C), (?P rdf:type owl:ObjectProperty)]
+
+# There is a problem with this when used backward chaining -
+# if we supported (* type *) matches then we are doing search over all data.
+#[card3: (?X ?P ?V), (?V rdf:type ?C), notFunctor(?C) -> (?X rdf:type some(?P, ?C))]
+[card3: bound(?P), bound(?X), (?X ?P ?V), (?V rdf:type ?C) -> (?X rdf:type some(?P, ?C))]
+
+#------------------------------------------------------------------
+# Disjointness and equivalence rules
+#------------------------------------------------------------------
+
+[distinct1: (?C owl:disjointWith ?D), (?X rdf:type ?C), (?Y rdf:type ?D)
+ -> (?X owl:differentFrom ?Y) ]
+
+# This one is best done backwards or with a dedicated equality reasoner
+# Hacked for now just for completeness
+
+# [distinct2: (* owl:distinctMembers ?L) -> assertDisjointPairs(?L) ]
+
+# To be improved when resolve how to record contradictions
+
+#[conflict1: (?X owl:sameIndividualAs ?Y), (?X owl:differentFrom ?Y)
+# -> contradiction('same/different', ?X, ?Y) ]
+
+#[conflict2: (?X rdf:type ?C), (?X rdf:type ?D), (?C owl:disjointWith ?D)
+# -> contradiction('disjoint classes overlap', ?C, ?D, ?X) ]
+
+#------------------------------------------------------------------
+# Property rules
+#------------------------------------------------------------------
+
+# symmetric
+[symmetricProperty1: bound(?P) (?P rdf:type owl:SymmetricProperty), (?X ?P ?Y) -> (?Y ?P ?X)]
+[symmetricProperty1: unbound(?P), (?X ?P ?Y) (?P rdf:type owl:SymmetricProperty) -> (?Y ?P ?X)]
+
+# equivalentProperty
+
+[equivalentProperty1: (?P owl:equivalentProperty ?Q)
+ -> (?P rdfs:subPropertyOf ?Q), (?Q rdfs:subPropertyOf ?P) ]
+
+[equivalentProperty2: (?P rdfs:subPropertyOf ?Q), (?Q rdfs:subPropertyOf ?P)
+ -> (?P owl:equivalentProperty ?Q) ]
+
+[equivalentProperty3: (?P owl:sameAs ?Q), (?P rdf:type rdf:Property), (?Q rdf:type rdf:Property)
+ -> (?P owl:equivalentProperty ?Q) ]
+
+# equivalentClass
+[equivalentClass1: (?P owl:equivalentClass ?Q)
+ -> (?P rdfs:subClassOf ?Q), (?Q rdfs:subClassOf ?P) ]
+
+[equivalentClass2: (?P rdfs:subClassOf ?Q), (?Q rdfs:subClassOf ?P)
+ -> (?P owl:equivalentClass ?Q) ]
+
+[equivalentClass3: (?P owl:sameAs ?Q), (?P rdf:type rdfs:Class), (?Q rdf:type rdfs:Class)
+ -> (?P owl:equivalentClass ?Q) ]
+
+# inverseOf
+[inverseOf1: (?P owl:inverseOf ?Q) -> (?Q owl:inverseOf ?P) ]
+
+[inverseOf2: bound(?P), (?P owl:inverseOf ?Q), (?X ?P ?Y) -> (?Y ?Q ?X) ]
+[inverseOf2: unbound(?P), (?X ?P ?Y), (?P owl:inverseOf ?Q) -> (?Y ?Q ?X) ]
+
+[inverseOf3: (?P owl:inverseOf ?Q), (?P rdf:type owl:FunctionalProperty)
+ -> (?Q rdf:type owl:InverseFunctionalProperty) ]
+
+[inverseOf4: (?P owl:inverseOf ?Q), (?P rdf:type owl:InverseFunctionalProperty)
+ -> (?Q rdf:type owl:FunctionalProperty) ]
+
+# Transitive
+[transitivePropery1: (?P rdf:type owl:TransitiveProperty), (?A ?P ?B), (?B ?P ?C) -> (?A ?P ?C)]
+
+# sameIndividualAs
+[sameIndividualAs1: (?P rdf:type owl:FunctionalProperty), (?A ?P ?B), (?A ?P ?C)
+ -> (?B owl:sameIndividualAs ?C) ]
+
+[sameIndividualAs2: (?P rdf:type owl:InverseFunctionalProperty), (?A ?P ?B), (?C ?P ?B)
+ -> (?A owl:sameIndividualAs ?C) ]
+
+[sameIndividualAs3: (?X owl:sameAs ?Y), (?X rdf:type owl:Thing), (?Y rdf:type old:Thing)
+ -> (?X owl:sameIndividualAs ?Y) ]
+
+
+[sameIndividualAs4: bound(?Y), (?X owl:sameIndividualAs ?Y), (?X ?P ?V) -> (?Y ?P ?V) ]
+[sameIndividualAs4: unbound(?Y), (?X ?P ?V) (?X owl:sameIndividualAs ?Y) -> (?Y ?P ?V) ]
+
+[sameIndividualAs5: bound(?Y) (?X owl:sameIndividualAs ?Y), (?V ?P ?X) -> (?V ?P ?Y) ]
+[sameIndividualAs5: unbound(?Y), (?V ?P ?X) (?X owl:sameIndividualAs ?Y) -> (?V ?P ?Y) ]
+
+[sameIndividualAs6: (?X owl:sameIndividualAs ?Y) -> (?X rdf:type owl:Thing) ]
+
+# Don't yet handle reflexivity of sameIndividualAs
Added: jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-micro.rules
URL: http://svn.apache.org/viewvc/jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-micro.rules?rev=1444841&view=auto
==============================================================================
--- jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-micro.rules (added)
+++ jena/trunk/jena-sdb/src-dev/resources/etc/owl-fb-micro.rules Mon Feb 11 16:01:41 2013
@@ -0,0 +1,566 @@
+#------------------------------------------------------------------
+# OWL micro rule set v0.1
+# This rule set is designed to implement owl(f)lite using the hybrid
+# rule system (mixture of forward and backward chaining).
+#
+# This differs from the normal OWL rule set in several ways.
+# - no equality reasoning (sameAs, FunctionalProperty ...)
+# - omits the someValuesFrom => bNode entailments.
+# - avoids any guard clauses which would break the find() contract.
+# - TGC for subClass hierarchies, all subClassOf derivations are forward.
+# - omits use of prototypes and relies on explicit rules for subClassOf
+# derivations this may lead to additional incompletenesses
+#
+# $Id: owl-fb.rules,v 1.45 2004/03/02 13:38:53 der Exp $
+#------------------------------------------------------------------
+
+#------------------------------------------------------------------
+# Tabling directives
+#------------------------------------------------------------------
+
+#-> tableAll().
+
+-> table(rdf:type).
+-> table(rdfs:subClassOf).
+-> table(rdfs:range).
+-> table(rdfs:domain).
+-> table(owl:equivalentClass).
+
+#------------------------------------------------------------------
+# RDFS Axioms
+#------------------------------------------------------------------
+
+-> (rdf:type rdfs:range rdfs:Class).
+-> (rdfs:Resource rdf:type rdfs:Class).
+-> (rdfs:Literal rdf:type rdfs:Class).
+-> (rdf:Statement rdf:type rdfs:Class).
+-> (rdf:nil rdf:type rdf:List).
+-> (rdf:subject rdf:type rdf:Property).
+-> (rdf:object rdf:type rdf:Property).
+-> (rdf:predicate rdf:type rdf:Property).
+-> (rdf:first rdf:type rdf:Property).
+-> (rdf:rest rdf:type rdf:Property).
+
+-> (rdfs:subPropertyOf rdfs:domain rdf:Property).
+-> (rdfs:subClassOf rdfs:domain rdfs:Class).
+-> (rdfs:domain rdfs:domain rdf:Property).
+-> (rdfs:range rdfs:domain rdf:Property).
+-> (rdf:subject rdfs:domain rdf:Statement).
+-> (rdf:predicate rdfs:domain rdf:Statement).
+-> (rdf:object rdfs:domain rdf:Statement).
+-> (rdf:first rdfs:domain rdf:List).
+-> (rdf:rest rdfs:domain rdf:List).
+
+-> (rdfs:subPropertyOf rdfs:range rdf:Property).
+-> (rdfs:subClassOf rdfs:range rdfs:Class).
+-> (rdfs:domain rdfs:range rdfs:Class).
+-> (rdfs:range rdfs:range rdfs:Class).
+-> (rdf:type rdfs:range rdfs:Class).
+-> (rdfs:comment rdfs:range rdfs:Literal).
+-> (rdfs:label rdfs:range rdfs:Literal).
+-> (rdf:rest rdfs:range rdf:List).
+
+-> (rdf:Alt rdfs:subClassOf rdfs:Container).
+-> (rdf:Bag rdfs:subClassOf rdfs:Container).
+-> (rdf:Seq rdfs:subClassOf rdfs:Container).
+-> (rdfs:ContainerMembershipProperty rdfs:subClassOf rdf:Property).
+
+-> (rdfs:isDefinedBy rdfs:subPropertyOf rdfs:seeAlso).
+
+-> (rdf:XMLLiteral rdf:type rdfs:Datatype).
+-> (rdfs:Datatype rdfs:subClassOf rdfs:Class).
+
+#------------------------------------------------------------------
+# RDFS Closure rules
+#------------------------------------------------------------------
+
+[rdf1and4: (?x ?p ?y) -> (?p rdf:type rdf:Property)]
+
+[rdfs7b: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf rdfs:Resource)]
+
+[rdfs2: (?p rdfs:domain ?c) -> [(?x rdf:type ?c) <- (?x ?p ?y)] ]
+[rdfs3: (?p rdfs:range ?c) -> [(?y rdf:type ?c) <- (?x ?p ?y)] ]
+[rdfs5b: (?a rdf:type rdf:Property) -> (?a rdfs:subPropertyOf ?a)]
+[rdfs6: (?p rdfs:subPropertyOf ?q), notEqual(?p,?q) -> table(?p, ?q), [ (?a ?q ?b) <- (?a ?p ?b)] ]
+[rdfs7: (?a rdf:type rdfs:Class) -> (?a rdfs:subClassOf ?a)]
+[rdfs10: (?x rdf:type rdfs:ContainerMembershipProperty) -> (?x rdfs:subPropertyOf rdfs:member)]
+
+[rdfs2-partial: (?p rdfs:domain ?c) -> (?c rdf:type rdfs:Class)]
+[rdfs3-partial: (?p rdfs:range ?c) -> (?c rdf:type rdfs:Class)]
+
+[rdfs9-alt: (?a rdf:type ?y) <- bound(?y) (?x rdfs:subClassOf ?y), (?a rdf:type ?x) ]
+[rdfs9-alt: (?a rdf:type ?y) <- unbound(?y) (?a rdf:type ?x) (?x rdfs:subClassOf ?y) ]
+
+#------------------------------------------------------------------
+# RDFS iff extensions needed for OWL
+#------------------------------------------------------------------
+
+[rdfs2a: (?x rdfs:domain ?z) <- bound(?x), (?x rdfs:domain ?y), (?y rdfs:subClassOf ?z) ]
+[rdfs2a: (?x rdfs:domain ?z) <- unbound(?x), (?y rdfs:subClassOf ?z), (?x rdfs:domain ?y) ]
+[rdfs3a: (?x rdfs:range ?z) <- bound(?x), (?x rdfs:range ?y), (?y rdfs:subClassOf ?z) ]
+[rdfs3a: (?x rdfs:range ?z) <- unbound(?x), (?y rdfs:subClassOf ?z), (?x rdfs:range ?y) ]
+
+[rdfs12a: (rdf:type rdfs:subPropertyOf ?z), (?z rdfs:domain ?y) -> (rdfs:Resource rdfs:subClassOf ?y)]
+[rdfs12a: (rdfs:subClassOf rdfs:subPropertyOf ?z), (?z rdfs:domain ?y) -> (rdfs:Class rdfs:subClassOf ?y)]
+[rdfs12a: (rdfs:subPropertyOf rdfs:subPropertyOf ?z), (?z rdfs:domain ?y) -> (rdf:Property rdfs:subClassOf ?y)]
+
+[rdfs12b: (rdfs:subClassOf rdfs:subPropertyOf ?z), (?z rdfs:range ?y) -> (rdfs:Class rdfs:subClassOf ?y)]
+[rdfs12b: (rdfs:subPropertyOf rdfs:subPropertyOf ?z), (?z rdfs:range ?y) -> (rdf:Property rdfs:subClassOf ?y)]
+
+[rdfsder1: (?p rdfs:range ?z) <- (?p rdfs:subPropertyOf ?q), notEqual(?p, ?q), (?q rdfs:range ?z)]
+[rdfsder2: (?p rdfs:domain ?z) <- (?p rdfs:subPropertyOf ?q), notEqual(?p, ?q), (?q rdfs:domain ?z)]
+
+#------------------------------------------------------------------
+# OWL axioms
+#------------------------------------------------------------------
+
+-> (owl:FunctionalProperty rdfs:subClassOf rdf:Property).
+-> (owl:ObjectProperty rdfs:subClassOf rdf:Property).
+-> (owl:DatatypeProperty rdfs:subClassOf rdf:Property).
+-> (owl:InverseFunctionalProperty rdfs:subClassOf owl:ObjectProperty).
+-> (owl:TransitiveProperty rdfs:subClassOf owl:ObjectProperty).
+-> (owl:SymmetricProperty rdfs:subClassOf owl:ObjectProperty).
+
+-> (rdf:first rdf:type owl:FunctionalProperty).
+-> (rdf:rest rdf:type owl:FunctionalProperty).
+
+-> (owl:oneOf rdfs:domain owl:Class).
+
+-> (owl:Class rdfs:subClassOf rdfs:Class).
+-> (owl:Restriction rdfs:subClassOf owl:Class).
+
+-> (owl:Thing rdf:type owl:Class).
+-> (owl:Nothing rdf:type owl:Class).
+
+-> (owl:equivalentClass rdfs:domain owl:Class).
+-> (owl:equivalentClass rdfs:range owl:Class).
+
+-> (owl:disjointWith rdfs:domain owl:Class).
+-> (owl:disjointWith rdfs:range owl:Class).
+
+-> (owl:sameAs rdf:type owl:SymmetricProperty).
+
+# These are true but mess up the Ont API's notion of declared properties
+#-> (owl:sameAs rdfs:domain owl:Thing).
+#-> (owl:sameAs rdfs:range owl:Thing).
+#-> (owl:differentFrom rdfs:domain owl:Thing).
+#-> (owl:differentFrom rdfs:range owl:Thing).
+
+-> (owl:onProperty rdfs:domain owl:Restriction).
+-> (owl:onProperty rdfs:range owl:Property).
+
+-> (owl:OntologyProperty rdfs:subClassOf rdf:Property).
+-> (owl:imports rdf:type owl:OntologyProperty).
+-> (owl:imports rdfs:domain owl:Ontology).
+-> (owl:imports rdfs:range owl:Ontology).
+
+-> (owl:priorVersion rdfs:domain owl:Ontology).
+-> (owl:priorVersion rdfs:range owl:Ontology).
+
+-> (owl:backwardCompatibleWith rdfs:domain owl:Ontology).
+-> (owl:backwardCompatibleWith rdfs:range owl:Ontology).
+
+-> (owl:incompatibleWith rdfs:domain owl:Ontology).
+-> (owl:incompatibleWith rdfs:range owl:Ontology).
+
+-> (owl:versionInfo rdf:type owl:AnnotationProperty).
+
+# These properties are derivable from the definitions
+#-> (owl:equivalentProperty rdf:type owl:SymmetricProperty).
+#-> (owl:equivalentProperty rdf:type owl:TransitiveProperty).
+#-> (owl:equivalentClass rdf:type owl:SymmetricProperty).
+#-> (owl:equivalentClass rdf:type owl:TransitiveProperty).
+
+-> (owl:differentFrom rdf:type owl:SymmetricProperty).
+-> (owl:disjointWith rdf:type owl:SymmetricProperty).
+
+-> (owl:intersectionOf rdfs:domain owl:Class).
+
+#------------------------------------------------------------------
+# OWL Rules
+#------------------------------------------------------------------
+
+[thing1: (?C rdf:type owl:Class) -> (?C rdfs:subClassOf owl:Thing), (owl:Nothing rdfs:subClassOf ?C)]
+
+#------------------------------------------------------------------
+# Class equality
+#------------------------------------------------------------------
+
+# equivalentClass
+[equivalentClass1: (?P owl:equivalentClass ?Q)
+ -> (?P rdfs:subClassOf ?Q), (?Q rdfs:subClassOf ?P) ]
+
+[equivalentClass2: (?P owl:equivalentClass ?Q) <- (?P rdfs:subClassOf ?Q), (?Q rdfs:subClassOf ?P) ]
+
+[equivalentClass3: (?P owl:sameAs ?Q), (?P rdf:type owl:Class), (?Q rdf:type owl:Class)
+ -> (?P owl:equivalentClass ?Q) ]
+
+#------------------------------------------------------------------
+# Property rules
+#------------------------------------------------------------------
+
+# EquivalentProperty
+
+[equivalentProperty1: (?P owl:equivalentProperty ?Q)
+ -> (?P rdfs:subPropertyOf ?Q), (?Q rdfs:subPropertyOf ?P) ]
+
+[equivalentProperty2: (?P rdfs:subPropertyOf ?Q), (?Q rdfs:subPropertyOf ?P)
+ -> (?P owl:equivalentProperty ?Q) ]
+
+[equivalentProperty3: (?P owl:sameAs ?Q), (?P rdf:type rdf:Property), (?Q rdf:type rdf:Property)
+ -> (?P owl:equivalentProperty ?Q) ]
+
+# SymmetricProperty
+
+[symmetricProperty1: (?P rdf:type owl:SymmetricProperty) -> table(?P),
+ [symmetricProperty1b: (?X ?P ?Y) <- (?Y ?P ?X)] ]
+
+
+# inverseOf
+[inverseOf1: (?P owl:inverseOf ?Q) -> (?Q owl:inverseOf ?P) ]
+
+[inverseOf2: (?P owl:inverseOf ?Q) -> table(?P), table(?Q), [inverseOf2b: (?X ?P ?Y) <- (?Y ?Q ?X)] ]
+
+[inverseOf3: (?P owl:inverseOf ?Q), (?P rdf:type owl:FunctionalProperty)
+ -> (?Q rdf:type owl:InverseFunctionalProperty) ]
+
+[inverseOf4: (?P owl:inverseOf ?Q), (?P rdf:type owl:InverseFunctionalProperty)
+ -> (?Q rdf:type owl:FunctionalProperty) ]
+
+[inverseof5: (?P owl:inverseOf ?Q) (?P rdfs:range ?C) -> (?Q rdfs:domain ?C)]
+[inverseof6: (?P owl:inverseOf ?Q) (?P rdfs:domain ?C) -> (?Q rdfs:range ?C)]
+
+# TransitiveProperty
+
+[transitiveProperty1: (?P rdf:type owl:TransitiveProperty) -> table(?P),
+# [transitiveProperty1b: (?A ?P ?C) <- (?A ?P ?B), (?B ?P ?C)] ]
+ [transitiveProperty1b: (?A ?P ?C) <- bound (?C), (?B ?P ?C), (?A ?P ?B)]
+ [transitiveProperty1b: (?A ?P ?C) <- unbound (?C), (?A ?P ?B) (?B ?P ?C)]
+ ]
+
+# Object properties
+
+[objectProperty: (?P rdf:type owl:ObjectProperty) ->
+ (?P rdfs:domain owl:Thing) (?P rdfs:range owl:Thing) ]
+
+#------------------------------------------------------------------
+# Declaration of main XSD datatypes
+#------------------------------------------------------------------
+
+-> (xsd:float rdf:type rdfs:Datatype).
+-> (xsd:double rdf:type rdfs:Datatype).
+-> (xsd:int rdf:type rdfs:Datatype).
+-> (xsd:long rdf:type rdfs:Datatype).
+-> (xsd:short rdf:type rdfs:Datatype).
+-> (xsd:byte rdf:type rdfs:Datatype).
+-> (xsd:unsignedByte rdf:type rdfs:Datatype).
+-> (xsd:unsignedShort rdf:type rdfs:Datatype).
+-> (xsd:unsignedInt rdf:type rdfs:Datatype).
+-> (xsd:unsignedLong rdf:type rdfs:Datatype).
+-> (xsd:decimal rdf:type rdfs:Datatype).
+-> (xsd:integer rdf:type rdfs:Datatype).
+-> (xsd:nonPositiveInteger rdf:type rdfs:Datatype).
+-> (xsd:nonNegativeInteger rdf:type rdfs:Datatype).
+-> (xsd:positiveInteger rdf:type rdfs:Datatype).
+-> (xsd:negativeInteger rdf:type rdfs:Datatype).
+-> (xsd:boolean rdf:type rdfs:Datatype).
+-> (xsd:string rdf:type rdfs:Datatype).
+-> (xsd:anyURI rdf:type rdfs:Datatype).
+-> (xsd:hexBinary rdf:type rdfs:Datatype).
+-> (xsd:base64Binary rdf:type rdfs:Datatype).
+-> (xsd:date rdf:type rdfs:Datatype).
+-> (xsd:time rdf:type rdfs:Datatype).
+-> (xsd:dateTime rdf:type rdfs:Datatype).
+-> (xsd:duration rdf:type rdfs:Datatype).
+-> (xsd:gDay rdf:type rdfs:Datatype).
+-> (xsd:gMonth rdf:type rdfs:Datatype).
+-> (xsd:gYear rdf:type rdfs:Datatype).
+-> (xsd:gYearMonth rdf:type rdfs:Datatype).
+-> (xsd:gMonthDay rdf:type rdfs:Datatype).
+
+#-> (xsd:integer rdfs:subClassOf xsd:decimal).
+
+-> hide(rb:xsdBase).
+-> hide(rb:xsdRange).
+-> hide(rb:prototype).
+
+-> (xsd:byte rb:xsdBase xsd:decimal).
+-> (xsd:short rb:xsdBase xsd:decimal).
+-> (xsd:int rb:xsdBase xsd:decimal).
+-> (xsd:long rb:xsdBase xsd:decimal).
+-> (xsd:unsignedByte rb:xsdBase xsd:decimal).
+-> (xsd:unsignedShort rb:xsdBase xsd:decimal).
+-> (xsd:unsignedInt rb:xsdBase xsd:decimal).
+-> (xsd:unsignedLong rb:xsdBase xsd:decimal).
+-> (xsd:integer rb:xsdBase xsd:decimal).
+-> (xsd:nonNegativeInteger rb:xsdBase xsd:decimal).
+-> (xsd:nonPositiveInteger rb:xsdBase xsd:decimal).
+-> (xsd:byte rb:xsdBase xsd:decimal).
+-> (xsd:float rb:xsdBase xsd:float).
+-> (xsd:decimal rb:xsdBase xsd:decimal).
+-> (xsd:string rb:xsdBase xsd:string).
+-> (xsd:boolean rb:xsdBase xsd:boolean).
+-> (xsd:date rb:xsdBase xsd:date).
+-> (xsd:time rb:xsdBase xsd:time).
+-> (xsd:dateTime rb:xsdBase xsd:dateTime).
+-> (xsd:duration rb:xsdBase xsd:duration).
+
+# Describe range (base type, signed, min bits)
+-> (xsd:byte rb:xsdRange xsd(xsd:integer,1,8)).
+-> (xsd:short rb:xsdRange xsd(xsd:integer,1,16)).
+-> (xsd:int rb:xsdRange xsd(xsd:integer,1,32)).
+-> (xsd:long rb:xsdRange xsd(xsd:integer,1,64)).
+-> (xsd:integer rb:xsdRange xsd(xsd:integer,1,65)).
+
+-> (xsd:unsignedByte rb:xsdRange xsd(xsd:integer,0,8)).
+-> (xsd:unsignedShort rb:xsdRange xsd(xsd:integer,0,16)).
+-> (xsd:unsignedInt rb:xsdRange xsd(xsd:integer,0,32)).
+-> (xsd:unsignedLong rb:xsdRange xsd(xsd:integer,0,64)).
+-> (xsd:nonNegativeInteger rb:xsdRange xsd(xsd:integer,0,65)).
+
+#------------------------------------------------------------------
+# Identify restriction assertions
+#------------------------------------------------------------------
+
+[restriction1: (?C owl:onProperty ?P), (?C owl:someValuesFrom ?D)
+ -> (?C owl:equivalentClass some(?P, ?D))]
+
+[restriction2: (?C owl:onProperty ?P), (?C owl:allValuesFrom ?D)
+ -> (?C owl:equivalentClass all(?P, ?D))]
+
+[restriction3: (?C owl:onProperty ?P), (?C owl:minCardinality ?X)
+ -> (?C owl:equivalentClass min(?P, ?X))]
+
+[restriction4: (?C owl:onProperty ?P), (?C owl:maxCardinality ?X)
+ -> (?C owl:equivalentClass max(?P, ?X)) ]
+
+[restriction5: (?C owl:onProperty ?P), (?C owl:cardinality ?X)
+ -> (?C owl:equivalentClass card(?P, ?X)),
+ (?C rdfs:subClassOf min(?P, ?X)),
+ (?C rdfs:subClassOf max(?P, ?X)) ]
+
+[restriction6: (?C rdfs:subClassOf min(?P, ?X)), (?C rdfs:subClassOf max(?P, ?X))
+ -> (?C rdfs:subClassOf card(?P, ?X))]
+
+[hasValueRec: (?C owl:onProperty ?P), (?C owl:hasValue ?V)
+ -> (?C owl:equivalentClass hasValue(?P, ?V)) ]
+
+
+## TODO do we need the early restriction propagation rules in this configuration?
+
+# Equality propagation
+
+[restrictionEq1: (?R1 owl:equivalentClass some(?P, ?C)) (?R2 owl:equivalentClass some(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+[restrictionEq2: (?R1 owl:equivalentClass all(?P, ?C)) (?R2 owl:equivalentClass all(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+[restrictionEq3: (?R1 owl:equivalentClass min(?P, ?C)) (?R2 owl:equivalentClass min(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+[restrictionEq4: (?R1 owl:equivalentClass max(?P, ?C)) (?R2 owl:equivalentClass max(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+[restrictionEq5: (?R1 owl:equivalentClass card(?P, ?C)) (?R2 owl:equivalentClass card(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+[restrictionEq6: (?R1 owl:equivalentClass hasValue(?P, ?C)) (?R2 owl:equivalentClass hasValue(?P, ?C))
+ notEqual(?R1, ?R2) -> (?R1 owl:equivalentClass ?R2) ]
+
+#[restrictionPropagate1: (?C owl:equivalentClass ?R), (?D rdfs:subClassOf ?C)
+# -> (?D rdfs:subClassOf ?R) ]
+#[restrictionPropagate2: (?C owl:equivalentClass ?R), (?D owl:equivalentClass ?C)
+# -> (?D owl:equivalentClass ?R) ]
+
+
+#------------------------------------------------------------------
+# One direction of unionOf
+#------------------------------------------------------------------
+
+[unionOf1: (?C owl:unionOf ?L) -> listMapAsSubject(?L, rdfs:subClassOf ?C) ]
+
+# Note could also add relation between two unionOf's if we add a listSubsumes primitive
+
+#------------------------------------------------------------------
+# Intersection of (instance reasoning is done by the translation hook)
+#------------------------------------------------------------------
+
+[intersectionOf1: (?C owl:intersectionOf ?L) -> listMapAsObject(?C rdfs:subClassOf ?L) ]
+
+#------------------------------------------------------------------
+# someValuesFrom - recognition direction only
+#------------------------------------------------------------------
+
+[someRec2: (?C owl:equivalentClass some(?P, ?D)) ->
+ [someRec2b: (?X rdf:type ?C) <- (?X ?P ?A) (?A rdf:type ?D) ] ]
+
+[someRec2b: (?C owl:equivalentClass some(?P, ?D)), (?D rdf:type rdfs:Datatype)->
+ [someRec2b: (?X rdf:type ?C) <- (?X ?P ?A), isDType(?A, ?D) ] ]
+
+# In the absence of prototype and bNode introduction rules we have to manually
+# code in additional subclass relationships
+
+[restriction-inter-MnS: (?P rdfs:range ?D), (?C rdfs:subClassOf min(?P, 1))
+ -> (?C rdfs:subClassOf some(?P, ?D)) ]
+
+#------------------------------------------------------------------
+# allValuesFrom (main rule is in Mini, this just does minimal subclass propagation
+#------------------------------------------------------------------
+
+[allRec1: (?C rdfs:subClassOf max(?P, 1)), (?C rdfs:subClassOf some(?P, ?D))
+ -> (?C rdfs:subClassOf all(?P, ?D)) ]
+
+[allRec2: (?P rdf:type owl:FunctionalProperty), (?C rdfs:subClassOf some(?P, ?C))
+ -> (?C rdfs:subClassOf all(?P, ?C)) ]
+
+[allRec4: (?P rdf:type owl:FunctionalProperty), (?C owl:equivalentClass all(?P, ?D))
+ -> [ (?X rdf:type ?C) <- (?X ?P ?Y) (?Y rdf:type ?D) ] ]
+
+[allRec5: (?C rdfs:subClassOf max(?P, 1)) (?C owl:equivalentClass all(?P, ?D))
+ -> [ (?X rdf:type ?C) <- (?X ?P ?Y) (?Y rdf:type ?D) ] ]
+
+[restriction-inter-RA-T: (?P rdfs:range ?C), (?D owl:equivalentClass all(?P, ?C))
+ -> (owl:Thing rdfs:subClassOf ?D) ]
+
+[restriction-inter-AT-R: (owl:Thing rdfs:subClassOf all(?P, ?C))
+ -> (?P rdfs:range ?C), (?P rdf:type owl:ObjectProperty) ]
+
+#------------------------------------------------------------------
+# Restricted support for hasValue, even though that is beyond OWL/lite
+#------------------------------------------------------------------
+
+# hasValue
+[hasValueIF: (?C owl:equivalentClass hasValue(?P, ?V)) ->
+ [ (?x ?P ?V) <- (?x rdf:type ?C) ]
+ [ (?x rdf:type ?C) <- (?x ?P ?V) ]
+ ]
+
+#------------------------------------------------------------------
+# Nothing
+#------------------------------------------------------------------
+
+[nothing1: (?C rdfs:subClassOf min(?P, ?n)) (?C rdfs:subClassOf max(?P, ?x))
+ lessThan(?x, ?n) -> (?C owl:equivalentClass owl:Nothing) ]
+
+[nothing3: (?C rdfs:subClassOf owl:Nothing) -> (?C owl:equivalentClass owl:Nothing) ]
+
+[nothing4: (?C owl:oneOf rdf:nil) -> (?C owl:equivalentClass owl:Nothing) ]
+
+#------------------------------------------------------------------
+# Disjointness
+#------------------------------------------------------------------
+
+[distinct1: (?X owl:differentFrom ?Y) <-
+ (?C owl:disjointWith ?D), (?X rdf:type ?C), (?Y rdf:type ?D) ]
+
+# Exploding the pairwise assertions is simply done procedurally here.
+# This is better handled by a dedicated equality reasoner any.
+[distinct2: (?w owl:distinctMembers ?L) -> assertDisjointPairs(?L) ]
+
+
+#------------------------------------------------------------------
+# min cardinality
+#------------------------------------------------------------------
+
+[minRec: (?C owl:equivalentClass min(?P, 1)), notEqual(?P, rdf:type) ->
+ [min2b: (?X rdf:type ?C) <- (?X ?P ?Y)] ]
+
+#------------------------------------------------------------------
+# max cardinality 1
+#------------------------------------------------------------------
+
+[maxRec: (?C owl:equivalentClass max(?P, 1)), (?P rdf:type owl:FunctionalProperty)
+ -> (owl:Thing rdfs:subClassOf ?C) ]
+
+#------------------------------------------------------------------
+# max cardinality 0
+#------------------------------------------------------------------
+
+# For completeness this requires iff version of rdfs:domain working forwards which it does not just now
+[maxRec2: (?C owl:equivalentClass max(?P, 0)), (?P rdfs:domain ?D), (?E owl:disjointWith ?D)
+ -> (?E owl:equivalentClass ?C)]
+
+[cardRec1: (?C owl:equivalentClass card(?P, 0)), (?P rdfs:domain ?D), (?E owl:disjointWith ?D)
+ -> (?E owl:equivalentClass ?C)]
+
+#------------------------------------------------------------------
+# cardinality 1
+#------------------------------------------------------------------
+
+[restriction-inter-CFP: (?C owl:equivalentClass card(?P, 1)), (?P rdf:type owl:FunctionalProperty) ->
+ (?C owl:equivalentClass min(?P, 1)) ]
+
+[restriction6: (?C owl:equivalentClass min(?P, ?X)), (?C owl:equivalentClass max(?P, ?X))
+ -> (?C owl:equivalentClass card(?P, ?X))]
+
+#------------------------------------------------------------------
+# Validation rules. These are dormant by default but are triggered
+# by the additional of a validation control triple to the graph.
+#------------------------------------------------------------------
+
+[validationDomainMax0: (?v rb:validation on()), (?C rdfs:subClassOf max(?P, 0)), (?P rdfs:domain ?C) ->
+ (?P rb:violation error('inconsistent property definition', 'Property defined with domain which has a max(0) restriction for that property (domain)', ?C) )
+]
+
+[validationMax0: (?v rb:validation on()), (?C rdfs:subClassOf max(?P, 0)) ->
+ [max2b: (?X rb:violation error('too many values', 'Value for max-0 property (prop, class)', ?P, ?C))
+ <- (?X rdf:type ?C), (?X ?P ?Y) ] ]
+
+[validationMaxN: (?v rb:validation on()), (?C rdfs:subClassOf max(?P, ?N)) ->
+ [max2b: (?X rb:violation error('too many values', 'Too many values on max-N property (prop, class)', ?P, ?C))
+ <- (?X rdf:type ?C), countLiteralValues(?X, ?P, ?M), lessThan(?N, ?M) ] ]
+
+[validationIndiv: (?v rb:validation on()) ->
+ [validationIndiv: (?X rb:violation error('conflict', 'Two individuals both same and different, may be due to disjoint classes or functional properties', ?Y))
+ <- (?X owl:differentFrom ?Y), (?X owl:sameAs ?Y) ] ]
+
+[validationIndiv2: (?v rb:validation on()) (?X owl:disjointWith ?Y) ->
+ [validationIndiv: (?I rb:violation error('conflict', 'Individual a member of disjoint classes', ?X, ?Y))
+ <- (?I rdf:type ?X), (?I rdf:type ?Y)] ]
+
+[validationIndiv3: (?v rb:validation on()) ->
+ [validationIndiv: (?I rb:violation error('conflict', 'Individual a member of Nothing', ?I))
+ <- (?I rdf:type owl:Nothing) ] ]
+
+[validationDisjoint: (?v rb:validation on()) (?X owl:disjointWith ?Y) ->
+ [validationIndiv: (?X rb:violation warn('Inconsistent class', 'Two classes related by both subclass and disjoint relations', ?Y))
+ <- (?X owl:disjointWith ?Y), (?X rdfs:subClassOf ?Y) ] ]
+
+[validationDisjoint2: (?v rb:validation on()) (?X owl:disjointWith ?Y) ->
+ [validationIndiv: (?C rb:violation warn('Inconsistent class', 'subclass of two disjoint classes', ?X, ?Y))
+ <- (?X owl:disjointWith ?Y), (?C rdfs:subClassOf ?X) (?C rdfs:subClassOf ?Y) notEqual(?C, owl:Nothing) ] ]
+
+[validationDTP: (?v rb:validation on()), (?P rdf:type owl:DatatypeProperty) ->
+ [validationDTP: (?X rb:violation error('range check', 'Object value for datatype property (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), notLiteral(?V), notBNode(?V) ] ]
+
+[validationOP: (?v rb:validation on()), (?P rdf:type owl:ObjectProperty) ->
+ [validationDTP: (?X rb:violation warn('range check', 'Literal value for object property (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), isLiteral(?V) ] ]
+
+[validationDTRange: (?v rb:validation on()), (?P rdfs:range ?R) (?R rdf:type rdfs:Datatype) ->
+ [validationDTRange: (?X rb:violation error('range check', 'Incorrectly typed literal due to range (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), notDType(?V, ?R) ] ]
+
+[validationDTRange: (?v rb:validation on()), (?P rdfs:range rdfs:Literal) ->
+ [validationDTRange: (?X rb:violation error('range check', 'Incorrectly typed literal due to range rdsf:Literal (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), notLiteral(?V), notBNode(?V) ] ]
+
+[validationAllFrom: (?v rb:validation on()), (?C rdfs:subClassOf all(?P, ?R)) (?R rdf:type rdfs:Datatype) ->
+ [validationDTRange: (?X rb:violation error('range check', 'Incorrectly typed literal due to allValuesFrom (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), (?X rdf:type ?C), notDType(?V, ?R) ] ]
+
+[validationAllFrom: (?v rb:validation on()), (?C owl:equivalentClass all(?P, rdfs:Literal)) ->
+ [validationDTRange: (?X rb:violation error('range check', 'Incorrectly typed literal due to allValuesFrom rdfs:Literal (prop, value)', ?P, ?V))
+ <- (?X ?P ?V), (?X rdf:type ?C), notDType(?V, rdfs:Literal)
+ ] ]
+
+[validationNothing: (?v rb:validation on()), (?C owl:equivalentClass owl:Nothing) notEqual(?C, owl:Nothing) ->
+ (?C rb:violation warn('Inconsistent class', 'Class cannot be instantiated, probably subclass of a disjoint classes or of an empty restriction'))
+]
+
+[validationRangeNothing: (?v rb:validation on()), (?P rdfs:range owl:Nothing) ->
+ (?C rb:violation warn('Inconsistent property', 'Property cannot be instantiated, probably due to multiple disjoint range declarations'))
+]
+
+[validationOneOf: (?v rb:validation on()) (?C owl:oneOf ?L) ->
+ [validationIndiv: (?X rb:violation warn('possible oneof violation', 'Culprit is deduced to be of enumerated type (implicicated class) but is not one of the enumerations\n This may be due to aliasing.', ?Y))
+ <- (?X rdf:type ?C), notBNode(?X), listNotContains(?L, ?X) ] ]
+
+