@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); } }
private void writeCloseBrace() { writer.writeCloseBrace(); }
private void write(Object o) { writer.write(o); }
private void writeOpenBrace() { writer.writeOpenBrace(); }
private void writeSpace() { writer.writeSpace(); }