Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rdf 为什么这些类型的推论发生在GraphDB中?_Rdf_Rdfs_Graphdb_Turtle Rdf - Fatal编程技术网

Rdf 为什么这些类型的推论发生在GraphDB中?

Rdf 为什么这些类型的推论发生在GraphDB中?,rdf,rdfs,graphdb,turtle-rdf,Rdf,Rdfs,Graphdb,Turtle Rdf,我有以下.ttl文件: @Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @Prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @Prefix ex: <http://www.example.com#> ex:requires rdfs:domain ex:Function. ex:requires rdfs:range ex:Inf

我有以下.ttl文件:

@Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@Prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@Prefix ex: <http://www.example.com#>

ex:requires rdfs:domain ex:Function.
ex:requires rdfs:range ex:Information.
ex:provides rdfs:domain ex:Function.
ex:provides rdfs:range ex:Function.
ex:requires rdfs:domain ex:Display.
ex:DisplaysTo rdfs:domain ex:Display.
ex:DisplaysTo rdfs:range ex:User.

ex:F1 ex:requires ex:I1.
ex:F1 ex:provides ex:I2.
ex:D1 ex:requires ex:I2.
ex:D1 ex:DisplaysTo ex:U1.

使用当前形式的RDF是不可能的。我也不知道你为什么想知道这会发生?我的意思是,你用
ex:requires rdfs:domain ex:Function.
ex:requires rdfs:domain ex:Display.
说“所有使用ex:requires属性的东西都是ex:Function”,所以最后,这两件事都是假定为真的陈述,即它们都成立。所以它认为“所有使用ex:requires属性的东西都是一个ex:Display和一个ex:Function”,显然,如果“requires”关系在不同的域中使用,那么您需要的是两个不同的属性。您可以有一个属性
ex:requires
,然后有两个子属性
ex:requiresD
ex:requiresF
,每个子属性具有不同的domain@UninformedUser有没有一种方法可以使用RDFS来表示对象必须在RDFS中定义所有关系,才能成为该类的实例。例如,一个对象O1必须同时具有Requires和displays的关系才能成为Display的实例,而不仅仅是这两个关系中的一个?不在RDFS中,为此,您需要构建在RDF@UninformedUser之上的OWL。我尝试使用OWL基数规则指定一个显示必须至少显示一个用户。然而,尽管它没有属性DisplaysTo,它仍然将函数F1指定为类Display的实例。基数是使用owl进行thsi的正确方法吗?
@prefix : <http://www.semanticweb.org/alexbett/ontologies/2021/3/untitled-ontology-5#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/alexbett/ontologies/2021/3/untitled-ontology-5> .

:DisplaysTo rdf:type owl:ObjectProperty ;
            rdfs:domain :Display ;
            rdfs:range :User .

:Provides rdf:type owl:ObjectProperty ;
          rdfs:domain :Function ;
          rdfs:range :Information .

:Requires rdf:type owl:ObjectProperty ;
          rdfs:domain :Display ,
                      :Function ;
          rdfs:range :Information .

:Display rdf:type owl:Class ;
         rdfs:subClassOf [ rdf:type owl:Restriction ;
                           owl:onProperty :DisplaysTo ;
                           owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                           owl:onClass :User
                         ] ,
                         [ rdf:type owl:Restriction ;
                           owl:onProperty :Requires ;
                           owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                           owl:onClass :Information
                         ] .

:Function rdf:type owl:Class ;
          rdfs:subClassOf [ rdf:type owl:Restriction ;
                            owl:onProperty :Provides ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass :Information
                          ] ,
                          [ rdf:type owl:Restriction ;
                            owl:onProperty :Requires ;
                            owl:minQualifiedCardinality "1"^^xsd:nonNegativeInteger ;
                            owl:onClass :Information
                          ] .

:Information rdf:type owl:Class .
:User rdf:type owl:Class .

:D1 rdf:type owl:NamedIndividual ;
    :DisplaysTo :U1 ;
    :Requires :I2 .

:F1 rdf:type owl:NamedIndividual ;
    :Provides :I2 ;
    :Requires :I1 .

:I1 rdf:type owl:NamedIndividual .
:I2 rdf:type owl:NamedIndividual .
:U1 rdf:type owl:NamedIndividual .
:Display rdf:type owl:Class ;
         owl:intersectionOf [ rdf:type owl:Restriction ;
                              owl:onProperty :DisplaysTo ;
                              owl:onClass :User
                            ] ,
                            [ rdf:type owl:Restriction ;
                              owl:onProperty :Requires ;
                              owl:onClass :Information
                            ] .