rdf - 如何在 Protege 中添加匿名个人?

标签 rdf owl protege

我想使用空白节点在 Protege 中添加一条语句。例如,如果我将其表示为 Turtle RDF,则它将是 something like :

[
  rdf:type rdf:Statement ;   #this anonymous resource is a Statement... 
  rdf:subject ex:Paul ;      #...with subject Paul
  rdf:predicate ex:running ; #...predicate running
  rdf:object "10miles" ;     #...and object "10miles"
  ex:hasPeriodStart "2018-04-09T10:00:00"^^xsd:dateTime ;
  ex:hasPeriodEnd "2018-04-09T12:00:00"^^xsd:dateTime ;
].

有没有办法在 Protege 中做类似的事情(无需创建具有 IRI 的命名个体)?

最佳答案

Protege 不支持空白节点。实现类似目标的一种方法是为空白节点分配临时/单独的命名空间。我会给你一个例子来说明我的意思。假设我有以下海龟语法(我保留了前缀以保持简短),

:jane :firstname   "Jane";
      :lastname    "Doe";
      :contactInfo [:phonenumber "011 739 4751";
                    :email       "janedoe@examples.com"] .

然后

[:phonenumber "011 739 4751";
 :email       "janedoe@examples.com"] 

是一个空白节点。这可以使用空白节点 _:janeContactInfo 重写,如下所示:

:jane :firstname   "Jane";
      :lastname    "Doe";
      : contactInfo _:janeContactInfo .

 _:janeContactInfo :phonenumber "011 739 4751";
                   :email       "janedoe@examples.com" .

这可以用曼彻斯特语法(这是 Protege 中使用的语法)表示为:

ObjectProperty: contactInfo 
DataProperty: firstname
DataProperty: lastname
DataProperty: phonenumber
DataProperty: email

Individual: jane
Facts:
  ex:firstname, "Jane",
  ex:lastname, "Doe", 
  ex:contactInfo, _janeContactInfo

Individual: _janeContactInfo
Facts:
   ex:phonenumber, "011 739 4751"
   ex:email, "janedoe@examples.com"  

如果需要,您可以将 janeContactInfo 个体放置在临时/单独的命名空间中。

关于rdf - 如何在 Protege 中添加匿名个人?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58979778/

相关文章:

sparql如何根据日期范围进行过滤

java - Protege OWL API 使用 URI 加载本体

semantic-web - 在 OWL 中声明一个空类

rdf - SPARQL 查询 : How I get only a literal or string as result?

c - 如何检查两个RDF图是否具有相同的内容?

rdf - 在 OWL 中使用排除依据

rdf - 有没有可以可视化 RDF 图的工具? (请附上屏幕截图)

java - Protégé OWL API 编程

syntax - 如何定义rdfs :range target in a list of possibilities?

owl - Protege 4.3中不提供父类(super class)头