Ich versuche, Sparql mit Protege 5 auszuführen. Das ist meine Ontologie mit Protege5 erstellt:SPARQL Abfrage einzeln in Protege
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#"
xml:base="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<owl:Ontology rdf:about="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Data properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#family -->
<owl:DatatypeProperty rdf:about="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#family">
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</owl:DatatypeProperty>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#name -->
<owl:Class rdf:about="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#name"/>
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Individuals
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<!-- http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#amin -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#amin">
<family rdf:datatype="http://www.w3.org/2001/XMLSchema#string">mazrouei</family>
</owl:NamedIndividual>
<!-- http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#sara -->
<owl:NamedIndividual rdf:about="http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#sara">
<family>rezaei</family>
</owl:NamedIndividual>
</rdf:RDF>
<!-- Generated by the OWL API (version 4.2.5.20160517-0735) https://github.com/owlcs/owlapi -->
Ich versuche, diese Abfrage in snap sparql query
Fenster auszuführen:
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX :<http://www.semanticweb.org/lion/ontologies/2017/5/untitled-ontology-73#>
SELECT ?x WHERE{?x :family ?y}
aber kein Ergebnis zurückgegeben. family
ist eine Dateneigenschaft, die die Familie für eine Person definiert. Wie kann ich das beheben?
Wählen Sie _Reasurer> None_ und führen Sie Ihre Abfrage aus. Oder starten Sie einen beliebigen Reasoner (_Reasoner> Reasoner_ starten) und führen Sie dann Ihre Abfrage aus. –
ausgezeichnet .arbeit. Bitte posten Sie es als Antwort – alex