以文本方式查看主题

-  中文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=75042)


--  作者:mihn
--  发布时间:5/24/2009 9:45:00 PM

--  怎么显示所有属性名啊?(不显示前缀)
代码如下:
 InputStream in=FileManager.get().open(filename);   //filename 是本体文件
 OntModel model=ModelFactory.createOntologyModel();
 model.read(in, "");
 ExtendedIterator properties=model.listOntProperties();
 String string_2="";
 while(properties.hasNext()){
  string_2=string_2+properties.next().toString()+"\n";
 }
 jTextArea1.setText(string_2);
显示的结果是 :
http://www.w3.org/1999/02/22-rdf-syntax-ns#first
http://www.w3.org/1999/02/22-rdf-syntax-ns#object
http://www.w3.org/1999/02/22-rdf-syntax-ns#subject
http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate
http://www.w3.org/1999/02/22-rdf-syntax-ns#rest
http://www.w3.org/2000/01/rdf-schema#seeAlso
http://www.w3.org/2000/01/rdf-schema#isDefinedBy
http://www.w3.org/2000/01/rdf-schema#subClassOf
http://www.w3.org/2000/01/rdf-schema#domain
http://www.w3.org/2000/01/rdf-schema#subPropertyOf
http://www.w3.org/2000/01/rdf-schema#range
http://www.w3.org/2000/01/rdf-schema#comment
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/2000/01/rdf-schema#label
http://www.owl-ontologies.com/Ontology1242798960.owl#eated
http://www.owl-ontologies.com/Ontology1242798960.owl#eat


我只想显示属性名称,不显示前缀,例如  
first
object
......

有哪位高手指点下啊,在下万分感谢!


--  作者:Lexxuan
--  发布时间:5/24/2009 10:07:00 PM

--  
请参考帖子http://bbs.w3china.org/dispbbs.asp?boardID=2&ID=74689的回复,特别是最后一段
--  作者:mihn
--  发布时间:5/25/2009 8:59:00 AM

--  
太感谢了,问题解决!
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
31.250ms