title: sparql query get instances of sub classes
body: <p>I have a simple n3 ontology </p>
  
  <pre><code> @prefix my: &lt;http://www.codeproject.com/KB/recipes/n3_notation#&gt;.
      @prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .
      @prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; .
  
  
  
          my:spec a rdfs:Class.
          my:security a rdfs:Class; rdfs:subClassOf my:spec .
  
          my:bluetooth a my:security;
          my:preferedby my:BusinessPerson;
          my:name "bluetooth".
  </code></pre>
  
  <p>im trying to define class specand define security class as a subclass of spec.</p>
  
  <p>this is my sparql query im using with the help of dotNetRdf library</p>
  
  <pre><code>PREFIX my: &lt;http://www.codeproject.com/KB/recipes/n3_notation#&gt;
      PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt; 
  SELECT ?name WHERE {
      [ a rdfs:subClassOf*/my:spec;
          my:preferedby my:BusinessPerson;
          my:name ?name].
  }
  </code></pre>
  
  <p>im using dotnetrdf library to query my ontology and </p>
  
  <pre><code>Graph g2 = new Graph();
          g2.LoadFromFile(@"C:\\Users\Ravindu Kottahachchi\Desktop\ontology.n3");
          ISparqlDataset ds = new InMemoryDataset(g2);
          LeviathanQueryProcessor processor = new LeviathanQueryProcessor(ds);
          SparqlResultSet resul = processor.ProcessQuery(query1)  as SparqlResultSet;
  </code></pre>
  
  <p>this setup works fine if i query queries without using any tokens to indicate path cardinality </p>
  
  <p>but when i run the above mentioned query it gives the error <code>VDS.RDF.Parsing.Tokens.MultiplyToken' Token which is valid only after a Predicate to indicate Path Cardinality</code></p>
  
  <p>is it something wrong with the dotnetrdf setup im using ?</p>
  
  <p>i used this </p>
  
  <pre><code>    TripleStore store = new TripleStore();
              Graph g = new Graph();
              Notation3Parser parser = new Notation3Parser();
              parser.Load(g, @"C:\\Users\Ravindu Kottahachchi\Desktop\ontology.n3");
              store.Add(g);
  
              SparqlQueryParser sparqlparser = new SparqlQueryParser();
  SparqlResultSet results = store.ExecuteQuery(query) as SparqlResultSet;
  </code></pre>
  
  <p>which uses triple store with the same sparql query but it also gave the same error</p>
  
  <p>can someone help me with where i have made the mistake thanks in advance </p>