I want to programmatically generate an ontology using OWL by supplying a vector. My goal is to be able to open the produced OWL file in Protégé and make use of Jena.
Input Vector
The vector which i want to pass:
[[layer, network layer, data link layer, physical layer], [network, computer network], [data link], [ontology, ontology extraction]].
Expected Output
The output should have the following tree-like hierarchy structure:
layer
-network layer
-data link layer
-physical layer
network
-computer network
ontology
-ontology extraction
data link
The hierarchical structure, where network layer
is below layer
and so on, is significantly important.
This is an example of the file I want to generate:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Class rdf:about="#network"/>
<owl:Class rdf:about="#ontology"/>
<owl:Class rdf:about="#physical_layer">
<rdfs:subClassOf>
<owl:Class rdf:about="#layer"/>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:about="#data_link_layer">
<rdfs:subClassOf rdf:resource="#layer"/>
</owl:Class>
<owl:Class rdf:about="#network_layer">
<rdfs:subClassOf rdf:resource="#layer"/>
</owl:Class>
<owl:Class rdf:about="#computer_network">
<rdfs:subClassOf rdf:resource="#network"/>
</owl:Class>
<owl:Class rdf:about="#ontology_extraction">
<rdfs:subClassOf rdf:resource="#ontology"/>
</owl:Class>
</rdf:RDF>