// entities). The first is by specifying the full IRI. First we create
// an IRI object:
IRI iri = IRI
.create("http://www.semanticweb.org/owlapi/ontologies/ontology#A");
// Now we create the class
OWLClass clsAMethodA = factory.getOWLClass(iri);
// The second is to use a prefix manager and specify abbreviated IRIs.
// This is useful for creating lots of entities with the same prefix
// IRIs. First create our prefix manager and specify that the default
// prefix IRI (bound to the empty prefix name) is
// http://www.semanticweb.org/owlapi/ontologies/ontology#
PrefixManager pm = new DefaultPrefixManager(null, null,
"http://www.semanticweb.org/owlapi/ontologies/ontology#");
// Now we use the prefix manager and just specify an abbreviated IRI
OWLClass clsAMethodB = factory.getOWLClass(":A", pm);
// Note that clsAMethodA will be equal to clsAMethodB because they are
// both OWLClass objects and have the same IRI. Creating entities in the
// above manner does not "add them to an ontology". They are merely
// objects that allow us to reference certain objects (classes etc.) for
// use in class expressions, and axioms (which can be added to an