title: Excluding Blank Nodes from SPARQL query results
body: <p>I am using RDFLib to query on the <a href="http://data.bioontology.org/ontologies/SEDI/submissions/6/download?apikey=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb" rel="noreferrer">Semantic Dicom Ontology</a>. I am querying for owl:Class in the graph constructed from the above ontology. RDFLib returns results which contain blank nodes and I wish to exclude such queries. My query - </p>
  
  <pre><code>from rdflib import Graph
  g = Graph()
  g.parse('dicom.owl')
  q = """SELECT ?c WHERE {?c rdf:type owl:Class}"""
  qres = g.query(q)
  </code></pre>
  
  <p>dicom.owl is the <a href="http://data.bioontology.org/ontologies/SEDI/submissions/6/download?apikey=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb" rel="noreferrer">Semantic Dicom Ontology</a> downloaded in my machine.</p>
  
  <p>Some of the results that I receive - 
  <a href="https://i.stack.imgur.com/VKkhv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VKkhv.png" alt="Results of owl class queries"></a></p>
  
  <p>How can I modify my query to exclude all the blank nodes?</p>