Thanks Dave, I managed to solve my problem by using the following code to add needed triples:

MaxCardinalityRestriction restriction = model.createMaxCardinalityRestriction(null, existingDataProperty, 1);
restriction.addLiteral(OWL2.maxQualifiedCardinality, 1);
restriction.addProperty(OWL2.onDataRange, XSD.xstring);

Best regards,


On 9.10.2016. 18:17, Dave Reynolds wrote:

As that quote says, Jena doesn't support OWL 2 which is where DataRange is defined.

That just means there's not convenience functions but you can still achieve the desired affect by working at the RDF level, it's just verbose. Look up the OWL 2 specs to see what RDF triples are needed to represent your desired DataRange, then use the general Model API to assert those triples.


Reply via email to