Ontology
Ontology is one of the Fixed Schema options available in 1Integrate and there are two key reasons you may want to define one:
-
To easily apply Rules to a number of classes from your data by defining a class hierarchy.
-
To pre-define your target model, enabling you to easily re-use existing Rules.
1Integrate uses a small subset of the concepts that can be expressed using the Web Ontology Language (OWL), represented in an .OWL file you provide. For more information about the Web Ontology Language, please refer to www.w3.org/OWL/.
The Class Hierarchy
An OWL file will allow you to define a class hierarchy, including superclasses, under which sub-classes are aggregated, thus permitting a Rule to be applied across all of the classes.
The class hierarchy is assembled in the OWL file from subClassOf elements, e.g.
<owl:Class rdf:ID="A-Road">
<rdfs:subClassOf>
<owl:Class rdf:ID="Roadway"/>
</rdfs:subClassOf>
</owl:Class>
By defining the superclass you can begin to apply Rules across the sub-classes once attributes have also been defined.
Attributes
For attributes in ontology classes to appear after a class has been selected for context, they must be defined in the OWL file you provide, referencing a selected class or one of its superclasses. This will enable you to run Rules against them with your defined ontology.
Note: A class inherits attributes from its superclasses. For further information, please refer to the Example below.
Attributes are specified from DatatypeProperty
elements in the OWL file, e.g.
<owl:DatatypeProperty rdf:ID="Length">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#float"/>
<rdfs:domain rdf:resource="#Roadway"/>
</owl:DatatypeProperty>
-
rdf:ID specifies the attribute name.
-
rdfs:range specifies the attribute type using an XML Schema type. For supported types see the OWL Attribute Types.
-
rdfs:domain specifies the class within which the attribute is defined.
Note: If you are accessing a feature primarily by an attribute defined on a parent class in the ontology then, for performance reasons, ensure that the child classes all have indexes set on that attribute. If fewer than half of the child classes have that attribute indexed then the attribute index won't be used at all.
Uploading and Mapping an Ontology
You must upload your OWL file and select the ontology mapping before Rule writing.