public function getDocument()
    {
        $this->processRequestParameters();

        if ($this->treeStructure instanceof \ArrayObject) {
            $this->builderContext = new \Genesis\Builder();
            $this->builderContext->parseStructure($this->treeStructure->getArrayCopy());

            return $this->builderContext->getDocument();
        }

        return null;
    }