Hi,

I have one urgent problem with Apache Jena, I have posted my question on StackOverflow (http://stackoverflow.com/questions/39926809/how-to-set-data-type-for-owl-restriction-using-apache-jena?sem=2). If someone knows answer, please answer it here or on StackOverflow.

The copied question is bellow:

I am using Apache Jena. I have created the data property, its range as xsd:string and restriction that is added as a superclass to specific (already created) class:

|DatatypeProperty dataProperty = model.createDatatypeProperty(baseURI + possibleProperty); dataProperty.setRange(XSD.xstring); MaxCardinalityRestriction restriction = model.createMaxCardinalityRestriction(null, dataProperty, 1); itemClass.addSuperClass(restriction); |

When I open the generated ontology in Protege the mentioned restriction looks like:

|DataProperty_Name max 1 Literal |

My aim is to get it with included data type (that is specified in the range of the data property), e.g. I am expecting:

|DataProperty_Name max 1 string or |||DataProperty_Name max 1 decimal etc.| |

Application that uses the ontology needs to know restriction's data type. Do you maybe know what I need to change in my code to get data type (e.g. string) in the restriction instead of Literal?

Thanks, Darko


Reply via email to