Defining a schema is only optional and not obligatory. If you don't claim special needs OntoBroker doesn't need and doesn't exploit the schema for inferencing (beside some minor performance optimization tasks). However, you might want to think about defiining a proper schema because of the following reasons:
- OntoStudio interprets the schema very rigidly in order to support in allocating a sound and schema conform fact base interactively.
- Traditionally it is the schema which is considered being the main part of an "ontology".
- OntoStudio 2.3 has some built in rules which allow for a schema check of a fact base. It is up to you to make use of this tool support.
- You might think of writing some few generic rules which exploit some selected aspects of a fact base w.r.t. to schema.
A (rather advanced) rule which exploits in a very generic way the domain and range information of a property type definition is the "RDFS range type entailment rule". The rule itself is pretty generic; applied to our example ontology it says: "If there is an object which has a size, it must be a toy." The generic formulation reads as:
- If we have a generic schema definition "class Q is range of property P"
- and there is a fact "object1 P object2"
- then object2 is asserted being of type Q
|
@{
rangeTypeEntailments
}
?-
@{
rangeTypeEntailmentRule
}
|
Note that in a frame language like OBL the according RDF rule for domain entailment in general does *not* hold!
In order to test the rule we extend the schema slightly:
Though the object hammer has no well defined type in our ontology you get it as a result when asking for all toys - by way of the rangeTypeEntailmentRule!