Data property restriction in an ontology

An ontology can define a wide variety of objects, which you can define with different semantic web standards such as OWL. While there are many different ways to describe objects and relations such as subclasses and object properties I want to look at the data properties now. With that I mean is that I want to define an object with a simple data which has a restriction. An example would be "A human has an age property which cannot be negative."
1 answer

Solution in OWL

Here is an example solution on how to define a data property restriction in OWL:

DataPropertyRange>
DataProperty IRI="#has_Age"/>
Datatype abbreviatedIRI="xsd:integer"/>
FacetRestriction facet="http://www.w3.org/2001/XMLSchema#minInclusive">
Literal datatypeIRI="http://www.w3.org/2001/XMLSchema#integer">0
/FacetRestriction>
/DataPropertyRange>

in this example the data property we are looking at is called "has_Age" and we give it the properties "integer" with the third line. With the FacetRestriction in line 4 we set a minimum restriction and in line 5 we define this minimum to be 0 as a person cannot be "negative old".

edit: I had to remove all of the opening braces "<" from my solution because there was issues with the parsers.