RDF Schema - how to create instances?

六月ゝ 毕业季﹏ 提交于 2019-12-06 06:29:04

The instance can be defined within the class definition as:

<ex:Turns rdf:about="http://example.org/ex1#Turns_Instance">
   <ex:hasTurns>
      <ex:Turns_Frequency rdf:about="http://example.org/ex1#Turns_Frequency_Instance"/>
   </ex:hasTurns>
</ex:Turns>

Note also that range definitions belong on property definitions, not class definitions. So the the real bug may be using the RDF/XML text serialization. Any RDF editor should be able to consume and generate Turtle, which is human readable. In that case the class and instance definition look like the following:

@prefix ex: <http://example.org/ex1#> .

ex:Turns
  rdf:type owl:Class .
ex:Turns_Instance
  rdf:type ex:Turns ;
  ex:hasTurns ex:Turns_Frequency_instance .
ex:Device
  rdf:type owl:Class .
ex:Turns_Frequency
  rdf:type owl:Class .
ex:hasTurns
  rdf:type owl:ObjectProperty ;
  rdfs:domain ex:Turns ;
  rdfs:range ex:Turns_Frequency .

In addition to being able to easily "see" the triples, RDF as an object representation become much clearer, which is a huge advantage for understanding how RDF works.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!