C# Class SIL.FieldWorks.FDO.DomainServices.SemanticDomainSearch.SemDomSearchCache

Exibir arquivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
GetDomainsForCachedString ( int ws, string searchKey ) : IEnumerable

Given a writing system integer and a word (searchKey string), this method returns all the Semantic Domains that contain that exact word in their Name or Example Words fields. N.B. Make sure the cache has been initialized first.

InitializeCache ( ) : void

Loops through all the Semantic Domains to add words from Name and Example Words fields to the cache for each available analysis writing system.

SemDomSearchCache ( FdoCache cache ) : System

Create an (uninitialized) cache of Semantic Domains by word string and writing system integer to provide quick searching for multiple keys (bulk edit of the LexSense.SemanticDomains collection; Suggest button).

Protected Methods

Method Description
GetExampleWordsString ( IEnumerable questions ) : string>[].Tuple

Takes a list of semantic domain question objects and fishes out the example words and puts them in an array of space-delimited strings for easier searching. (one string per writing system)

Private Methods

Method Description
CacheDomain ( ICmSemanticDomain domain ) : void
CacheWord ( int ws, string word, ICmSemanticDomain domain ) : void
CacheWordsIn ( string>.Tuple wsStringTupleArray, ICmSemanticDomain domain ) : void
CondenseResults ( string>.List results ) : void
GetAppropriateCultureInfo ( ) : CultureInfo
GetDomainNameString ( ICmSemanticDomain domain ) : string>[].Tuple

Get the text from a Semantic Domain's Name field.

GetExampleWordTextFromDomainQuestion ( ICmDomainQ questionObject ) : string>>.IEnumerable

For one Semantic Domain question, return the text of the Example Words field.

ParseStringIntoWords ( string searchIn ) : IEnumerable

Method Details

GetDomainsForCachedString() public method

Given a writing system integer and a word (searchKey string), this method returns all the Semantic Domains that contain that exact word in their Name or Example Words fields. N.B. Make sure the cache has been initialized first.
if the cache has not been initialized
public GetDomainsForCachedString ( int ws, string searchKey ) : IEnumerable
ws int
searchKey string
return IEnumerable

GetExampleWordsString() protected method

Takes a list of semantic domain question objects and fishes out the example words and puts them in an array of space-delimited strings for easier searching. (one string per writing system)
protected GetExampleWordsString ( IEnumerable questions ) : string>[].Tuple
questions IEnumerable
return string>[].Tuple

InitializeCache() public method

Loops through all the Semantic Domains to add words from Name and Example Words fields to the cache for each available analysis writing system.
public InitializeCache ( ) : void
return void

SemDomSearchCache() public method

Create an (uninitialized) cache of Semantic Domains by word string and writing system integer to provide quick searching for multiple keys (bulk edit of the LexSense.SemanticDomains collection; Suggest button).
public SemDomSearchCache ( FdoCache cache ) : System
cache FdoCache FdoCache
return System