public function createInstanceByQueryString($query)
    {
        switch ($this->rdfHelpers->getQueryType($query)) {
            case 'askQuery':
                return new AskQueryImpl($query, $this->rdfHelpers);

            case 'constructQuery':
                return new ConstructQueryImpl($query, $this->rdfHelpers);

            case 'describeQuery':
                return new DescribeQueryImpl($query, $this->rdfHelpers);

            case 'graphQuery':
                return new GraphQueryImpl($query, $this->rdfHelpers);

            case 'selectQuery':
                return new SelectQueryImpl($query, $this->rdfHelpers);

            case 'updateQuery':
                return new UpdateQueryImpl($query, $this->rdfHelpers);

            default:
                throw new \Exception('Unknown query type: '.$query);
        }
    }
public function createInstanceByQueryString($query)
    {
        switch ($this->rdfHelpers->getQueryType($query)) {
            case 'askQuery':
                return new AskQueryImpl($query, $this->rdfHelpers);

            case 'constructQuery':
                return new ConstructQueryImpl($query, $this->rdfHelpers);

            case 'describeQuery':
                return new DescribeQueryImpl($query, $this->rdfHelpers);

            case 'graphQuery':
                return new GraphQueryImpl($query, $this->rdfHelpers);

            case 'selectQuery':
                return new SelectQueryImpl($query, $this->rdfHelpers);

            case 'updateQuery':
                return new UpdateQueryImpl($query, $this->rdfHelpers);

            default:
                throw new \Exception('Unknown query type: '.$query);
        }
    }
public function createInstanceByQueryString ( $ query ) { switch ( $ this -> rdfHelpers -> getQueryType ( $ query ) ) { case 'askQuery' : return new AskQueryImpl ( $ query , $ this -> rdfHelpers ) ; case 'constructQuery' : return new ConstructQueryImpl ( $ query , $ this -> rdfHelpers ) ; case 'describeQuery' : return new DescribeQueryImpl ( $ query , $ this -> rdfHelpers ) ; case 'graphQuery' : return new GraphQueryImpl ( $ query , $ this -> rdfHelpers ) ; case 'selectQuery' : return new SelectQueryImpl ( $ query , $ this -> rdfHelpers ) ; case 'updateQuery' : return new UpdateQueryImpl ( $ query , $ this -> rdfHelpers ) ; default : throw new \ Exception ( 'Unknown query type: ' . $ query ) ; } }
Creates an instance of Query based on given query string.

@param string $query SPARQL query string to use for class instantiation

@return Query instance of Query
Creates an instance of Query based on given query string .