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.removeAll(OWL.cardinality);
restriction.addLiteral(OWL2.maxQualifiedCardinality, 1);
restriction.addProperty(OWL2.onDataRange, XSD.xstring);
itemClass.addSuperClass(restriction);

Best regards,

Darko


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.

Dave



Reply via email to