title: SPARQL How to get the type of an individual
body: <p>I made this ontology: </p>
  
  <pre><code>SensorOntology:MedicalCabinet-01 rdf:type owl:NamedIndividual ,
                                     SensorOntology:MedicalCabinetSensor ;
                            SensorOntology:hasId "57"^^xsd:int ;
                            SensorOntology:hasValue "0"^^xsd:int .
  </code></pre>
  
  <p>I am trying to write a query to get the type of <strong>MedicalCabinet-01</strong> which is <strong>MedicalCabinetSensor</strong> by given <strong>id</strong> number. However, I am printing <strong>owl:NamedIndividual</strong> and <strong>SensorOntology:MedicalCabinetSensor</strong>. Is it anyway I print just <strong>SensorOntology:MedicalCabinetSensor</strong>. This is my query:</p>
  
  <pre><code>SELECT DISTINCT  ?sensor ?sensorclass
         WHERE {?sensor :hasId  "100"^^xsd:int.
                ?sensor rdf:type ?sensorclass}
  </code></pre>