public bool SetMetadata(WikiDocumentMetadata metadata)
            {
                lock (_thisLock)
                {
                    var now = DateTime.UtcNow;

                    if (metadata == null
                        || metadata.Tag == null
                            || metadata.Tag.Id == null || metadata.Tag.Id.Length == 0
                            || string.IsNullOrWhiteSpace(metadata.Tag.Name)
                        || (metadata.CreationTime - now).Minutes > 30
                        || metadata.Certificate == null) return false;

                    var signature = metadata.Certificate.ToString();

                    Dictionary<string, HashSet<WikiDocumentMetadata>> dic;

                    if (!_wikiDocumentMetadatas.TryGetValue(metadata.Tag, out dic))
                    {
                        dic = new Dictionary<string, HashSet<WikiDocumentMetadata>>();
                        _wikiDocumentMetadatas[metadata.Tag] = dic;
                    }

                    HashSet<WikiDocumentMetadata> hashset;

                    if (!dic.TryGetValue(signature, out hashset))
                    {
                        hashset = new HashSet<WikiDocumentMetadata>();
                        dic[signature] = hashset;
                    }

                    if (!hashset.Contains(metadata))
                    {
                        if (!metadata.VerifyCertificate()) throw new CertificateException();

                        hashset.Add(metadata);
                    }

                    return true;
                }
            }