Skip to contentMethod: IntegrityConstraintParserNew()
1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.owl2java;
16:
17: import java.util.HashSet;
18: import java.util.Set;
19:
20: import org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom;
21: import org.semanticweb.owlapi.model.OWLAnnotationPropertyDomainAxiom;
22: import org.semanticweb.owlapi.model.OWLAnnotationPropertyRangeAxiom;
23: import org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom;
24: import org.semanticweb.owlapi.model.OWLAxiom;
25: import org.semanticweb.owlapi.model.OWLAxiomVisitor;
26: import org.semanticweb.owlapi.model.OWLClass;
27: import org.semanticweb.owlapi.model.OWLClassAssertionAxiom;
28: import org.semanticweb.owlapi.model.OWLClassExpression;
29: import org.semanticweb.owlapi.model.OWLClassExpressionVisitor;
30: import org.semanticweb.owlapi.model.OWLDataAllValuesFrom;
31: import org.semanticweb.owlapi.model.OWLDataExactCardinality;
32: import org.semanticweb.owlapi.model.OWLDataFactory;
33: import org.semanticweb.owlapi.model.OWLDataHasValue;
34: import org.semanticweb.owlapi.model.OWLDataMaxCardinality;
35: import org.semanticweb.owlapi.model.OWLDataMinCardinality;
36: import org.semanticweb.owlapi.model.OWLDataProperty;
37: import org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom;
38: import org.semanticweb.owlapi.model.OWLDataPropertyDomainAxiom;
39: import org.semanticweb.owlapi.model.OWLDataPropertyExpression;
40: import org.semanticweb.owlapi.model.OWLDataPropertyRangeAxiom;
41: import org.semanticweb.owlapi.model.OWLDataRange;
42: import org.semanticweb.owlapi.model.OWLDataSomeValuesFrom;
43: import org.semanticweb.owlapi.model.OWLDatatype;
44: import org.semanticweb.owlapi.model.OWLDatatypeDefinitionAxiom;
45: import org.semanticweb.owlapi.model.OWLDeclarationAxiom;
46: import org.semanticweb.owlapi.model.OWLDifferentIndividualsAxiom;
47: import org.semanticweb.owlapi.model.OWLDisjointClassesAxiom;
48: import org.semanticweb.owlapi.model.OWLDisjointDataPropertiesAxiom;
49: import org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom;
50: import org.semanticweb.owlapi.model.OWLDisjointUnionAxiom;
51: import org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom;
52: import org.semanticweb.owlapi.model.OWLEquivalentDataPropertiesAxiom;
53: import org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom;
54: import org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom;
55: import org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom;
56: import org.semanticweb.owlapi.model.OWLHasKeyAxiom;
57: import org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom;
58: import org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom;
59: import org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom;
60: import org.semanticweb.owlapi.model.OWLNegativeDataPropertyAssertionAxiom;
61: import org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom;
62: import org.semanticweb.owlapi.model.OWLObject;
63: import org.semanticweb.owlapi.model.OWLObjectAllValuesFrom;
64: import org.semanticweb.owlapi.model.OWLObjectComplementOf;
65: import org.semanticweb.owlapi.model.OWLObjectExactCardinality;
66: import org.semanticweb.owlapi.model.OWLObjectHasSelf;
67: import org.semanticweb.owlapi.model.OWLObjectHasValue;
68: import org.semanticweb.owlapi.model.OWLObjectIntersectionOf;
69: import org.semanticweb.owlapi.model.OWLObjectMaxCardinality;
70: import org.semanticweb.owlapi.model.OWLObjectMinCardinality;
71: import org.semanticweb.owlapi.model.OWLObjectOneOf;
72: import org.semanticweb.owlapi.model.OWLObjectProperty;
73: import org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom;
74: import org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom;
75: import org.semanticweb.owlapi.model.OWLObjectPropertyExpression;
76: import org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom;
77: import org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom;
78: import org.semanticweb.owlapi.model.OWLObjectUnionOf;
79: import org.semanticweb.owlapi.model.OWLOntology;
80: import org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom;
81: import org.semanticweb.owlapi.model.OWLSameIndividualAxiom;
82: import org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom;
83: import org.semanticweb.owlapi.model.OWLSubClassOfAxiom;
84: import org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom;
85: import org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom;
86: import org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom;
87: import org.semanticweb.owlapi.model.OWLSymmetricObjectPropertyAxiom;
88: import org.semanticweb.owlapi.model.OWLTransitiveObjectPropertyAxiom;
89: import org.semanticweb.owlapi.model.SWRLRule;
90: import org.semanticweb.owlapi.reasoner.OWLReasoner;
91:
92: import cz.cvut.kbss.jopa.model.ic.IntegrityConstraint;
93: import cz.cvut.kbss.jopa.model.ic.IntegrityConstraintFactory;
94:
95: public class IntegrityConstraintParserNew implements IntegrityConstraintParser {
96:
97:         private OWLDataFactory f;
98:
99:         private void notSupported(final OWLObject o) {
100:                 System.out.println("Ignoring Unsupported Constraint: " + o);
101:         }
102:
103:         
104:         public Set<IntegrityConstraint> parse(OWLAxiom a, OWLReasoner r,
105:                         OWLOntology o) throws UnsupportedICException {
106:                 this.f = o.getOWLOntologyManager().getOWLDataFactory();
107:
108:                 final Set<IntegrityConstraint> ic = new HashSet<IntegrityConstraint>();
109:
110:                 a.accept(new OWLAxiomVisitor() {
111:
112:                         
113:                         public void visit(OWLAnnotationPropertyRangeAxiom axiom) {
114:                                 notSupported(axiom);
115:                         }
116:
117:                         
118:                         public void visit(OWLAnnotationPropertyDomainAxiom axiom) {
119:                                 notSupported(axiom);
120:                         }
121:
122:                         
123:                         public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
124:                                 notSupported(axiom);
125:                         }
126:
127:                         
128:                         public void visit(OWLAnnotationAssertionAxiom axiom) {
129:                                 notSupported(axiom);
130:                         }
131:
132:                         
133:                         public void visit(SWRLRule axiom) {
134:                                 notSupported(axiom);
135:                         }
136:
137:                         
138:                         public void visit(OWLDatatypeDefinitionAxiom axiom) {
139:                                 notSupported(axiom);
140:                         }
141:
142:                         
143:                         public void visit(OWLHasKeyAxiom axiom) {
144:                                 notSupported(axiom);
145:                         }
146:
147:                         
148:                         public void visit(OWLInverseObjectPropertiesAxiom axiom) {
149:                                 notSupported(axiom);
150:                         }
151:
152:                         
153:                         public void visit(OWLSubPropertyChainOfAxiom axiom) {
154:                                 notSupported(axiom);
155:                         }
156:
157:                         
158:                         public void visit(OWLSameIndividualAxiom axiom) {
159:                                 notSupported(axiom);
160:                         }
161:
162:                         
163:                         public void visit(OWLInverseFunctionalObjectPropertyAxiom axiom) {
164:                                 notSupported(axiom);
165:                         }
166:
167:                         
168:                         public void visit(OWLSubDataPropertyOfAxiom axiom) {
169:                                 notSupported(axiom);
170:                         }
171:
172:                         
173:                         public void visit(OWLIrreflexiveObjectPropertyAxiom axiom) {
174:                                 notSupported(axiom);
175:                         }
176:
177:                         
178:                         public void visit(OWLTransitiveObjectPropertyAxiom axiom) {
179:                                 notSupported(axiom);
180:                         }
181:
182:                         
183:                         public void visit(OWLDataPropertyAssertionAxiom axiom) {
184:                                 notSupported(axiom);
185:                         }
186:
187:                         
188:                         public void visit(OWLEquivalentClassesAxiom axiom) {
189:                                 notSupported(axiom);
190:                         }
191:
192:                         
193:                         public void visit(OWLClassAssertionAxiom axiom) {
194:                                 notSupported(axiom);
195:                         }
196:
197:                         
198:                         public void visit(OWLEquivalentDataPropertiesAxiom axiom) {
199:                                 notSupported(axiom);
200:                         }
201:
202:                         
203:                         public void visit(OWLFunctionalDataPropertyAxiom axiom) {
204:                                 ic.addAll(processParticipationConstraint(f.getOWLThing(), f
205:                                                 .getOWLDataMaxCardinality(1, axiom.getProperty())));
206:                         }
207:
208:                         
209:                         public void visit(OWLDataPropertyRangeAxiom axiom) {
210:                                 notSupported(axiom);
211:                         }
212:
213:                         
214:                         public void visit(OWLSymmetricObjectPropertyAxiom axiom) {
215:                                 notSupported(axiom);
216:                         }
217:
218:                         
219:                         public void visit(OWLDisjointUnionAxiom axiom) {
220:                                 notSupported(axiom);
221:                         }
222:
223:                         
224:                         public void visit(OWLSubObjectPropertyOfAxiom axiom) {
225:                                 notSupported(axiom);
226:                         }
227:
228:                         
229:                         public void visit(OWLFunctionalObjectPropertyAxiom axiom) {
230:                                 ic.addAll(processParticipationConstraint(f.getOWLThing(), f
231:                                                 .getOWLObjectMaxCardinality(1, axiom.getProperty())));
232:
233:                         }
234:
235:                         
236:                         public void visit(OWLObjectPropertyAssertionAxiom axiom) {
237:                                 notSupported(axiom);
238:                         }
239:
240:                         
241:                         public void visit(OWLObjectPropertyRangeAxiom axiom) {
242:                                 ic.addAll(processParticipationConstraint(f.getOWLThing(), f
243:                                                 .getOWLObjectMaxCardinality(1, axiom.getProperty())));
244:                         }
245:
246:                         
247:                         public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
248:                                 notSupported(axiom);
249:                         }
250:
251:                         
252:                         public void visit(OWLDisjointDataPropertiesAxiom axiom) {
253:                                 notSupported(axiom);
254:                         }
255:
256:                         
257:                         public void visit(OWLDifferentIndividualsAxiom axiom) {
258:                                 notSupported(axiom);
259:                         }
260:
261:                         
262:                         public void visit(OWLNegativeDataPropertyAssertionAxiom axiom) {
263:                                 notSupported(axiom);
264:                         }
265:
266:                         
267:                         public void visit(OWLEquivalentObjectPropertiesAxiom axiom) {
268:                                 notSupported(axiom);
269:                         }
270:
271:                         
272:                         public void visit(OWLObjectPropertyDomainAxiom axiom) {
273:                                 notSupported(axiom);
274:                         }
275:
276:                         
277:                         public void visit(OWLDataPropertyDomainAxiom axiom) {
278:                                 notSupported(axiom);
279:                         }
280:
281:                         
282:                         public void visit(OWLDisjointClassesAxiom axiom) {
283:                                 notSupported(axiom);
284:                         }
285:
286:                         
287:                         public void visit(OWLReflexiveObjectPropertyAxiom axiom) {
288:                                 notSupported(axiom);
289:                         }
290:
291:                         
292:                         public void visit(OWLAsymmetricObjectPropertyAxiom axiom) {
293:                                 notSupported(axiom);
294:                         }
295:
296:                         
297:                         public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
298:                                 notSupported(axiom);
299:                         }
300:
301:                         
302:                         public void visit(OWLSubClassOfAxiom axiom) {
303:                                 if (axiom.getSubClass().isAnonymous()) {
304:                                         notSupported(axiom);
305:                                 }
306:                                 ic.addAll(processParticipationConstraint(axiom.getSubClass()
307:                                                 .asOWLClass(), axiom.getSuperClass()));
308:                         }
309:
310:                         
311:                         public void visit(OWLDeclarationAxiom axiom) {
312:                                 notSupported(axiom);
313:                         }
314:                 });
315:
316:                 return ic;
317:         }
318:
319:         private OWLDatatype ensureDatatype(final OWLDataRange r)
320:                         throws RuntimeException {
321:                 if (!r.isDatatype()) {
322:                         throw new RuntimeException("Data ranges not supported: " + r);
323:                 }
324:
325:                 if (!r.asOWLDatatype().isBuiltIn()) {
326:                         throw new RuntimeException(
327:                                         "Only built in datatypes are supported: " + r);
328:                 }
329:
330:                 return r.asOWLDatatype();
331:         }
332:
333:         private OWLClass ensureClass(final OWLClassExpression r) {
334:                 if (!r.isAnonymous()) {
335:                         return r.asOWLClass();
336:                 }
337:                 throw new RuntimeException("Only named classes are supported: " + r);
338:         }
339:
340:         // private void ensureNamedIndividual(final OWLIndividual r)
341:         // throws RuntimeException {
342:         // if (r.isAnonymous()) {
343:         // throw new RuntimeException("Anonymous individuals not supported: "
344:         // + r);
345:         // }
346:         // }
347:
348:         private OWLDataProperty ensureDataProperty(final OWLDataPropertyExpression e)
349:                         throws RuntimeException {
350:                 if (e.isAnonymous()) {
351:                         throw new RuntimeException(
352:                                         "Data property expressions not supported: " + e);
353:                 }
354:
355:                 return e.asOWLDataProperty();
356:         }
357:
358:         private OWLObjectProperty ensureObjectProperty(
359:                         final OWLObjectPropertyExpression e) throws RuntimeException {
360:                 if (e.isAnonymous()) {
361:                         throw new RuntimeException(
362:                                         "Object property expressions not supported: " + e);
363:                 }
364:
365:                 return e.asOWLObjectProperty();
366:         }
367:
368:         private Set<IntegrityConstraint> processParticipationConstraint(
369:                         final OWLClass subjClass, final OWLClassExpression superClass) {
370:                 final Set<IntegrityConstraint> set = new HashSet<IntegrityConstraint>();
371:
372:                 final OWLClassExpressionVisitor v = new OWLClassExpressionVisitor() {
373:
374:                         
375:                         public void visit(OWLDataMaxCardinality arg0) {
376:                                 final OWLDatatype dt = ensureDatatype(arg0.getFiller());
377:                                 final OWLDataProperty dp = ensureDataProperty(arg0
378:                                                 .getProperty());
379:
380:                                 set.add(IntegrityConstraintFactory
381:                                                 .MaxDataParticipationConstraint(subjClass, dp, dt, arg0
382:                                                                 .getCardinality()));
383:                         }
384:
385:                         
386:                         public void visit(OWLDataExactCardinality arg0) {
387:                                 final OWLDatatype dt = ensureDatatype(arg0.getFiller());
388:                                 final OWLDataProperty dp = ensureDataProperty(arg0
389:                                                 .getProperty());
390:
391:                                 set.add(IntegrityConstraintFactory.DataParticipationConstraint(
392:                                                 subjClass, dp, dt, arg0.getCardinality(), arg0
393:                                                                 .getCardinality()));
394:                         }
395:
396:                         // private void processDataCardinality(final int minCardinality,
397:                         // final int maxCardinality, OWLDataProperty p,
398:                         // final OWLDatatype c) {
399:                         //
400:                         // final Set<OWLDatatype> validRanges = new HashSet<OWLDatatype>();
401:                         //
402:                         // for (final OWLDatatype cc : o.getDatatypesInSignature()) {
403:                         // if (r.isEntailed(f.getOWLDataPropertyRangeAxiom(p, cc))) {
404:                         // validRanges.add(cc);
405:                         // }
406:                         // }
407:                         //
408:                         // if (validRanges.isEmpty()) {
409:                         // validRanges.add(c);
410:                         // }
411:                         //
412:                         // // infer cardinality
413:                         // for (final OWLDatatype cc : validRanges) {
414:                         // if ((maxCardinality > 1)
415:                         // && r.isEntailed(f.getOWLSubClassOfAxiom(subjClass,
416:                         // f.getOWLDataMaxCardinality(1, p
417:                         // .asOWLDataProperty(), cc)))
418:                         // || r.isEntailed(f
419:                         // .getOWLFunctionalDataPropertyAxiom(p
420:                         // .asOWLDataProperty()))) {
421:                         //
422:                         // set.add(IntegrityConstraintFactory
423:                         // .datatypeParticipationConstraint(subjClass, p,
424:                         // cc, minCardinality, 1));
425:                         // } else {
426:                         // // must be consistent
427:                         //
428:                         // set.add(IntegrityConstraintFactory
429:                         // .datatypeParticipationConstraint(subjClass, p,
430:                         // cc, minCardinality, maxCardinality));
431:                         // }
432:                         // }
433:                         // }
434:
435:                         
436:                         public void visit(OWLDataMinCardinality arg0) {
437:                                 final OWLDatatype dt = ensureDatatype(arg0.getFiller());
438:                                 final OWLDataProperty dp = ensureDataProperty(arg0
439:                                                 .getProperty());
440:
441:                                 set.add(IntegrityConstraintFactory
442:                                                 .MinDataParticipationConstraint(subjClass, dp, dt, arg0
443:                                                                 .getCardinality()));
444:                         }
445:
446:                         
447:                         public void visit(OWLDataHasValue arg0) {
448:                                 notSupported(arg0);
449:                                 // ensureDataProperty(arg0.getProperty());
450:                                 //
451:                                 // set.add(IntegrityConstraintFactory
452:                                 // .datatypeParticipationConstraint(subjClass, arg0
453:                                 // .getProperty().asOWLDataProperty(), f
454:                                 // .getOWLDataOneOf(arg0.getValue()), 1, 1));
455:                         }
456:
457:                         
458:                         public void visit(OWLDataAllValuesFrom arg0) {
459:                                 notSupported(arg0);
460:                         }
461:
462:                         
463:                         public void visit(OWLDataSomeValuesFrom arg0) {
464:                                 final OWLDatatype dt = ensureDatatype(arg0.getFiller());
465:                                 final OWLDataProperty dp = ensureDataProperty(arg0
466:                                                 .getProperty());
467:
468:                                 set.add(IntegrityConstraintFactory
469:                                                 .MinDataParticipationConstraint(subjClass, dp, dt, 1));
470:                         }
471:
472:                         
473:                         public void visit(OWLObjectOneOf arg0) {
474:                                 notSupported(arg0);
475:                         }
476:
477:                         
478:                         public void visit(OWLObjectHasSelf arg0) {
479:                                 notSupported(arg0);
480:                         }
481:
482:                         
483:                         public void visit(OWLObjectMaxCardinality arg0) {
484:                                 OWLClass c = ensureClass(arg0.getFiller());
485:                                 OWLObjectProperty p = ensureObjectProperty(arg0.getProperty());
486:
487:                                 set.add(IntegrityConstraintFactory
488:                                                 .MaxObjectParticipationConstraint(subjClass, p, c, arg0
489:                                                                 .getCardinality()));
490:                         }
491:
492:                         
493:                         public void visit(OWLObjectExactCardinality arg0) {
494:                                 OWLClass c = ensureClass(arg0.getFiller());
495:                                 OWLObjectProperty p = ensureObjectProperty(arg0.getProperty());
496:
497:                                 set.add(IntegrityConstraintFactory
498:                                                 .ObjectParticipationConstraint(subjClass, p, c, arg0
499:                                                                 .getCardinality(), arg0.getCardinality()));
500:                         }
501:
502:                         // private void processObjectMinCardinality(final int cardinality,
503:                         // OWLObjectProperty p, final OWLClass c) {
504:                         //
505:                         // // infer range
506:                         // final NodeSet<OWLClass> nSet = r.getObjectPropertyRanges(p,
507:                         // false);
508:                         //
509:                         // final Set<OWLClass> validRanges = new HashSet<OWLClass>();
510:                         //
511:                         // for (final OWLClass cc : nSet.getFlattened()) {
512:                         // if (r.isEntailed(f.getOWLSubClassOfAxiom(cc, c))) {
513:                         // validRanges.add(cc);
514:                         // }
515:                         // }
516:                         //
517:                         // if (validRanges.isEmpty()) {
518:                         // validRanges.add(c);
519:                         // }
520:                         //
521:                         // // infer cardinality
522:                         // for (final OWLClass cc : validRanges) {
523:                         // if (r.isEntailed(f.getOWLSubClassOfAxiom(subjClass, f
524:                         // .getOWLObjectMaxCardinality(cardinality, p
525:                         // .asOWLObjectProperty(), cc)))
526:                         // || r.isEntailed(f
527:                         // .getOWLFunctionalObjectPropertyAxiom(p
528:                         // .asOWLObjectProperty()))) {
529:                         // set.add(IntegrityConstraintFactory
530:                         // .classParticipationConstraint(subjClass, p, cc,
531:                         // cardinality, cardinality));
532:                         // } else {
533:                         // // must be consistent
534:                         // set.add(IntegrityConstraintFactory
535:                         // .classParticipationConstraint(subjClass, p, cc,
536:                         // cardinality, Integer.MAX_VALUE));
537:                         // }
538:                         // }
539:                         // }
540:
541:                         
542:                         public void visit(OWLObjectMinCardinality arg0) {
543:                                 OWLClass c = ensureClass(arg0.getFiller());
544:                                 OWLObjectProperty p = ensureObjectProperty(arg0.getProperty());
545:
546:                                 set.add(IntegrityConstraintFactory
547:                                                 .MinObjectParticipationConstraint(subjClass, p, c, arg0
548:                                                                 .getCardinality()));
549:                         }
550:
551:                         
552:                         public void visit(OWLObjectHasValue arg0) {
553:                                 notSupported(arg0);
554:                                 // ensureObjectProperty(arg0.getProperty());
555:                                 // ensureNamedIndividual(arg0.getValue());
556:                                 //
557:                                 // set.add(IntegrityConstraintFactory
558:                                 // .classParticipationConstraint(subjClass, arg0
559:                                 // .getProperty().asOWLObjectProperty(), f
560:                                 // .getOWLObjectOneOf(arg0.getValue()
561:                                 // .asOWLNamedIndividual()), 1, 1));
562:                         }
563:
564:                         
565:                         public void visit(OWLObjectAllValuesFrom arg0) {
566:                                 notSupported(arg0);
567:                         }
568:
569:                         
570:                         public void visit(OWLObjectSomeValuesFrom arg0) {
571:                                 OWLClass c = ensureClass(arg0.getFiller());
572:                                 OWLObjectProperty p = ensureObjectProperty(arg0.getProperty());
573:
574:                                 set.add(IntegrityConstraintFactory
575:                                                 .MinObjectParticipationConstraint(subjClass, p, c, 1));
576:                         }
577:
578:                         
579:                         public void visit(OWLObjectComplementOf arg0) {
580:                                 notSupported(arg0);
581:                         }
582:
583:                         
584:                         public void visit(OWLObjectUnionOf arg0) {
585:                                 notSupported(arg0);
586:                         }
587:
588:                         
589:                         public void visit(OWLObjectIntersectionOf arg0) {
590:                                 notSupported(arg0);
591:                         }
592:
593:                         
594:                         public void visit(OWLClass arg0) {
595:                                 notSupported(arg0);
596:                         }
597:                 };
598:
599:                 superClass.accept(v);
600:
601:                 return set;
602:         }
603: }