Ejemplo n.º 1
0
 @Override
 public void visit(OWLDisjointClassesAxiom axiom) {
   if (axiom.getClassExpressions().size() != 2) {
     for (OWLClassExpression left : axiom.getClassExpressions()) {
       for (OWLClassExpression right : axiom.getClassExpressions()) {
         if (left != right) {
           if (left.equals(subject)) {
             left.accept(this);
             writeSpace();
             write(SUBCLASS);
             writeSpace();
             write(NOT);
             writeSpace();
             right.accept(this);
           } else {
             right.accept(this);
             writeSpace();
             write(SUBCLASS);
             writeSpace();
             write(NOT);
             writeSpace();
             left.accept(this);
           }
           writer.writeNewLine();
         }
       }
     }
   } else {
     Iterator<OWLClassExpression> it = axiom.getClassExpressions().iterator();
     OWLClassExpression descA = it.next();
     OWLClassExpression descB = it.next();
     OWLClassExpression lhs;
     OWLClassExpression rhs;
     if (descA.equals(subject)) {
       lhs = descA;
       rhs = descB;
     } else {
       lhs = descB;
       rhs = descA;
     }
     lhs.accept(this);
     writeSpace();
     write(SUBCLASS);
     writeSpace();
     write(NOT);
     writeSpace();
     rhs.accept(this);
   }
 }
Ejemplo n.º 2
0
 private void writeCloseBrace() {
   writer.writeCloseBrace();
 }
Ejemplo n.º 3
0
 private void write(Object o) {
   writer.write(o);
 }
Ejemplo n.º 4
0
 private void writeOpenBrace() {
   writer.writeOpenBrace();
 }
Ejemplo n.º 5
0
 private void writeSpace() {
   writer.writeSpace();
 }