我正在尝试使用owlim library来编辑owl本体文件。我从包含在owl库中的“入门”示例代码开始。当我在这个示例代码中使用这个库时,一切都运行得很好。它使用de owlim.ttl文件来配置存储库,该文件还包含此存储库的路径:
(owlim.ttl:)
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix rep: <http://www.openrdf.org/config/repository#>.
@prefix sr: <http://www.openrdf.org/config/repository/sail#>.
@prefix sail: <http://www.openrdf.org/config/sail#>.
@prefix owlim: <http://www.ontotext.com/trree/owlim#>.
[] a rep:Repository ;
rep:repositoryID "owlim" ;
rdfs:label "OWLIM Getting Started" ;
rep:repositoryImpl [
rep:repositoryType "openrdf:SailRepository" ;
sr:sailImpl [
owlim:ruleset "owl-horst-optimized" ;
owlim:entity-index-size "5000000" ;
owlim:cache-memory "180m" ;
sail:sailType "swiftowlim:Sail" ;
owlim:noPersist "false" ;
owlim:storage-folder "storage" ;
owlim:base-URL "http://example.org/owlim#" ;
owlim:repository-type "in-memory-repository" ;
owlim:imports "./sesame/example.rdfs" ;
owlim:defaultNS "http://example.org/owlim#" ;
]
].在documentation site上,他们明确表示:
'With the example set up, OWLIM-Lite loads two ontologies at start up as specified by the imports parameter in the repository configuration file, i.e. owlim.ttl',
但是,当我将该路径更改为另一个文件时,仍然会得到与以前一样的输出。即使我尝试更改此example.rdfs存储库中的某些内容,查询的结果也不会更改。有人知道问题出在哪里吗?是否在其他地方指定了路径?
发布于 2012-04-09 14:21:47
imports配置参数仅用于初始化具有只读模式的存储库一次。一旦创建,这些语句就无法更改,因此当您稍后修改此参数并使用旧的存储库重新启动时,您将看不到任何差异。
为了使用不同的导入模式,您必须创建一个新的存储库。
https://stackoverflow.com/questions/10057657
复制相似问题