ObjectProperty 可以有 DatatypeProperty 吗?
Can an ObjectProperty have a DatatypeProperty?
我正在尝试使用 OWL 来描述图表。假设我想要两个 类 workshop
和 location
,以及它们之间的边 hasLocation
。我可以在 hasLocation
上设置一个 属性 来表示 workshop
发生在 location
的时间吗?我尝试使用 Protege 来定义它,但似乎只能在 类.
上定义属性
你可以使用 annotations or punning.
但是,注释或数据 属性 将是 hasLocation
属性 本身 的 属性,而不是它的特殊事件。这是 RDF/OWL 和 LPG 之间的主要区别。
我建议或多或少地使用 建模技术。在海龟中:
@prefix : <http://www.semanticweb.org/1226761/ontologies/2018/10/untitled-ontology-6#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[ rdf:type owl:Ontology ] .
:Workshop rdf:type owl:Class .
:Location rdf:type owl:Class .
:SpatioTemporalExtent rdf:type owl:Class .
:hasLocation rdf:type owl:ObjectProperty ;
rdfs:domain :SpatioTemporalExtent ;
rdfs:range :Location .
:hasSpatioTemporalExtent rdf:type owl:ObjectProperty ;
rdfs:domain :Workshop ;
rdfs:range :SpatioTemporalExtent .
:hasTime rdf:type owl:DatatypeProperty ;
rdfs:domain :SpatioTemporalExtent ;
rdfs:range xsd:dateTime .
:workshop1 rdf:type owl:NamedIndividual , :Workshop ;
:hasSpatioTemporalExtent :extent11 .
:extent11 rdf:type owl:NamedIndividual , :SpatioTemporalExtent ;
:hasLocation :city1 ;
:hasTime "2018-05-11T00:00:00"^^xsd:dateTime .
:city1 rdf:type owl:NamedIndividual , :Location .
或者,匿名个人:
:workshop1 rdf:type owl:NamedIndividual , :Workshop ;
:hasSpatioTemporalExtent [rdf:type :SpatioTemporalExtent ;
:hasLocation :city1 ;
:hasTime "2018-05-11T00:00:00"^^xsd:dateTime .
] .
Do you know what is the reasoning behind not allowing properties on edges?
RDF 表示资源描述框架。它最初旨在用于在 Web 上发布数据。资源应该有 URI(好吧,除非它们是文字)。 属性 事件被认为在本体论上不够牢固,无法拥有如此强大的标识符。比如他们的数量比较多。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 ].
谓词位置中的空白节点(及其弱标识符)可以解决此问题。所以问题仍然是为什么谓词位置不允许有空白节点(即使对于 Tim Berners-Lee, though not for Manu Sporny)。
我想原因是不想永远离开一阶基础,bearing in mind 'natural' 将 a b c
三元组翻译成 FOL 就像 b(a,c)
.那么[] b c
可以翻译成∃x b(x,c)
,但是a [] c
呢?
我正在尝试使用 OWL 来描述图表。假设我想要两个 类 workshop
和 location
,以及它们之间的边 hasLocation
。我可以在 hasLocation
上设置一个 属性 来表示 workshop
发生在 location
的时间吗?我尝试使用 Protege 来定义它,但似乎只能在 类.
你可以使用 annotations or punning.
但是,注释或数据 属性 将是 hasLocation
属性 本身 的 属性,而不是它的特殊事件。这是 RDF/OWL 和 LPG 之间的主要区别。
我建议或多或少地使用
@prefix : <http://www.semanticweb.org/1226761/ontologies/2018/10/untitled-ontology-6#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
[ rdf:type owl:Ontology ] .
:Workshop rdf:type owl:Class .
:Location rdf:type owl:Class .
:SpatioTemporalExtent rdf:type owl:Class .
:hasLocation rdf:type owl:ObjectProperty ;
rdfs:domain :SpatioTemporalExtent ;
rdfs:range :Location .
:hasSpatioTemporalExtent rdf:type owl:ObjectProperty ;
rdfs:domain :Workshop ;
rdfs:range :SpatioTemporalExtent .
:hasTime rdf:type owl:DatatypeProperty ;
rdfs:domain :SpatioTemporalExtent ;
rdfs:range xsd:dateTime .
:workshop1 rdf:type owl:NamedIndividual , :Workshop ;
:hasSpatioTemporalExtent :extent11 .
:extent11 rdf:type owl:NamedIndividual , :SpatioTemporalExtent ;
:hasLocation :city1 ;
:hasTime "2018-05-11T00:00:00"^^xsd:dateTime .
:city1 rdf:type owl:NamedIndividual , :Location .
或者,匿名个人:
:workshop1 rdf:type owl:NamedIndividual , :Workshop ;
:hasSpatioTemporalExtent [rdf:type :SpatioTemporalExtent ;
:hasLocation :city1 ;
:hasTime "2018-05-11T00:00:00"^^xsd:dateTime .
] .
Do you know what is the reasoning behind not allowing properties on edges?
RDF 表示资源描述框架。它最初旨在用于在 Web 上发布数据。资源应该有 URI(好吧,除非它们是文字)。 属性 事件被认为在本体论上不够牢固,无法拥有如此强大的标识符。比如他们的数量比较多。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。 ].
谓词位置中的空白节点(及其弱标识符)可以解决此问题。所以问题仍然是为什么谓词位置不允许有空白节点(即使对于 Tim Berners-Lee, though not for Manu Sporny)。
我想原因是不想永远离开一阶基础,bearing in mind 'natural' 将 a b c
三元组翻译成 FOL 就像 b(a,c)
.那么[] b c
可以翻译成∃x b(x,c)
,但是a [] c
呢?