Search code examples
rdfowlontologyprotegerdfs

Can you specify a closed set in owl without enumerating all its individuals?


I would like to know if it is possible to specify a class is a closed set without enumerating all of its individuals.

For eg. given a class of Drivers with individuals A, B and C is there an axiom I can put on Driver that will cause a reasoner to recognize the class has no other individuals without having to specify something like this in the class description?

 <owl:equivalentClass>
            <owl:Class>
                <owl:oneOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="&example;A"/>
                    <rdf:Description rdf:about="&example;B"/>
                    <rdf:Description rdf:about="&example;C"/>
                </owl:oneOf>
            </owl:Class>
 </owl:equivalentClass>

 <owl:NamedIndividual rdf:about="&example;A">
        <rdf:type rdf:resource="&example;Driver"/>
 </owl:NamedIndividual>
 <owl:NamedIndividual rdf:about="&example;B">
        <rdf:type rdf:resource="&example;Driver"/>
 </owl:NamedIndividual>
 <owl:NamedIndividual rdf:about="&example;C">
        <rdf:type rdf:resource="&example;Driver"/>
 </owl:NamedIndividual>

edit: Allow me to clarify, I would like to be able to specify that a class is a closed set without describing the class as an enumeration of a set of individuals.


Solution

  • You can create a new property that only the individuals you wish to include have and make the class a subclass of a exact cardinality restriction of 1 for that property. To add or remove individuals, use the new property in assertions - adding multiple assertions will /remove/ the individuals from the class, so this works even for individuals used in imported ontologies.

    I'm not clear on your intent though - what are you trying to achieve through this?