以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  寻求JENA中检索到类的上下位的函数!!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=28477)


--  作者:mahongfu
--  发布时间:3/12/2006 11:37:00 AM

--  寻求JENA中检索到类的上下位的函数!!
各位同仁!!
  我在建立一个语义检索系统!!
  是从我建立的本体中(owl格式的文件)检索出这个概念的上下位,而不是就是那一个!!这个函数我怎么没有在jena中找到,谁知道,tell me !!
thanks a lot!!
--  作者:mahongfu
--  发布时间:3/12/2006 3:27:00 PM

--  
而且是不是基于jena的语义检索不能检索到中文字符?要是这样的话,那可就不好办了!!
--  作者:jpz6311whu
--  发布时间:3/12/2006 3:35:00 PM

--  
1、把你的owl文件全部贴出来
2、jena可以处理中文字符
--  作者:mahongfu
--  发布时间:3/12/2006 9:26:00 PM

--  
<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns="http://www.owl-ontologies.com/unnamed.owl#"
  xml:base="http://www.owl-ontologies.com/unnamed.owl">
  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:ID="车削加工">
    <owl:disjointWith>
      <owl:Class rdf:ID="拉削加工"/>
    </owl:disjointWith>
    <owl:disjointWith>
      <owl:Class rdf:ID="钻削加工"/>
    </owl:disjointWith>
    <owl:disjointWith>
      <owl:Class rdf:ID="磨削加工"/>
    </owl:disjointWith>
    <rdfs:subClassOf>
      <owl:Class rdf:ID="传统切削加工"/>
    </rdfs:subClassOf>
    <rdfs:comment rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
    >工件旋转为主运动,车刀直行为进给运动的切削加工方法.</rdfs:comment>
    <owl:disjointWith>
      <owl:Class rdf:ID="铣削加工"/>
    </owl:disjointWith>
    <owl:disjointWith>
      <owl:Class rdf:ID="镗削加工"/>
    </owl:disjointWith>
    <owl:disjointWith>
      <owl:Class rdf:ID="刨削和插削加工"/>
    </owl:disjointWith>
  </owl:Class>
  <owl:Class rdf:ID="车削加工方法">
    <rdfs:subClassOf rdf:resource="#车削加工"/>
  </owl:Class>
  <owl:Class rdf:ID="转塔式六角车床">
    <owl:disjointWith>
      <owl:Class rdf:ID="立式车床"/>
    </owl:disjointWith>
    <owl:disjointWith>
      <owl:Class rdf:ID="端面车床"/>
    </owl:disjointWith>
    <rdfs:subClassOf>
      <owl:Class rdf:ID="车库类型"/>
    </rdfs:subClassOf>
    <owl:disjointWith>
      <owl:Class rdf:ID="普通卧式车床"/>
    </owl:disjointWith>
  </owl:Class>
  <owl:Class rdf:ID="超声波加工">
    <owl:disjointWith>
      <owl:Class rdf:ID="电子束加工"/>
    </owl:disjointWith>

太多了,我给一部分吧!! 你看看这个怎么处理?
谢谢!!


--  作者:mahongfu
--  发布时间:3/12/2006 9:33:00 PM

--  
这个是不是不能贴图片?要不我把用protege建立的树形结构传上来。
--  作者:jpz6311whu
--  发布时间:3/13/2006 9:30:00 AM

--  
如果你说的“上位词”和“下位词”是针对Class的,那么jena提供这样的api:

com.hp.hpl.jena.ontology
Interface OntClass
OntClass getSubClass()
          Answer a class that is the sub-class of this class.
OntClass getSuperClass()
          Answer a class that is the super-class of this class.


--  作者:mahongfu
--  发布时间:3/13/2006 2:48:00 PM

--  
对对,找的就是这个,呵呵,非常感谢阿!! 我琢磨琢磨!!
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms