public function getOntologyData()
    {
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_IsAjaxAction(__FUNCTION__);
        }
        $options = $this->getTreeOptionsFromRequest([]);

        //generate the tree from the given parameters
        $tree = $this->getClassService()->toTree($options['class'], $options);

        //retrieve resources permissions
        $user = \common_Session_SessionManager::getSession()->getUser();
        $permissions = $this->getResourceService()->getResourcesPermissions($user, $tree);

        //expose the tree
        $this->returnJson([
            'tree' => $tree,
            'permissions' => $permissions
        ]);
    }