I have an ontology file developed with Protege that I need to convert into MySQL database to represent it on a website. Could you please suggest me the easiest way to do that?
I tried to follow Protege's wiki, but no success.
https://protegewiki.stanford.edu/wiki/ConvertToDBScript
I am constantly getting an error, even though I've tried to change build config ,so patches match windows "\" slash.
Thanks in advance
enter code here
<?xml version = "1.0" encoding = "utf-8"?>
<project name = "Convert OWL to DB" default = "run">
<property file="convert.properties"/>
<property name = "owl.path" value = "edu.stanford.smi.protegex.owl"/>
<property name = "owl.plugin.path" value = "${protege.home}\plugins\${owl.path}"/>
<!--
# ********** Finding Protege Libraries. *************
-->
<target name="checkProtegeHome">
<condition property="protege.home.set">
<available file="${protege.home}\protege.jar" type="file"/>
</condition>
</target>
<target name="useProtegeHome" depends="checkProtegeHome" if="protege.home.set">
<echo message="Using Protege Home = ${protege.home} to find protege jars"/>
<property name="protege.lib" value="${protege.home}\protege.jar"/>
<property name="protege.owl.lib" value="${protege.home}\plugins\${owl.path}\protege-owl.jar"/>
</target>
<target name = "checkProtegeLibs" depends="useProtegeHome">
<condition property="libs.found">
<and>
<available file="${protege.lib}" type = "file"/>
<available file="${protege.owl.lib}" type = "file"/>
</and>
</condition>
<path id = "project.classpath">
<pathelement location = "${protege.lib}"/>
<pathelement location = "${protege.home}\driver.jar"/>
<fileset dir="${owl.plugin.path}"/>
<pathelement location = "convertToDb.jar"/>
</path>
</target>
<target name="checkProtegeLibsAndReport" depends="checkProtegeLibs"
unless="libs.found">
<echo message="Missing protege libraries. You need to set "/>
<echo message="the PROTEGE_HOME environment variable to a"/>
<echo message="protege installation directory where the"/>
<echo message="appropriate plugins have been installed."/>
<echo message="Alternatively set the jar libs in local.properties (protege.lib=...)"/>
<echo message="Use the -v option to ant to see what jars are missing."/>
<fail message = "missing protege libraries"/>
</target>
<target name="run" depends="checkProtegeLibsAndReport">
<java
fork="true"
dir="${protege.home}"
classname="edu.stanford.smi.protegex.util.ConvertToDb"
maxmemory="${heap.size.max}">
<classpath refid = "project.classpath"/>
<arg value="${convert.mode}"/>
<arg value="${owl.file}"/>
<arg value="${db.driver}"/>
<arg value="${db.url}"/>
<arg value="${db.table}"/>
<arg value="${db.user}"/>
<arg value="${db.password}"/>
</java>
</target>
</project>