internal FIWriterVocabulary WriterVocabulary(string uri)
        {
            FIExternalVocabulary vocab = null;

            if (_uriToVocabularyMap.TryGetValue(uri, out vocab))
            {
                return(vocab.Writer);
            }

            return(null);
        }
        /// <summary>
        /// Adds a FIExternalVocabulary object to the manager.
        /// </summary>
        /// <param name="vocabulary">Object to add.</param>
        /// <exception cref="LtFastInfosetException">A vocabulary already exists for URI.</exception>
        public void AddVocabulary(FIExternalVocabulary vocabulary)
        {
            string uri = vocabulary.URI.ToString();

            if (_uriToVocabularyMap.ContainsKey(uri))
            {
                throw new LtFastInfosetException("A vocabulary already exists for URI " + uri);
            }

            _uriToVocabularyMap.Add(uri, vocabulary);
        }