title: SPARQL query to get all class label with namespace prefix defined
body: <p>I want to get all class that stored in sesame repository. </p>
  
  <p>This is my query</p>
  
  <pre><code>SELECT ?class ?classLabel
  WHERE {
  ?class rdf:type rdfs:Class.
  ?class rdfs:label ?classLabel.
  }
  </code></pre>
  
  <p>It's return all URI of class with label. For example, </p>
  
  <pre><code>"http://example.com/A_Class" "A_Class"
  "http://example.com/B_Class" "B_Class"
  </code></pre>
  
  <p>But, if namespace prefix already defined I want to get label with namespace defined. For example if I already defined namespace prefix "ex" for "<a href="http://example.com/" rel="nofollow">http://example.com/</a>", the result become</p>
  
  <pre><code>"http://example.com/A_Class" "ex:A_Class"
  "http://example.com/B_Class" "ex:B_Class"
  </code></pre>