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

Search strategy for when the user types a string and we need to search the Semantic Domain list for matches of that string.
상속: SemDomSearchStrategy
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

공개 메소드들

메소드 설명
WholeAndPartialNameMatchSearchStrategy ( FdoCache cache, string searchKey ) : System

Semantic Domain Search Strategy for finding: 1) bucket 0 will contain: Partial or complete matches, left to right of Abbreviation (hierarchical number) Note when matches are found for this then the other buckets should be empty because this is a number vs alphabet 2a) bucket 0 This is the bucket for an EXACT match found for the DomainNameString 2a) bucket 1 This is the bucket for whole word matches found in the DomainNameString 2b) bucket 2 This is the bucket for whole word matches found in the ExampleWordsString 2c) bucket 3 This is the bucket for partial(StartsWith) word matches found in the DomainNameString 2d) bucket 4 This is the bucket for partial(StartsWith) word matches found in the ExampleWordsString Note: The order of these buckets is very important due to the behavior found in the method AddResultToBucketX

보호된 메소드들

메소드 설명
DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult

This strategy only uses one search string (what the user typed), so this version is pretty simple.

SetupSearchResults ( ) : void

Subclasses can override to set the search results object to have the correct number of buckets for a different strategy. This strategy needs three buckets.

비공개 메소드들

메소드 설명
PutDomainInDesiredBucket ( ICmSemanticDomain domain ) : void

This implementation checks to see of the search key starts with a digit first. If so, it looks in the Abbreviation field for a search key match in the hierarchical number (e.g. "8.3.3"; these would go in the first bucket). Otherwise it checks next for matches where the key corresponds to the beginning of the Name field (first bucket). Failing that, it checks for whole word (second bucket) or partial matches (third bucket) between the search key and the contents of a Semantic Domain's Name and ExampleWords fields. N.B. Strategy subclasses should take care not to add a domain to a bucket if it is already in a higher priority bucket.

SearchInAbbreviationForMatches ( ICmSemanticDomain domain ) : void

메소드 상세

DoesInputMatchWord() 보호된 메소드

This strategy only uses one search string (what the user typed), so this version is pretty simple.
protected DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult
wordsToLookIn IEnumerable
리턴 MatchingResult

SetupSearchResults() 보호된 메소드

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

WholeAndPartialNameMatchSearchStrategy() 공개 메소드

Semantic Domain Search Strategy for finding: 1) bucket 0 will contain: Partial or complete matches, left to right of Abbreviation (hierarchical number) Note when matches are found for this then the other buckets should be empty because this is a number vs alphabet 2a) bucket 0 This is the bucket for an EXACT match found for the DomainNameString 2a) bucket 1 This is the bucket for whole word matches found in the DomainNameString 2b) bucket 2 This is the bucket for whole word matches found in the ExampleWordsString 2c) bucket 3 This is the bucket for partial(StartsWith) word matches found in the DomainNameString 2d) bucket 4 This is the bucket for partial(StartsWith) word matches found in the ExampleWordsString Note: The order of these buckets is very important due to the behavior found in the method AddResultToBucketX
public WholeAndPartialNameMatchSearchStrategy ( FdoCache cache, string searchKey ) : System
cache FdoCache
searchKey string This strategy expects to only have one search key string.
리턴 System