Пример #1
0
 //--- Constructors ---
 /// <summary>
 /// Create a new storage instance.
 /// </summary>
 /// <param name="catalog">DataCatalog to use for collection storage.</param>
 /// <param name="indexer">Indexing service.</param>
 public MysqlDocStore(IDataCatalog catalog, IMysqlDocStoreIndexer indexer)
 {
     _catalog = catalog;
     _indexer = indexer;
     _name = _indexer.Name;
     _idXPath = _indexer.Config["id-xpath"].AsText ?? "@id";
     _namespaceMap.Add(new KeyValuePair<string, string>("docstore", "mindtouch.dream.docstore"));
     foreach(XDoc doc in _indexer.Config["namespaces/namespace"]) {
         _namespaceMap.Add(new KeyValuePair<string, string>(doc["@prefix"].AsText, doc["@urn"].AsText));
     }
 }
Пример #2
0
        //--- Constructors ---

        /// <summary>
        /// Create a new storage instance.
        /// </summary>
        /// <param name="catalog">DataCatalog to use for collection storage.</param>
        /// <param name="indexer">Indexing service.</param>
        public MysqlDocStore(IDataCatalog catalog, IMysqlDocStoreIndexer indexer)
        {
            _catalog = catalog;
            _indexer = indexer;
            _name    = _indexer.Name;
            _idXPath = _indexer.Config["id-xpath"].AsText ?? "@id";
            _namespaceMap.Add(new KeyValuePair <string, string>("docstore", "mindtouch.dream.docstore"));
            foreach (XDoc doc in _indexer.Config["namespaces/namespace"])
            {
                _namespaceMap.Add(new KeyValuePair <string, string>(doc["@prefix"].AsText, doc["@urn"].AsText));
            }
        }