001/**
002 * Copyright (C) 2007 - 2016, Jens Lehmann
003 *
004 * This file is part of DL-Learner.
005 *
006 * DL-Learner is free software; you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation; either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * DL-Learner is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU General Public License for more details.
015 *
016 * You should have received a copy of the GNU General Public License
017 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018 */
019package org.dllearner.utilities.owl;
020
021import java.util.HashSet;
022import java.util.Set;
023
024import org.semanticweb.owlapi.model.*;
025
026import org.semanticweb.owlapi.model.parameters.Imports;
027import uk.ac.manchester.cs.owl.owlapi.OWLClassImpl;
028import uk.ac.manchester.cs.owl.owlapi.OWLNamedIndividualImpl;
029
030import javax.annotation.Nonnull;
031
032/**
033 * Generates Concise Bounded Descriptions on the OWL axiom level.
034 * @author Lorenz Buehmann
035 *
036 */
037public class OWLAxiomCBDGenerator implements OWLAxiomVisitor, OWLClassExpressionVisitor, OWLIndividualVisitor, OWLPropertyExpressionVisitor{
038        
039        private OWLOntology ontology;
040        
041        private int maxDepth;
042        private int currentDepth;
043        
044        private Set<OWLAxiom> cbdAxioms;
045        
046        private Set<OWLClass> visitedClasses;
047        private Set<OWLProperty> visitedProperties;
048        private Set<OWLIndividual> visitedIndividuals;
049        
050        private boolean fetchCompleteRelatedTBox = false;
051        private boolean inTBox = false;
052        private boolean allowPunning = true;
053        
054        private OWLClass currentClass;
055        private OWLObjectProperty currentObjectProperty;
056        private OWLDataProperty currentDataProperty;
057        
058        private Set<IRI> punningClasses;
059        
060        private boolean subsumptionDown = false;
061        
062        public OWLAxiomCBDGenerator(OWLOntology ontology) {
063                this.ontology = ontology;
064                
065                punningClasses = OWLPunningDetector.getPunningIRIs(ontology);
066        }
067        
068        public Set<OWLAxiom> getCBD(OWLIndividual ind, int maxDepth){
069                this.maxDepth = maxDepth;
070                
071                cbdAxioms = new HashSet<>();
072                visitedClasses = new HashSet<>();
073                visitedProperties = new HashSet<>();
074                visitedIndividuals = new HashSet<>();
075                
076                // we start with the directly related axioms
077                currentDepth = 0;
078                ind.accept(this);
079                
080                return cbdAxioms;
081        }
082        
083        /**
084         * If enabled, all TBox axioms that are related to classes and properties
085         * and useful for reasoning are retrieved independently from the CBD maximum depth.
086         * @param fetchCompleteRelatedTBox the fetchCompleteRelatedTBox to set
087         */
088        public void setFetchCompleteRelatedTBox(boolean fetchCompleteRelatedTBox) {
089                this.fetchCompleteRelatedTBox = fetchCompleteRelatedTBox;
090        }
091        
092        /**
093         * If enabled, ABox axioms for classes are also retrieved.
094         * @param allowPunning the allowPunning to set
095         */
096        public void setAllowPunning(boolean allowPunning) {
097                this.allowPunning = allowPunning;
098        }
099        
100        private String indent(){
101                String s = "";
102                for(int i = 1; i < currentDepth; i++){
103                        s+= "   ";
104                }
105                return s;
106        }
107        
108        public void add(OWLAxiom axiom){
109                cbdAxioms.add(axiom);
110//              System.out.println(indent() + axiom);
111        }
112
113        /* (non-Javadoc)
114         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLClass)
115         */
116        @Override
117        public void visit(OWLClass cls) {
118                if(!visitedClasses.contains(cls)){
119                        visitedClasses.add(cls);
120                        
121                        currentDepth++;
122                        Set<OWLClassAxiom> axioms = new HashSet<>();//.getAxioms(cls);
123                        if(subsumptionDown){
124                                axioms.addAll(ontology.getSubClassAxiomsForSuperClass(cls));
125                        } else {
126                                axioms.addAll(ontology.getSubClassAxiomsForSubClass(cls));
127                        }
128                        axioms.addAll(ontology.getEquivalentClassesAxioms(cls));
129                        axioms.addAll(ontology.getDisjointClassesAxioms(cls));
130                        axioms.addAll(ontology.getDisjointUnionAxioms(cls));
131                        
132//                      axioms = ontology.getAxioms(cls);
133//                      System.out.println(axioms);
134                        for (OWLClassAxiom ax : axioms) {
135                                ax.accept(this);
136                        }
137                        currentDepth--;
138                        
139                        // handle punning if enabled
140                        if(allowPunning && punningClasses.contains(cls.getIRI())){
141                                boolean inTBoxBefore = inTBox;
142                                inTBox = true;
143                                new OWLNamedIndividualImpl(cls.getIRI()).accept(this);
144                                inTBox = inTBoxBefore;
145                        }
146                }
147        }
148        
149        /* (non-Javadoc)
150         * @see org.semanticweb.owlapi.model.OWLIndividualVisitor#visit(org.semanticweb.owlapi.model.OWLNamedIndividual)
151         */
152        @Override
153        public void visit(OWLNamedIndividual individual) {
154                if(!visitedIndividuals.contains(individual)){
155                        visitedIndividuals.add(individual);
156                        
157                        currentDepth++;
158                        Set<OWLIndividualAxiom> axioms = ontology.getAxioms(individual, Imports.INCLUDED);
159                        for (OWLIndividualAxiom ax : axioms) {
160                                ax.accept(this);
161                        }
162                        currentDepth--;
163                        
164                        // handle punning if enabled
165                        if(allowPunning && punningClasses.contains(individual.getIRI())){
166                                boolean inTBoxBefore = inTBox;
167                                inTBox = true;
168                                new OWLClassImpl(individual.getIRI()).accept(this);
169                                inTBox = inTBoxBefore;
170                        }
171                }
172        }
173        
174        /* (non-Javadoc)
175         * @see org.semanticweb.owlapi.model.OWLPropertyExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectProperty)
176         */
177        @Override
178        public void visit(OWLObjectProperty property) {
179                if(!visitedProperties.contains(property)){
180                        visitedProperties.add(property);
181                        
182                        Set<OWLObjectPropertyAxiom> axioms = ontology.getAxioms(property, Imports.INCLUDED);
183                        for (OWLObjectPropertyAxiom ax : axioms) {
184                                ax.accept(this);
185                        }
186                }
187        }
188
189        /* (non-Javadoc)
190         * @see org.semanticweb.owlapi.model.OWLPropertyExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectInverseOf)
191         */
192        @Override
193        public void visit(OWLObjectInverseOf property) {
194        }
195
196        /* (non-Javadoc)
197         * @see org.semanticweb.owlapi.model.OWLPropertyExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataProperty)
198         */
199        @Override
200        public void visit(OWLDataProperty property) {
201                if(!visitedProperties.contains(property)){
202                        visitedProperties.add(property);
203                        
204                        Set<OWLDataPropertyAxiom> axioms = ontology.getAxioms(property, Imports.INCLUDED);
205                        for (OWLDataPropertyAxiom ax : axioms) {
206                                ax.accept(this);
207                        }
208                }
209        }
210
211        @Override
212        public void visit(@Nonnull OWLAnnotationProperty property) {
213
214        }
215
216        /* (non-Javadoc)
217         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLClassAssertionAxiom)
218         */
219        @Override
220        public void visit(OWLClassAssertionAxiom axiom) {
221                add(axiom);
222                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
223//                      currentDepth++;
224                        boolean wasInTBox = inTBox;
225                        inTBox = true;
226                        OWLClassExpression ce = axiom.getClassExpression();
227                        ce.accept(this);
228//                      currentDepth--;
229                        inTBox = wasInTBox;
230                }
231        }
232        
233        /* (non-Javadoc)
234         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLObjectPropertyAssertionAxiom)
235         */
236        @Override
237        public void visit(OWLObjectPropertyAssertionAxiom axiom) {
238                add(axiom);
239                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
240//                      currentDepth++;
241                        //get schema axioms for the property
242                        OWLObjectPropertyExpression property = axiom.getProperty();
243                        property.accept(this);
244//                      currentDepth--;
245                }
246                if((inTBox && fetchCompleteRelatedTBox) || currentDepth < maxDepth){
247//                      currentDepth++;
248                        //get the next hop based on the object
249                        OWLIndividual object = axiom.getObject();
250                        object.accept(this);
251//                      currentDepth--;
252                }
253        }
254        
255        /* (non-Javadoc)
256         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLNegativeObjectPropertyAssertionAxiom)
257         */
258        @Override
259        public void visit(OWLNegativeObjectPropertyAssertionAxiom axiom) {
260                add(axiom);
261        }
262        
263        /* (non-Javadoc)
264         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLNegativeDataPropertyAssertionAxiom)
265         */
266        @Override
267        public void visit(OWLNegativeDataPropertyAssertionAxiom axiom) {
268                add(axiom);
269        }
270
271        /* (non-Javadoc)
272         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDifferentIndividualsAxiom)
273         */
274        @Override
275        public void visit(OWLDifferentIndividualsAxiom axiom) {
276                add(axiom);
277        }
278
279        /* (non-Javadoc)
280         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSubClassOfAxiom)
281         */
282        @Override
283        public void visit(OWLSubClassOfAxiom axiom) {
284                add(axiom);
285                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
286                        OWLClassExpression cls;
287                        if(subsumptionDown){
288                                cls = axiom.getSubClass();
289                        } else {
290                                cls = axiom.getSuperClass();
291                        }
292                        cls.accept(this);
293                }
294        }
295
296        /* (non-Javadoc)
297         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLAsymmetricObjectPropertyAxiom)
298         */
299        @Override
300        public void visit(OWLAsymmetricObjectPropertyAxiom axiom) {
301                add(axiom);
302        }
303
304        /* (non-Javadoc)
305         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLReflexiveObjectPropertyAxiom)
306         */
307        @Override
308        public void visit(OWLReflexiveObjectPropertyAxiom axiom) {
309                add(axiom);
310        }
311
312        /* (non-Javadoc)
313         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointClassesAxiom)
314         */
315        @Override
316        public void visit(OWLDisjointClassesAxiom axiom) {
317                add(axiom);
318                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
319//                      currentDepth++;
320                        subsumptionDown = true;
321                        Set<OWLClassExpression> disjointClasses = axiom.getClassExpressions();
322                        for (OWLClassExpression dis : disjointClasses) {
323                                dis.accept(this);
324                        }
325                        subsumptionDown = false;
326//                      currentDepth--;
327                }
328        }
329
330        /* (non-Javadoc)
331         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDataPropertyDomainAxiom)
332         */
333        @Override
334        public void visit(OWLDataPropertyDomainAxiom axiom) {
335                add(axiom);
336                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
337//                      currentDepth++;
338                        OWLClassExpression domain = axiom.getDomain();
339                        domain.accept(this);
340//                      currentDepth--;
341                }
342        }
343
344        /* (non-Javadoc)
345         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLObjectPropertyDomainAxiom)
346         */
347        @Override
348        public void visit(OWLObjectPropertyDomainAxiom axiom) {
349                add(axiom);
350                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
351//                      currentDepth++;
352                        OWLClassExpression domain = axiom.getDomain();
353                        domain.accept(this);
354//                      currentDepth--;
355                }
356        }
357        
358        /* (non-Javadoc)
359         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSubObjectPropertyOfAxiom)
360         */
361        @Override
362        public void visit(OWLSubObjectPropertyOfAxiom axiom) {
363                add(axiom);
364                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
365//                      currentDepth++;
366                        OWLObjectPropertyExpression superProperty = axiom.getSuperProperty();
367                        superProperty.accept(this);
368//                      currentDepth--;
369                }
370        }
371
372        /* (non-Javadoc)
373         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLEquivalentObjectPropertiesAxiom)
374         */
375        @Override
376        public void visit(OWLEquivalentObjectPropertiesAxiom axiom) {
377                add(axiom);
378                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
379//                      currentDepth++;
380                        Set<OWLObjectPropertyExpression> properties = axiom.getProperties();
381                        for (OWLObjectPropertyExpression prop : properties) {
382                                prop.accept(this);
383                        }
384//                      currentDepth--;
385                }
386        }
387
388        /* (non-Javadoc)
389         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointDataPropertiesAxiom)
390         */
391        @Override
392        public void visit(OWLDisjointDataPropertiesAxiom axiom) {
393                add(axiom);
394                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
395//                      currentDepth++;
396                        Set<OWLDataPropertyExpression> properties = axiom.getProperties();
397                        for (OWLDataPropertyExpression prop : properties) {
398                                prop.accept(this);
399                        }
400//                      currentDepth--;
401                }
402        }
403
404        /* (non-Javadoc)
405         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointObjectPropertiesAxiom)
406         */
407        @Override
408        public void visit(OWLDisjointObjectPropertiesAxiom axiom) {
409                add(axiom);
410                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
411//                      currentDepth++;
412                        Set<OWLObjectPropertyExpression> properties = axiom.getProperties();
413                        for (OWLObjectPropertyExpression prop : properties) {
414                                prop.accept(this);
415                        }
416//                      currentDepth--;
417                }
418        }
419
420        /* (non-Javadoc)
421         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLObjectPropertyRangeAxiom)
422         */
423        @Override
424        public void visit(OWLObjectPropertyRangeAxiom axiom) {
425                add(axiom);
426                if(fetchCompleteRelatedTBox || currentDepth < maxDepth){
427//                      currentDepth++;
428                        OWLClassExpression range = axiom.getRange();
429                        range.accept(this);
430//                      currentDepth--;
431                }
432        }
433
434        /* (non-Javadoc)
435         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLFunctionalObjectPropertyAxiom)
436         */
437        @Override
438        public void visit(OWLFunctionalObjectPropertyAxiom axiom) {
439                add(axiom);
440        }
441
442        /* (non-Javadoc)
443         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDisjointUnionAxiom)
444         */
445        @Override
446        public void visit(OWLDisjointUnionAxiom axiom) {
447                add(axiom);
448        }
449
450        /* (non-Javadoc)
451         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSymmetricObjectPropertyAxiom)
452         */
453        @Override
454        public void visit(OWLSymmetricObjectPropertyAxiom axiom) {
455                add(axiom);
456        }
457
458        /* (non-Javadoc)
459         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDataPropertyRangeAxiom)
460         */
461        @Override
462        public void visit(OWLDataPropertyRangeAxiom axiom) {
463                add(axiom);
464        }
465
466        /* (non-Javadoc)
467         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLFunctionalDataPropertyAxiom)
468         */
469        @Override
470        public void visit(OWLFunctionalDataPropertyAxiom axiom) {
471                add(axiom);
472        }
473
474        /* (non-Javadoc)
475         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLEquivalentDataPropertiesAxiom)
476         */
477        @Override
478        public void visit(OWLEquivalentDataPropertiesAxiom axiom) {
479                add(axiom);
480        }
481
482        /* (non-Javadoc)
483         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom)
484         */
485        @Override
486        public void visit(OWLEquivalentClassesAxiom axiom) {
487                add(axiom);
488        }
489
490        /* (non-Javadoc)
491         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDataPropertyAssertionAxiom)
492         */
493        @Override
494        public void visit(OWLDataPropertyAssertionAxiom axiom) {
495                add(axiom);
496        }
497
498        /* (non-Javadoc)
499         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLTransitiveObjectPropertyAxiom)
500         */
501        @Override
502        public void visit(OWLTransitiveObjectPropertyAxiom axiom) {
503                add(axiom);
504        }
505
506        /* (non-Javadoc)
507         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLIrreflexiveObjectPropertyAxiom)
508         */
509        @Override
510        public void visit(OWLIrreflexiveObjectPropertyAxiom axiom) {
511                add(axiom);
512        }
513
514        /* (non-Javadoc)
515         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSubDataPropertyOfAxiom)
516         */
517        @Override
518        public void visit(OWLSubDataPropertyOfAxiom axiom) {
519                add(axiom);
520        }
521
522        /* (non-Javadoc)
523         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLInverseFunctionalObjectPropertyAxiom)
524         */
525        @Override
526        public void visit(OWLInverseFunctionalObjectPropertyAxiom axiom) {
527                add(axiom);
528        }
529
530        /* (non-Javadoc)
531         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSameIndividualAxiom)
532         */
533        @Override
534        public void visit(OWLSameIndividualAxiom axiom) {
535                add(axiom);
536        }
537
538        /* (non-Javadoc)
539         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSubPropertyChainOfAxiom)
540         */
541        @Override
542        public void visit(OWLSubPropertyChainOfAxiom axiom) {
543                add(axiom);
544        }
545
546        /* (non-Javadoc)
547         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLInverseObjectPropertiesAxiom)
548         */
549        @Override
550        public void visit(OWLInverseObjectPropertiesAxiom axiom) {
551                add(axiom);
552        }
553
554        /* (non-Javadoc)
555         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLHasKeyAxiom)
556         */
557        @Override
558        public void visit(OWLHasKeyAxiom axiom) {
559                add(axiom);
560        }
561
562        /* (non-Javadoc)
563         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDatatypeDefinitionAxiom)
564         */
565        @Override
566        public void visit(OWLDatatypeDefinitionAxiom axiom) {
567                add(axiom);
568        }
569
570        /* (non-Javadoc)
571         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.SWRLRule)
572         */
573        @Override
574        public void visit(SWRLRule rule) {
575                add(rule);
576        }
577
578        /* (non-Javadoc)
579         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectIntersectionOf)
580         */
581        @Override
582        public void visit(OWLObjectIntersectionOf ce) {
583                for (OWLClassExpression operand : ce.getOperands()) {
584                        operand.accept(this);
585                }
586        }
587
588        /* (non-Javadoc)
589         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectUnionOf)
590         */
591        @Override
592        public void visit(OWLObjectUnionOf ce) {
593                for (OWLClassExpression operand : ce.getOperands()) {
594                        operand.accept(this);
595                }
596        }
597
598        /* (non-Javadoc)
599         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectComplementOf)
600         */
601        @Override
602        public void visit(OWLObjectComplementOf ce) {
603                ce.getOperand().accept(this);
604        }
605
606        /* (non-Javadoc)
607         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom)
608         */
609        @Override
610        public void visit(OWLObjectSomeValuesFrom ce) {
611                System.out.println(ce);
612                ce.getFiller().accept(this);
613        }
614
615        /* (non-Javadoc)
616         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectAllValuesFrom)
617         */
618        @Override
619        public void visit(OWLObjectAllValuesFrom ce) {
620                ce.getFiller().accept(this);
621        }
622
623        /* (non-Javadoc)
624         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectHasValue)
625         */
626        @Override
627        public void visit(OWLObjectHasValue ce) {
628        }
629
630        /* (non-Javadoc)
631         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectMinCardinality)
632         */
633        @Override
634        public void visit(OWLObjectMinCardinality ce) {
635                ce.getFiller().accept(this);
636        }
637
638        /* (non-Javadoc)
639         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectExactCardinality)
640         */
641        @Override
642        public void visit(OWLObjectExactCardinality ce) {
643                ce.getFiller().accept(this);
644        }
645
646        /* (non-Javadoc)
647         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectMaxCardinality)
648         */
649        @Override
650        public void visit(OWLObjectMaxCardinality ce) {
651                ce.getFiller().accept(this);
652        }
653
654        /* (non-Javadoc)
655         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectHasSelf)
656         */
657        @Override
658        public void visit(OWLObjectHasSelf ce) {
659        }
660
661        /* (non-Javadoc)
662         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLObjectOneOf)
663         */
664        @Override
665        public void visit(OWLObjectOneOf ce) {
666        }
667
668        /* (non-Javadoc)
669         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataSomeValuesFrom)
670         */
671        @Override
672        public void visit(OWLDataSomeValuesFrom ce) {
673        }
674
675        /* (non-Javadoc)
676         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataAllValuesFrom)
677         */
678        @Override
679        public void visit(OWLDataAllValuesFrom ce) {
680        }
681
682        /* (non-Javadoc)
683         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataHasValue)
684         */
685        @Override
686        public void visit(OWLDataHasValue ce) {
687        }
688
689        /* (non-Javadoc)
690         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataMinCardinality)
691         */
692        @Override
693        public void visit(OWLDataMinCardinality ce) {
694        }
695
696        /* (non-Javadoc)
697         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataExactCardinality)
698         */
699        @Override
700        public void visit(OWLDataExactCardinality ce) {
701        }
702
703        /* (non-Javadoc)
704         * @see org.semanticweb.owlapi.model.OWLClassExpressionVisitor#visit(org.semanticweb.owlapi.model.OWLDataMaxCardinality)
705         */
706        @Override
707        public void visit(OWLDataMaxCardinality ce) {
708        }
709
710        /* (non-Javadoc)
711         * @see org.semanticweb.owlapi.model.OWLIndividualVisitor#visit(org.semanticweb.owlapi.model.OWLAnonymousIndividual)
712         */
713        @Override
714        public void visit(OWLAnonymousIndividual individual) {
715        }
716        
717        /* (non-Javadoc)
718         * @see org.semanticweb.owlapi.model.OWLAnnotationAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLAnnotationAssertionAxiom)
719         */
720        @Override
721        public void visit(OWLAnnotationAssertionAxiom axiom) {
722        }
723
724        /* (non-Javadoc)
725         * @see org.semanticweb.owlapi.model.OWLAnnotationAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLSubAnnotationPropertyOfAxiom)
726         */
727        @Override
728        public void visit(OWLSubAnnotationPropertyOfAxiom axiom) {
729        }
730
731        /* (non-Javadoc)
732         * @see org.semanticweb.owlapi.model.OWLAnnotationAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLAnnotationPropertyDomainAxiom)
733         */
734        @Override
735        public void visit(OWLAnnotationPropertyDomainAxiom axiom) {
736        }
737
738        /* (non-Javadoc)
739         * @see org.semanticweb.owlapi.model.OWLAnnotationAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLAnnotationPropertyRangeAxiom)
740         */
741        @Override
742        public void visit(OWLAnnotationPropertyRangeAxiom axiom) {
743        }
744
745        /* (non-Javadoc)
746         * @see org.semanticweb.owlapi.model.OWLAxiomVisitor#visit(org.semanticweb.owlapi.model.OWLDeclarationAxiom)
747         */
748        @Override
749        public void visit(OWLDeclarationAxiom axiom) {
750                add(axiom);
751        }
752}