I have an OWL ontology with three interconnected individuals: a, b, and c, and also has two isolated individuals x, and y.
interconnected individuals:
- have at least one outbound object property assertion. e.g.: a hasRelationWith b; or
- have at least on inbound object property assertion e.g.: such c, as b hasRelationWith c.
isolated individuals:
- have zero outbound object property assertion e.g.: x hasRelationWith [no individual]; and
- have zero inbound object property assertion e.g.: such x, as [no individual] hasRelationWith x.
Is it possible to classify (by logical inference, not by enumeration) all the isolated individuals using a DL Query (in Protégé 4.3, if it makes a difference), and if it is possible, how do I do it?
My intuitive guess is something like: (hasRelationWith min 0 Thing) exclude (hasRelationWith min 1 Thing), but DL-Query seems not supporting Set Subtraction syntax...
UPDATE: The following SPARQL can make it, although it cannot be used within class definition.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX my: <http://localhost:8080/ontology/untitled-ontology-26#>
SELECT DISTINCT ?src_obj
WHERE {
?src_obj a owl:NamedIndividual .
minus {?src_obj my:hasRelationWith ?target_obj}
minus {?target_obj my:hasRelationWith ?src_obj}
}