问题标签 [virtuoso]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - Virtuoso Jena Provider Construct Query Error
My problem is similar to the one asked on this question: Is there a differense between a CONSTRUCT queries sent to a virtuoso endpoint and one sent to a Jena one?
I am using Virtuoso opensource as my graphstore and using the jena provider in order to access the data in that graphstore. I am doing several querys and everything is working fine (except for the amazing amount of memory and time that takes every inference with virtuoso but that should go in another question...).
The problem came when I tried to generate a model using a construct query. I have try using the VirtuosoQueryExecutionFactory
and the query as string and the default QueryExecutionFactory
with the query factory:
And
The query gives the expected result in the sparql endpoint but an empty model when querying in the code.
Gives the following output:
The model where I execute the querys is not empty and I did the same query from the sparql endpoint, as I said, recieving the spected results.
Anyone know where could be the mistake?
Thanks.
Daniel.
EDIT: Here is the query I am trying to execute.
As you can see, the query tries to construct a graph with all the nodes the user is linked to with a depth of max five relationships and the nodes that are linked to the user with a depth of max two relationships.
rdf - sparql 属性路径和联合
我正在尝试在 UNION 运算符的两侧使用 SPARQL 属性路径:
但我收到了一个 Virtuoso 错误:
变量 '_::trans_subj_14_0' 用于查询的子表达式但未分配
但是,如果我在任一侧省略加号,则查询有效。例如:
或者
不幸的是,我真的很想得到两个根的叶子......谁能告诉我我做错了什么?
rdf - 针对本体验证 RDF 三元组以检查正确的结构
我是 RDF/本体的新手,在这个领域的工作方式对我来说有点不清楚。目前我对三重验证感到困扰。我仍然以关系方式思考,我首先创建一个模式,然后为了插入数据,我需要遵循该结构。
为了插入三元组,我使用 Jena,然后使用生成的字符串执行插入命令。所以这是我的问题:
有没有办法验证我生成的 RDF 三元组(当前使用 Jena)实际上是否遵循我的本体结构。
或者,当我执行插入时,有没有办法由 rdf 存储(当前 Virtuoso)通知?我做了一些搜索,发现:如何将本体导入 Virtuoso?. 这是否意味着我的三元组将根据我的本体进行检查/验证?
还发现了RDF 和 OWL 工作流问题。那里说
- 在创建了我的本体之后,我应该
- 将本体导出为 RDF,以便
- 将其导入 RDF 存储。将我的本体导入 Virtuoso(如:如何将本体导入 Virtuoso?)是否意味着步骤 1 和 2 已完成,我现在正在执行步骤 3?
jena - Virtuoso 和 Jena:大型 RDF 图加载问题
我有一个 .nt 格式的 200GB RDF 文件。我想在 Virtuoso 中加载它(使用 Virtuoso Open-Source Edition 6.1.6)。我从命令行使用 Virtuoso 批量加载程序,但运行几个小时后加载会挂起。您知道如何有效地将这个大文件加载到 Virtuoso 吗?我想快速加载它。
我还尝试从 Apache Jena 查询我的 200GB RDF 图。然而,运行 30 分钟后,它给了我一些与堆大小空间相关的错误。如果您对上述问题有任何解决方案,请告诉我。
java - 如何使用 Jena API 在 virtuoso 中加载 n-triple 文件
Jena
具有read
帮助从模型中的文件加载本体的方法。使用 virtuoso 是否有类似的东西Jena API
?
这将极大地帮助我在我已经存在的 n-triple 格式的本体存储上测试 virtuoso。
java - Java FTP Tutorial with Apache Commons Net API on a Virtuoso Server
for my program I need to be able to upload and download files to a file server for persistence. I already have an OpenLink Virtuoso Universal Server running because I want to harness it's triple store capabilities later on.
According to the specification of the server it should be possible to upload/download files via the FTP protocol. From the information I gathered I assume that I have to specify a new user that has the rights to upload files and I found a tutorial that explains how I can upload files with the Apache Commons Net API in Java (Apache Commons Net API Tutorial). After I upload a file ideally the Virtuoso server would host the file and returned an (http) URL where I can access the file while the server is running.
So my question is if someone can show me how to configure the Virtuoso Server so it is possible to upload and download files. The Virtuoso is running on localhost because I want to keep the whole program inside my development computer. I already tried uploading a file with connecting the FTPClient via:
Where "dba" is the standard administrator account that is shipped with the Virtuoso server. This code refuses to connect and I get a ConnectException
The server is running but it won't connect to it. I can access the admin console via localhost:8890 so I assume the server is running.
I a novice regarding ftp-servers so please keep your answer simple. That is also the reason why I don't understand the documentation on the Virtuoso home page regarding their FTP features. Please help me to understand this topic.
If you think anything is wrong with my approach to use the Virtuoso Server please let me know.
Thank you for your effort.
Greetings
rdf - 为什么在使用 PREFIX 时 SPARQL 查询中不允许转义字符?
以下查询抛出Virtuoso 37000 Error SP030: SPARQL compiler, line 0: Bad character '%' (0x25) in SPARQL expression at '%'
虽然这个(原谅双关语)语义相同的查询不
为什么在前缀标识符中不允许使用 URL 转义字符,但在给出完整 IRI 时却允许?
switch-statement - 想知道 Virtuoso 的数据库提交持久性 - 开关设置?)
我正在运行/测试 openlinksw.com Virtuoso 数据库服务器,并注意到一些奇怪的事情——似乎没有事务日志记录。可能需要设置一个开关/参数以启用单个提交/事务的日志记录,但我在文档中没有找到。我有一个看起来像这样的脚本:
19,978 个输入文件中的每一个都包含 50 个四边形。
我跑了:
在它运行时,我运行了“vmstat 1”。该脚本大约需要 4 分钟才能完成,其速率约为每秒 83 次提交。但是,vmstat 的“bo”(阻塞)列仅偶尔显示磁盘 i/o。大多数时候,“bo”是零,偶尔会爆发一些活动。我希望,对于每个提交是持久的,每次提交必须至少有少量的 i/o 用于事务日志记录。难道我做错了什么?我正在使用默认的数据库参数。
vmstat 1 输出示例:
运行版本:7.1 64-bit linux
java - 使用 Virtuoso 进行 sparql 查询中的不合逻辑问题
经过数小时的调试,我在这里写..以下代码没有
问题出现在else if
语句中,因为无论我在链接中声明的列表中有多少项,执行结束时的结果集都是空的。例如,如果我在链接中输入&terminology=test这将转换为:
有趣的是,在端点上运行该 sparql 查询确实会返回结果。只有在eclipse中运行它时,它才不会!
也不能说语句之后的代码中有任何错误,else
因为语句使用了相同的代码if
并且它运行正常。
java - 使用 Sesame 处理 SPARQL/XML 流(来自 Vitruoso 的输出)
我有一个 SPARQL/XML 结果流(恰好是从 Virtuoso 服务器返回的),我想在结果从 http 连接返回时对其进行处理。
Sesame 有一个非常好的库来执行此操作 - 假设您说的是完整的 Sesame,这很容易而且我已经实现了。但是,我没有让 Sesame 生成请求,而是通过一个不同的 HTTP 连接来执行它,该连接不讲完整的 Sesame,而且我不知道让 Sesame 库执行此操作的直接方法。
使用 Sesame,您可以使用RepositoryConnection
create a TupleQuery
with.prepareTupleQuery
然后传递.evaluate
解决方案处理程序(扩展的东西TupleQueryResultHandlerBase
)。
我假设引擎盖下有一些类,我可以传递解决方案处理程序和一个InputStream
to 并让 Sesame 类负责解析、缓冲和进行回调等。当然代码在那里,但我我已经在源头中涉水了好几个小时,似乎我在绕圈子。
如果有另一个库或解决方案也很好,我很乐意接受指针,但我想我会利用我的其他芝麻相关代码。