OWLDatatype intDatatype = factory.getIntegerOWLDatatype();
// Create the value "18", which is an int.
OWLLiteral eighteenConstant = factory.getOWLLiteral(18);
// Now create our custom datarange, which is int greater than or equal
// to 18. To do this, we need the minInclusive facet
OWLFacet facet = MIN_INCLUSIVE;
// Create the restricted data range by applying the facet restriction
// with a value of 18 to int
OWLDataRange intGreaterThan18 = factory.getOWLDatatypeRestriction(
intDatatype, facet, eighteenConstant);
// Now we can use this in our datatype restriction on hasAge