Your query, with newlines added for readability, is:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX my: <http://127.0.0.1/ontology/ApothecaryOntology.owl#>
SELECT ?result WHERE {
?result rdf:ID my:HealthInsuranceNumber .
}
While you see rdf:ID in your RDF/XML file, it's not actually a property in the RDF triples; instead, it's used to indicate what the IRI of a resource in the RDF graph is. For instance, the snippet:
<owl:Class rdf:ID="Costs"/>
encode the RDF triple:
...#Costs rdf:type owl:Class
where the ... is the base IRI of your ontology. This is described in section 2.14 Abbreviating URIs: rdf:ID and xml:base of the RDF/XML specification. That specification is kind of long and complicated, like RDF/XML. RDF/XML is just a serialization format for RDF, though. RDF itself is pretty simple. Whenever possible, I'd advise that you don't look directly at the RDF/XML serialization of an RDF graph. Instead, try saving as Turtle. It's much more human readable, and you'll have a much better idea of what triples are actually in the graph. E.g., your ontology in Turtle looks like this (I haven't copied the whole thing):
@prefix : <http://127.0.0.1/ontology/ApothecaryOntology.owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
:Person a owl:Class .
:Patient a owl:Class ;
rdfs:subClassOf :Person .
:HospitalPhysician a owl:Class ;
rdfs:subClassOf :Physician .
:TelephoneNumber a owl:Class ;
rdfs:subClassOf :Number ;
owl:disjointWith :HealthInsuranceNumber .
:Physician_hasID a owl:FunctionalProperty , owl:InverseFunctionalProperty , owl:ObjectProperty ;
rdfs:domain :Physician ;
rdfs:range :PhysicianID .
:Disease_hasSymptom a owl:FunctionalProperty , owl:ObjectProperty ;
rdfs:domain :Disease ;
rdfs:range :Symptom .
That's almost identical to the corresponding SPARQL syntax.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…