Beispiel #1
0
        public void SaveAndReset(IDocumentSetClass setClass)
        {
            if (IsSingleFold)
            {
                if (!isUsingGeneralCache)
                {
                    if (!localLemmaResourcePath.isNullOrEmpty())
                    {
                        if (!File.Exists(localLemmaResourcePath))
                        {
                            _lemmaResource.SaveUsedCache(localLemmaResourcePath, true);
                        }
                    }
                }
            }

            if (isUsingGeneralCache)
            {
            }
            else
            {
                if (!_lemmaResource.localCache.isNullOrEmpty())
                {
                    _lemmaResource = null;
                }
            }
        }
Beispiel #2
0
        public textResourceIndexBase GetLemmaResource(String localLemmaResource = "")
        {
            if (_lemmaResource == null)
            {
                String resPath = appManager.Application.folder_resources.findFile(setup_multitext_lex, SearchOption.AllDirectories);

                String altPath = appManager.Application.folder_resources.findFile(setup_multitext_alt, SearchOption.AllDirectories);


                String specPath = appManager.Application.folder_resources.findFile(setup_multitext_specs, SearchOption.AllDirectories);


                multitextIndexedResolver parser = new multitextIndexedResolver();


                if (DoUseLexicResourceCache)
                {
                    if (parser.localCache != localLemmaResource)
                    {
                        parser.ResetIsLoaded();
                    }

                    if (!localLemmaResource.isNullOrEmpty())
                    {
                        if (File.Exists(localLemmaResource))
                        {
                            parser.localCache = localLemmaResource;
                        }
                        else
                        {
                            parser.localCache = "";
                        }
                    }
                    else
                    {
                        parser.localCache = "";
                    }
                }
                else
                {
                }

                parser.Setup(resPath, specPath, altPath, output, textResourceIndexResolveMode.resolveOnQuery);

                _lemmaResource = parser;
            }
            return(_lemmaResource);
        }