title: SPARQL query to retrieve all objects and properties
body: <p>Using the <a href="http://www.w3.org/TR/owl-guide/wine.rdf" rel="nofollow noreferrer">Wine ontology</a>, I want to create SPARQL query so I can retrieve <strong>all wines</strong> and <strong>their properties</strong> like the table below - consider that I don't know the properties' names <em>a priori</em>.</p>
  
  <pre><code>vin                  | rdf:type     | vin:hasMaker      |  vin:hasSugar   | ...
  ==========================================================================  ...
  GaryFarrellMerlot    |  vin:Merlot  | vin:Elyse         |  vin:Dry        | ...
  --------------------------------------------------------------------------
  ElyseZinfandel       |  vin:Elyse   | vin:GaryFarrell   |  vin:Dry        | ...
  ...
  </code></pre>
  
  <p>Can someone give me a hint?</p>
  
  <p>-- <strong>EDIT</strong></p>
  
  <p>It is not possible to have the query result in the format I mentioned, but I can have it this way:</p>
  
  <pre><code>vin                |   property     |  value
  =================================================
  GaryFarrellMerlot  |   rdf:type     |  vin:Merlot
  -------------------------------------------------
  GaryFarrellMerlot  |   rdf:hasMaker |  vin:Elyse
  -------------------------------------------------
  ...
  </code></pre>
  
  <p>With this select (thanks <a href="https://stackoverflow.com/users/346336/cygri">cygri</a>):</p>
  
  <pre><code>SELECT DISTINCT ?wine ?property ?value
  WHERE { 
         ?o1 a ?class .
         ?wine a ?o1 .
         ?wine ?property ?value .
  }
  </code></pre>
  
  <p>This will take wines instead of type of wines (Merlot -> GaryFarrellMerlot). The only problem is it takes wine but also Winery, Regions, Flavours, etc and I wanted only wines and its properties. Besides, there's <strong>no</strong> such attribute <strong>vin:Merlot rdfs:subClassOf vin:Wine.</strong> Any hint?</p>