public function registerVocabulary($prefix, $uri)
    {
        $prefix = self::validateVocabPrefix($prefix);
        $uri = (new VocabularyService())->validateVocabularyUri($uri);

        // Register the new URI
        if (empty($this->vocabularies[$prefix]) || ($this->vocabularies[$prefix] !== $uri)) {
            $context = clone $this;
            $context->vocabularies[$prefix] = $uri;
            return $context;
        }

        return $this;
    }