以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  vcard.getRequiredProperty怎么老是编译通不过  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=56061)


--  作者:30983638
--  发布时间:11/27/2007 11:29:00 AM

--  vcard.getRequiredProperty怎么老是编译通不过
我按照An Introduction to RDF and the Jena RDF API译文一步步做,遇到很多问题,如在Tutorial06中:        Resource name = (Resource) vcard.getRequiredProperty(VCARD.N)
                                        .getObject();老是编译出错

Exception in thread "main" com.hp.hpl.jena.shared.PropertyNotFoundException: http://www.w3.org/2001/vcard-rdf/3.0#N
 at com.hp.hpl.jena.rdf.model.impl.ModelCom.getRequiredProperty(ModelCom.java:1016)
 at com.hp.hpl.jena.rdf.model.impl.ResourceImpl.getRequiredProperty(ResourceImpl.java:143)
 at jena.examples.rdf.Tutorial06.main(Tutorial06.java:42)

[此贴子已经被作者于2007-11-28 12:26:38编辑过]

--  作者:jpz6311whu
--  发布时间:11/27/2007 11:43:00 AM

--  
我们提供了一个小型RDF/XML形式的vcard的数据库

--
这个有问题,你可以把它上传到论坛上来看看


--  作者:30983638
--  发布时间:11/28/2007 12:02:00 PM

--  
我按照An Introduction to RDF and the Jena RDF API译文一步步做,遇到很多问题,如在Tutorial06中:        Resource name = (Resource) vcard.getRequiredProperty(VCARD.N)
                                        .getObject();老是编译出错


Exception in thread "main" com.hp.hpl.jena.shared.PropertyNotFoundException: http://www.w3.org/2001/vcard-rdf/3.0#N
 at com.hp.hpl.jena.rdf.model.impl.ModelCom.getRequiredProperty(ModelCom.java:1016)
 at com.hp.hpl.jena.rdf.model.impl.ResourceImpl.getRequiredProperty(ResourceImpl.java:143)
 at jena.examples.rdf.Tutorial06.main(Tutorial06.java:42)


--  作者:jpz6311whu
--  发布时间:11/28/2007 12:11:00 PM

--  
这个不是编译出错,是运行时的报错
vc-db-1.rdf这个本体读进去了没有?
--  作者:30983638
--  发布时间:11/28/2007 12:29:00 PM

--  
那个我用smlspy弄好了,这个不知道怎么会事?
我按照An Introduction to RDF and the Jena RDF API译文一步步做,遇到很多问题,如在Tutorial06中:        Resource name = (Resource) vcard.getRequiredProperty(VCARD.N)
                                        .getObject();老是编译出错


Exception in thread "main" com.hp.hpl.jena.shared.PropertyNotFoundException: http://www.w3.org/2001/vcard-rdf/3.0#N
at com.hp.hpl.jena.rdf.model.impl.ModelCom.getRequiredProperty(ModelCom.java:1016)
at com.hp.hpl.jena.rdf.model.impl.ResourceImpl.getRequiredProperty(ResourceImpl.java:143)
at jena.examples.rdf.Tutorial06.main(Tutorial06.java:42)


--  作者:jpz6311whu
--  发布时间:11/29/2007 10:24:00 PM

--  
--
这个不是编译出错,是运行时的报错
vc-db-1.rdf这个本体读进去了没有?
--
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms