以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  [求助]  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=73823)


--  作者:smiles
--  发布时间:4/3/2009 3:05:00 PM

--  [求助]
我的本体文件是 <?xml version="1.0" encoding="GB2312" ?>
- <rdf:RDF xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:profile="http://www.daml.org/services/owl-s/1.1/profile.owl#" xmlns:service="http://www.daml.org/services/owl-s/1.1/Service.owl#" xmlns:grounding="http://www.daml.org/services/owl-s/1.1/grounding.owl#" xml:base="http://127.0.0.1/queries/1.1/portlet_payload_service.owl">
- <owl:Ontology rdf:about="">
  <owl:imports rdf:resource="http://www.daml.org/services/owl-s/1.1/Service.owl" />
  <owl:imports rdf:resource="http://www.daml.org/services/owl-s/1.1/Process.owl" />
  <owl:imports rdf:resource="http://www.daml.org/services/owl-s/1.1/Profile.owl" />
  <owl:imports rdf:resource="http://www.daml.org/services/owl-s/1.1/Grounding.owl" />
  <owl:imports rdf:resource="http://127.0.0.1/ontology/portlets.owl" />
  <owl:imports rdf:resource="http://127.0.0.1/ontology/payload.owl" />
  </owl:Ontology>
- <service:Service rdf:ID="PORTLET_PAYLOAD_SERVICE">
  <service:presents rdf:resource="#PORTLET_PAYLOAD_PROFILE" />
  <service:describedBy rdf:resource="#PORTLET_PAYLOAD_PROCESS_MODEL" />
  <service:supports rdf:resource="#PORTLET_PAYLOAD_GROUNDING" />
  </service:Service>
- <profile:Profile rdf:ID="PORTLET_PAYLOAD_PROFILE">
  <service:isPresentedBy rdf:resource="#PORTLET_PAYLOAD_SERVICE" />
  <profile:serviceName xml:lang="en">portletID</profile:serviceName>
  <profile:serviceCategory>负荷显示</profile:serviceCategory>
  <profile:textDescription xml:lang="en">return payload of a portlet</profile:textDescription>
  <profile:hasInput>最高负荷</profile:hasInput>
  <profile:hasOutput rdf:resource="#_PAYLOAD" />
  <profile:has_process rdf:resource="PORTLET_PAYLOAD_PROCESS" />
  </profile:Profile>
  </rdf:RDF>
我想取出serviceName=portletID、serviceCategory=负荷显示、hasInput=最高负荷
等等,怎么才能做到。急的很,多谢谢
--  作者:jpz6311whu
--  发布时间:4/3/2009 5:34:00 PM

--  
把PORTLET_PAYLOAD_PROFILE这个本体实例找到,然后找它的相应的属性即可
--  作者:smiles
--  发布时间:4/6/2009 3:40:00 PM

--  谢谢你
能说清楚点?就是在JAVA中怎样实现,谢谢二楼的
--  作者:jpz6311whu
--  发布时间:4/7/2009 1:15:00 PM

--  
楼主学一下jena、protege owl api或者KAON2吧,随便哪个都能很容易解析出来
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms