@prefix : <http://example.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://example.org/> .

<http://example.org/> rdf:type owl:Ontology .

#################################################################
#    Annotation properties
#################################################################

###  http://example.org/never_part_of
:never_part_of rdf:type owl:AnnotationProperty ;
               <http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX : <http://example.org/>
CONSTRUCT {
      ?a a owl:Class .
      ?b a owl:Class .
      ?a owl:disjointWith [
          a owl:Restriction ;
          owl:onProperty :part_of ;
          owl:someValuesFrom ?b
      ]
    }
    WHERE {
      ?a :never_part_of ?b .
    }""" .


###  http://example.org/part_disjoint_with
:part_disjoint_with rdf:type owl:AnnotationProperty ;
                    <http://purl.obolibrary.org/obo/OMO_0002000> """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX : <http://example.org/>
CONSTRUCT {
      ?a a owl:Class .
      ?b a owl:Class .
      [
        a owl:Restriction ;
        owl:onProperty :part_of ;
        owl:someValuesFrom ?a ;
        owl:disjointWith [
          a owl:Restriction ;
          owl:onProperty :part_of ;
          owl:someValuesFrom ?b
        ]
      ]
    }
    WHERE {
      ?a :part_disjoint_with ?b .
    }""" .


###  http://purl.obolibrary.org/obo/OMO_0002000
<http://purl.obolibrary.org/obo/OMO_0002000> rdf:type owl:AnnotationProperty ;
                                                          rdfs:label "defined by construct" .


#################################################################
#    Object Properties
#################################################################

###  http://example.org/part_of
:part_of rdf:type owl:ObjectProperty .


#################################################################
#    Classes
#################################################################

###  http://example.org/A
:A rdf:type owl:Class ;
   :part_disjoint_with :B .


###  http://example.org/B
:B rdf:type owl:Class ;
   :never_part_of :A .


###  Generated by the OWL API (version 4.5.9.2019-02-01T07:24:44Z) https://github.com/owlcs/owlapi
