以文本方式查看主题 - 计算机科学论坛 (http://bbs.xml.org.cn/index.asp) -- 『 Semantic Web(语义Web)/描述逻辑/本体 』 (http://bbs.xml.org.cn/list.asp?boardid=2) ---- 为什么用jena api编的程序运行时需要连网? (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=25974) |
-- 作者:xirufeng -- 发布时间:12/29/2005 9:21:00 AM -- 为什么用jena api编的程序运行时需要连网? 两个程序还有本体文件见附件 ![]() ![]() ![]() ![]() ![]() ![]() |
-- 作者:jpz6311whu -- 发布时间:12/29/2005 12:13:00 PM -- jena本身是基于java的,当然C/S或B/S都可以啦 你用的那个程序思路是java生成javascript的Dtree的API,最终还是要在Browser里面浏览才看得到的,如果只是在Console里面运行,最多输出的是javascript代码 |
-- 作者:xirufeng -- 发布时间:12/29/2005 3:50:00 PM -- 我不是这个意思 你有空的话,看看我的程序 没有涉及到什么树,我这两个程序只是从owl本体中抽取信息而已 可是如果网络不通的话,会打印异常,说网络没连接上,好象是名字空间的问题。如果通的话,则不会 但两者均会打印出要抽取的信息。 还有一个问题,就是我所写的树的信息的数据结构只有四个域——接点ID,父接点ID,接点NAME,还有一个URI,但是下的DTree.js却有好多个域。那Dtree文件用改么 |
-- 作者:jpz6311whu -- 发布时间:12/29/2005 5:36:00 PM -- 你把报错的详细信息贴出来看看 |
-- 作者:xirufeng -- 发布时间:12/29/2005 6:22:00 PM -- WARN [main] (OntDocumentManager.java:1004) - An error occurred while attempting to read from <http://protege.stanford.edu/plugins/owl/protege> (re-directed via the document mgr from <http://protege.stanford.edu/plugins/owl/protege>). Error was 'rethrew: protege.stanford.edu'. java.net.UnknownHostException: protege.stanford.edu at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:386) at sun.net.www.http.HttpClient.openServer(HttpClient.java:602) at sun.net.www.http.HttpClient.<init>(HttpClient.java:303) at sun.net.www.http.HttpClient.<init>(HttpClient.java:264) at sun.net.www.http.HttpClient.New(HttpClient.java:336) at sun.net.www.http.HttpClient.New(HttpClient.java:317) at sun.net.www.http.HttpClient.New(HttpClient.java:312) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne ction.java:481) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:472) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:574) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLCon nection.java:1169) at java.net.URLConnection.getContentEncoding(URLConnection.java:392) at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.j ava:968) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImport(OntDocumentMan ager.java:919) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentMa nager.java:686) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentMa nager.java:635) at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:187 2) at TreeUtil.retrieveNodeInfos(TreeUtil.java:36) at TreeUtil.main(TreeUtil.java:93) com.hp.hpl.jena.shared.JenaException: rethrew: protege.stanford.edu at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.j ava:978) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImport(OntDocumentMan ager.java:919) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentMa nager.java:686) at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentMa nager.java:635) at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:187 2) at TreeUtil.retrieveNodeInfos(TreeUtil.java:36) at TreeUtil.main(TreeUtil.java:93) Caused by: java.net.UnknownHostException: protege.stanford.edu at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153) at java.net.Socket.connect(Socket.java:426) at java.net.Socket.connect(Socket.java:376) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.HttpClient.openServer(HttpClient.java:386) at sun.net.www.http.HttpClient.openServer(HttpClient.java:602) at sun.net.www.http.HttpClient.<init>(HttpClient.java:303) at sun.net.www.http.HttpClient.<init>(HttpClient.java:264) at sun.net.www.http.HttpClient.New(HttpClient.java:336) at sun.net.www.http.HttpClient.New(HttpClient.java:317) at sun.net.www.http.HttpClient.New(HttpClient.java:312) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne ction.java:481) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:472) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:574) at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLCon nection.java:1169) at java.net.URLConnection.getContentEncoding(URLConnection.java:392) at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.j ava:968) |
-- 作者:xirufeng -- 发布时间:12/29/2005 6:23:00 PM -- 还有一个问题,就是我所写的树的信息的数据结构只有四个域——接点ID,父接点ID,接点NAME,还有一个URI,但是下的DTree.js却有好多个域。那Dtree文件用改么 |
-- 作者:jpz6311whu -- 发布时间:12/29/2005 8:10:00 PM -- JavaScript is forgiving about matching the number of parameters in the function definition with the number of parameters passed along from the calling statement. If you define a function with three parameters and the calling statement specifies only two, the third parameter variable value in that function is assigned a null value. 前面那个上网的问题是没有做镜像: A strength of working with ontologies is that we can reuse work done by other ontologists by importing their published ontologies. Often, however, this means that the ontology is only retrievable by traversing an Internet firewall. Even if this is possible, by using an HTTP proxy, it may impose unacceptable delay in loading an application. In the worst case, an ontology on which our application depends is temporarily or permanently unavailable from the original published URL. To assist with this common problem, the ontology document manager allows a local indirection, so that an attempt to import a document from a given published URL means that a local copy of the document is retrieved instead. This may be a file copy or simply duplicated on an internal mirror web site. To specify this local redirection in the policy file, we use the following declarations: <OntologySpec> Specifying prefixes Caching models To turn model caching on or off, use the policy property cacheModels, or call the method setCacheModels( boolean caching ). The default is caching on. The document manager's current model cache can be cleared at any time by calling clearCache(). Example OntModel m = ModelFactory.createOntologyModel(); |
-- 作者:xirufeng -- 发布时间:12/29/2005 9:13:00 PM -- http://www.xfront.com/owl/ontologies/camera/ 这个怎么确定? |
-- 作者:jpz6311whu -- 发布时间:12/30/2005 12:52:00 PM -- 什么怎么确定??? 不明白你问什么?? |
-- 作者:xirufeng -- 发布时间:12/30/2005 2:01:00 PM -- 呵呵,已经解决了,谢谢这位热心师兄! |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
125.000ms |