sparql - sparql 查询插入数据未保存在 owl
问题描述
我尝试使用来自用户寄存器的 sparql 插入数据向 owl 添加一个新用户。当我检查单个实例是否显示在浏览器中,但是当我签入 protege 时,数据没有添加,或者当我重新启动程序时,数据丢失了。
graph2 = graph.get_context(onto)
graph2.update("""
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX gr: <http://www.semanticweb.org/bentofuascarvalho/ontologies/OntoBase#>
INSERT {
gr:""" + username + """ rdf:type gr:Person.
} WHERE {}""")
如何保存新数据以在 Protege 和 python 中同步?
谢谢...!
解决方案
推荐阅读
- laravel - @apply 在 Laravel Mix 的 Vue 组件中不起作用
- tensorflow - 关于 TensorFlow Probability 的 ELBO 损失中的 KL 项的多个问题
- ruby-on-rails - 一个模型应该创建其他模型的实例吗?- 导轨 MVC
- php - 试图将用户输入传递到数据库
- angular - Appium hideKeyboard 使用 javascript
- ios - 读取数据:文件“Info.plist”无法打开,因为没有这样的文件
- javascript - 如何构建一个函数来查找被点击的 2 个特定按钮?
- javascript - 在 Handlebars 的另一个辅助函数中使用一个辅助函数的结果
- javascript - 将 JSON 对象格式化为对象数组
- ios - SwiftUI 中的 ForEach 在 Section 之间交换视图(并因此重新使用它们)而不是更新数据并尊重视图修饰符