C# 클래스 SIL.FieldWorks.FDO.DomainServices.SemanticDomainSearch.SemDomSearchStrategy

파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 메소드들

메소드 설명
CollectPossibleMatchIn ( string searchIn, ICmSemanticDomain domain, int wholeWordBucket ) : bool

Take a string to look in (from a domain's Name or ExampleWords) and try to find a match for some (strategy-defined) search key(s).

DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult

Each strategy defines how to determine whether a string has a match or not.

GetDomainNameString ( ICmSemanticDomain domain ) : string

Get the text from a Semantic Domain's Name field. This version uses BestAnalysisAlternative which should always have a value, but a subclass might use a more specific writing system which may not have a value (i.e. be prepared for a null return value).

GetExampleWordTextFromDomainQuestion ( ICmDomainQ questionObject ) : string

For one Semantic Domain question, return the text of the Example Words field. This baseclass version uses BestAnalysis, which always has a value, but a subclass might use a more specific writing system which could return a null value (i.e. be prepared to handle a null return value).

GetExampleWordsString ( IEnumerable questions ) : string

Takes a list of semantic domain question objects and fishes out the example words and puts them in a space-delimited string for easier searching. This version uses BestAnalysisAlternative.

LookForHitInWordCollection ( IEnumerable wordsToLookIn, string key ) : MatchingResult

Search through a list of words (results of Regex match) for a search key. Return a MatchingResult to inform caller of type of match, if any.

SemDomSearchStrategy ( FdoCache cache ) : System

Constructor for new search strategy.

SetupSearchResults ( ) : void

Subclasses can override to set the search results object to have the correct number of buckets for a different strategy. Baseclass defaults to two buckets.

비공개 메소드들

메소드 설명
GetAppropriateCultureInfo ( ) : CultureInfo
ParseStringIntoWords ( string searchIn ) : IEnumerable
PutDomainInDesiredBucket ( ICmSemanticDomain domain ) : void

Subclasses can override this method to change how Semantic Domains are compared with any search key(s) and the priority types of matches for putting the domain into an appropriate search results bucket (if any). N.B. Strategy subclasses should take care not to add a domain to a bucket if it is already in a higher priority bucket.

메소드 상세

CollectPossibleMatchIn() 보호된 메소드

Take a string to look in (from a domain's Name or ExampleWords) and try to find a match for some (strategy-defined) search key(s).
protected CollectPossibleMatchIn ( string searchIn, ICmSemanticDomain domain, int wholeWordBucket ) : bool
searchIn string
domain ICmSemanticDomain
wholeWordBucket int
리턴 bool

DoesInputMatchWord() 보호된 추상적인 메소드

Each strategy defines how to determine whether a string has a match or not.
protected abstract DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult
wordsToLookIn IEnumerable
리턴 MatchingResult

GetDomainNameString() 보호된 메소드

Get the text from a Semantic Domain's Name field. This version uses BestAnalysisAlternative which should always have a value, but a subclass might use a more specific writing system which may not have a value (i.e. be prepared for a null return value).
protected GetDomainNameString ( ICmSemanticDomain domain ) : string
domain ICmSemanticDomain
리턴 string

GetExampleWordTextFromDomainQuestion() 보호된 메소드

For one Semantic Domain question, return the text of the Example Words field. This baseclass version uses BestAnalysis, which always has a value, but a subclass might use a more specific writing system which could return a null value (i.e. be prepared to handle a null return value).
protected GetExampleWordTextFromDomainQuestion ( ICmDomainQ questionObject ) : string
questionObject ICmDomainQ
리턴 string

GetExampleWordsString() 보호된 메소드

Takes a list of semantic domain question objects and fishes out the example words and puts them in a space-delimited string for easier searching. This version uses BestAnalysisAlternative.
protected GetExampleWordsString ( IEnumerable questions ) : string
questions IEnumerable
리턴 string

LookForHitInWordCollection() 보호된 메소드

Search through a list of words (results of Regex match) for a search key. Return a MatchingResult to inform caller of type of match, if any.
protected LookForHitInWordCollection ( IEnumerable wordsToLookIn, string key ) : MatchingResult
wordsToLookIn IEnumerable
key string
리턴 MatchingResult

SemDomSearchStrategy() 보호된 메소드

Constructor for new search strategy.
protected SemDomSearchStrategy ( FdoCache cache ) : System
cache FdoCache
리턴 System

SetupSearchResults() 보호된 메소드

Subclasses can override to set the search results object to have the correct number of buckets for a different strategy. Baseclass defaults to two buckets.
protected SetupSearchResults ( ) : void
리턴 void