// :hasAge data property to 18 or more we specify its range as this data
// range
PrefixManager pm = new DefaultPrefixManager(null, null,
"http://www.semanticweb.org/ontologies/dataranges#");
OWLDataProperty hasAge = factory.getOWLDataProperty(":hasAge", pm);
OWLDataPropertyRangeAxiom rangeAxiom = factory
.getOWLDataPropertyRangeAxiom(hasAge, integerGE18);
OWLOntology ontology = manager.createOntology(IRI
.create("http://www.semanticweb.org/ontologies/dataranges"));
// Add the range axiom to our ontology
manager.addAxiom(ontology, rangeAxiom);