private function getStructure($document, $structureType, $rehydrate)
    {
        if ($structureType) {
            return $this->createStructure($document);
        }

        if (!$rehydrate && $document->getStructure()) {
            return $document->getStructure();
        }

        return new Structure();
    }