
h2. Integrating ontology extensions
In order to integrate an ontology extension, you have to accomplish two steps:
# the new classes should subclass {{protons:Entity}}
# set the new classes' visibility level
h3. Subclass {{protons:Entity}}
h4. Inheritance
Make sure that the new classes inherit at least [http://proton.semanticweb.org/2006/05/protons#Entity], directly or indirectly.
{tip}We recommend that, if applicable, your classes inherit one of these PROTON Top classes:
* [http://proton.semanticweb.org/2006/05/protont#Person]
* [http://proton.semanticweb.org/2006/05/protont#Organization]
* [http://proton.semanticweb.org/2006/05/protont#Location]{tip}
h4. Configuration
By default, the ontology extension modules (\* .owl) are located in the *<KIM_HOME>/context/default/kb/owl* folder. You can place them somewhere else if you prefer, as long as you include them in the [OWLIM configuration file|Updating the OWLIM configuration] correctly.
h4. Schema specifics
All classes should have the "label" attribute set. You should pay special attention when using a third-party schema designer to create the ontology extension.
Here is an example extension module that defines "Robot" as a class and also defines the relation "createdBy":
*example:* in.space.owl
{code}
<!DOCTYPE owl [
<!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'>
<!ENTITY owl 'http://www.w3.org/2002/07/owl#' >
<!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >
<!ENTITY psys 'http://proton.semanticweb.org/2006/05/protons#'>
<!ENTITY ptop 'http://proton.semanticweb.org/2006/05/protont#'>
<!ENTITY protonkm 'http://proton.semanticweb.org/2006/05/protonkm#'>
]>
<rdf:RDF
xmlns:owl="&owl;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
xmlns:psys="&psys;"
xmlns:ptop="&ptop;"
xmlns:protonkm="&protonkm;"
xmlns="http://in.space#"
xml:base="http://in.space#">
<owl:AnnotationProperty rdf:about="&rdfs;comment"/>
<owl:AnnotationProperty rdf:about="&rdfs;label"/>
<owl:AnnotationProperty rdf:about="&owl;versionInfo"/>
<owl:Ontology rdf:about="#RobotOntology">
<rdfs:label rdf:datatype="&xsd;string">InSpace</rdfs:label>
<rdfs:comment>InSpace Ontology</rdfs:comment>
<owl:versionInfo>0.1</owl:versionInfo>
</owl:Ontology>
<owl:Class rdf:ID="Robot">
<rdfs:label>Robot</rdfs:label>
<rdfs:comment>
A mechanical or electronic device that resembles a living animal and
moves automatically or by remote control.
</rdfs:comment>
<rdfs:subClassOf rdf:resource="&ptop;Object"/>
</owl:Class>
<owl:ObjectProperty rdf:about="#createdBy" rdfs:label="createdBy">
<rdfs:domain rdf:resource="#Robot"/>
<rdfs:range rdf:resource="&ptop;Person"/>
</owl:ObjectProperty>
</rdf:RDF>