Suppose I have an XSD file having below lines of code;

|<xsd:simpleType name="test">
    <xsd:restriction base="xsd:string">
        <xsd:maxLength value="50" />
    </xsd:restriction>
</xsd:simpleType>
|

What I am trying to do is to convert this xsd simple type into an instance of rdfs:Datatype in an ontology. Below is what I want.

|<rdfs:Datatype rdf:about="http://www.example.org/example1/#testDatatype";>
  <rdfs:subClassOf rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
  <owl:equivalentClass>
    <rdfs:Datatype>
      <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
      <owl:withRestrictions rdf:parseType="Collection">
        <rdf:Description>
          <xsd:maxLength rdf:datatype="http://www.w3.org/2001/XMLSchema#string";
          >50</xsd:maxLength>
        </rdf:Description>
      </owl:withRestrictions>
    </rdfs:Datatype>
  </owl:equivalentClass>
</rdfs:Datatype>
|

How do I do this using Jena?

Reply via email to