OWLOntology o = m.createOntology();
OWLClass a = Class(IRI("http://iri/#a"));
OWLClass b = Class(IRI("http://iri/#b"));
OWLClass c = Class(IRI("http://iri/#c"));
OWLClass d = Class(IRI("http://iri/#d"));
OWLDisjointUnionAxiom axiom = DisjointUnion(a, b, c, d);
o.getOWLOntologyManager().addAxiom(o, axiom);
o.getOWLOntologyManager().addAxiom(o, Declaration(a));
o.getOWLOntologyManager().addAxiom(o, Declaration(b));
o.getOWLOntologyManager().addAxiom(o, Declaration(c));
o.getOWLOntologyManager().addAxiom(o, Declaration(d));