Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php .owl本体到MySQL关系数据库的转换_Php_Mysql_Owl_Ontology_Protege - Fatal编程技术网

Php .owl本体到MySQL关系数据库的转换

Php .owl本体到MySQL关系数据库的转换,php,mysql,owl,ontology,protege,Php,Mysql,Owl,Ontology,Protege,我有一个用Protege开发的本体文件,我需要将它转换成MySQL数据库,以便在网站上表示它。你能告诉我最简单的方法吗 我试着跟随Protege的维基,但没有成功 尽管我试图更改构建配置,使补丁程序与windows“\”斜杠匹配,但我还是经常遇到错误 提前谢谢 enter code here <?xml version = "1.0" encoding = "utf-8"?> <project name = "Convert OWL to DB" default = "r

我有一个用Protege开发的本体文件,我需要将它转换成MySQL数据库,以便在网站上表示它。你能告诉我最简单的方法吗

我试着跟随Protege的维基,但没有成功

尽管我试图更改构建配置,使补丁程序与windows“\”斜杠匹配,但我还是经常遇到错误

提前谢谢

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>
在此处输入代码

。由于某种原因,我无法工作,我只看到一个空白的窗口,用于复制/粘贴错误消息。(将帮助未来的读者访问此页面。)您希望以何种方式在网页上呈现本体?我想将.owl映射到MySQL关系数据库,然后将4个主要类转换为单独的post类型,这些类型将表示其余的数据。