public function getRights()
    {
        $rights = array(
            'graphUpdate' => false,
            'tripleQuerying' => false,
            'tripleUpdate' => false
        );

        // generate a unique graph URI which we will use later on for our tests.
        $graph = 'http://saft/'. hash('sha1', rand(0, time()) . microtime(true)) .'/';

        /*
         * check if we can create and drop graphs
         */
        try {
            $this->query('CREATE GRAPH <'. $graph .'>');
            $this->query('DROP GRAPH <'. $graph .'>');
            $rights['graphUpdate'] = true;
        } catch (\Exception $e) {
            // ignore exception here and assume we could not create or drop the graph.
        }

        /*
         * check if we can query triples
         */
        try {
            $this->query('SELECT ?g { GRAPH ?g {?s ?p ?o} } LIMIT 1');
            $rights['tripleQuerying'] = true;
        } catch (\Exception $e) {
            // ignore exception here and assume we could not query anything.
        }

        /*
         * check if we can create and update queries.
         */
        try {
            if ($rights['graphUpdate']) {
                // create graph
                $this->query('CREATE GRAPH <'. $graph .'>');

                // create a simple triple
                $this->query('INSERT DATA { GRAPH <'. $graph .'> { <'. $graph .'1> <'. $graph .'2> "42" } }');

                // remove all triples
                $this->query('WITH <'. $graph .'> DELETE { ?s ?p ?o }');

                // drop graph
                $this->query('DROP GRAPH <'. $graph .'>');

                $rights['tripleUpdate'] = true;
            }
        } catch (\Exception $e) {
            // ignore exception here and assume we could not update a triple.
            // whatever happens, try to remove the fresh graph.
            try {
                $this->query('DROP GRAPH <'. $graph .'>');
            } catch (\Exception $e) {
            }
        }

        return $rights;
    }