C# Класс SIL.FieldWorks.IText.SandboxBase.GetRealAnalysisMethod

Determine the real analysis corresponding to the current state of the sandbox. The 'real analysis' may be a WfiWordform (if it hasn't been analyzed at all), a WfiAnalysis, or a WfiGloss.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
m_analysisMorphs int[]
m_analysisMsas int[]
m_analysisSenses int[]
m_caches CachePair
m_choices SIL.FieldWorks.IText.InterlinLineChoices
m_cmorphs int
m_fWantOnlyWfiAnalysis bool
m_helpTopicProvider IHelpTopicProvider
m_hvoSbWord int
m_sandbox SandboxBase
m_sda ISilDataAccess
m_sdaMain ISilDataAccess
m_wa IWfiAnalysis

Открытые методы

Метод Описание
CheckItOut ( ) : void
FindMatchingAnalysis ( bool fExactMatch ) : IWfiAnalysis

Find the analysis that matches the info in the secondary cache.

FindMatchingGloss ( ) : IWfiGloss

Find one of the WfiGlosses of m_hvoWfiAnalysis where the form matches for each analysis writing system. Review: We probably want to find a WfiGloss that matches any (non-zero length) alternative since we don't want to force the user to type in every alternative each time they enter a gloss. Otherwise, if we match one with all non-zero length, return that one. (LT-1428)

GetRealAnalysisMethod ( ) : System

Only used to make the UpdateRealAnalysisMethod construcotr happy. Do not use directly.

GetRealAnalysisMethod ( IHelpTopicProvider helpTopicProvider, SandboxBase owner, CachePair caches, int hvoSbWord, AnalysisTree oldAnalysis, IWfiAnalysis wa, IWfiGloss gloss, SIL.FieldWorks.IText.InterlinLineChoices choices, ITsString tssForm, bool fWantOnlyWfiAnalysis ) : System
Run ( ) : IAnalysis

Run the algorithm, returning the 'analysis' hvo (WfiWordform, WfiAnalysis, or WfiGloss).

Защищенные методы

Метод Описание
BuildMorphLists ( ) : void
EnsureCorrectMorphForms ( ) : void

m_hvoAnalysis is the selected analysis. However, we did not consider writing systems of the morpheme line except the default vernacular one in deciding to use it. If additional WS information has been supplied, save it.

UpdateMlaIfDifferent ( int hvoSrc, int flidSrc, int wsId, int hvoDst, int flidDest ) : void

Ensure that the specified writing system of property flidDest in object hvoDst in m_sdaMain is the same as property flidSrc in object hvoSrc in m_sda. If not, update.

Приватные методы

Метод Описание
AdditionalAlternatives ( IWfiGloss wg, List wsIds ) : int

Count how many non-blank alternatives tss has that are not listed in wsIds.

CheckAnalysis ( int hvoPossibleAnalysis, bool fExactMatch ) : bool

Evaluate the given possible analysis to see whether it matches the current Sandbox data. Review: This is not testing word gloss at all. Is this right?

CopyGlossesToSense ( ILexSense sense ) : void
CopyGlossesToWfiGloss ( IWfiGloss gloss ) : void
FindLexEntryMorphItem ( List morphItems, ILexEntry leTarget ) : IhMorphEntry.MorphItem

Find the morph item referring to the LexEntry (only), not a sense or msa.

FinishItOff ( ) : IAnalysis
GetBestGloss ( IWfiAnalysis wfiAnalysis, List wsIds, ISilDataAccess sda, int hvoWord ) : IWfiGloss

Get the most appropriate WfiGloss from among those belonging to the given WfiAnalysis. The goal is to match as closely as possible the strings found in sda.get_MultiStringAlt(hvoWord, ktagSbWordGloss, ws) for each ws in wsIds. Ideally we find an alternative where all writing systems match exactly. Failing that, one where as many as possible match, and the others are blank.

GetRealHvoFromSbWmbInflType ( int imorph ) : int
IsMlSame ( int hvoSrc, int flidSrc, int wsId, int hvoDst, int flidDest ) : bool
IsMlSame ( int hvoSrc, int flidSrc, int wsId, int hvoDst, int flidDest, ITsString &tss, ITsString &tssOld ) : bool
IsTrivialAnalysis ( IWfiAnalysis possibleAnalysis ) : bool

A trivial analysis, the sort created when just doing word glossing, doesn't really specify anything, though it may have one morph bundle that just matches the whole wordform. It may possibly specify a part of speech, in which case it must match the one the user entered to be reusable.

MatchesCurrentGlosses ( IWfiGloss gloss ) : bool
OnlyUsedThisOnce ( ILexSense sense ) : bool
OnlyUsedThisOnce ( IWfiAnalysis oldAnalysis ) : bool
SbWordGlossMatchesSenseGloss ( IhMorphEntry morphItem ) : bool
SbWordMainPosMatchesSenseMsaMainPos ( IhMorphEntry morphItem ) : bool

see if the MainPossibilities match for the given morphItem and the Word Part of Speech in the sandbox

SbWordPosMatchesSenseMsaPos ( IhMorphEntry morphItem ) : bool
UpdateSense ( ILexSense sense, IPartOfSpeech pos ) : void

Описание методов

BuildMorphLists() защищенный Метод

protected BuildMorphLists ( ) : void
Результат void

CheckItOut() публичный Метод

public CheckItOut ( ) : void
Результат void

EnsureCorrectMorphForms() защищенный Метод

m_hvoAnalysis is the selected analysis. However, we did not consider writing systems of the morpheme line except the default vernacular one in deciding to use it. If additional WS information has been supplied, save it.
protected EnsureCorrectMorphForms ( ) : void
Результат void

FindMatchingAnalysis() публичный Метод

Find the analysis that matches the info in the secondary cache.
public FindMatchingAnalysis ( bool fExactMatch ) : IWfiAnalysis
fExactMatch bool
Результат IWfiAnalysis

FindMatchingGloss() публичный Метод

Find one of the WfiGlosses of m_hvoWfiAnalysis where the form matches for each analysis writing system. Review: We probably want to find a WfiGloss that matches any (non-zero length) alternative since we don't want to force the user to type in every alternative each time they enter a gloss. Otherwise, if we match one with all non-zero length, return that one. (LT-1428)
public FindMatchingGloss ( ) : IWfiGloss
Результат IWfiGloss

GetRealAnalysisMethod() публичный Метод

Only used to make the UpdateRealAnalysisMethod construcotr happy. Do not use directly.
public GetRealAnalysisMethod ( ) : System
Результат System

GetRealAnalysisMethod() публичный Метод

public GetRealAnalysisMethod ( IHelpTopicProvider helpTopicProvider, SandboxBase owner, CachePair caches, int hvoSbWord, AnalysisTree oldAnalysis, IWfiAnalysis wa, IWfiGloss gloss, SIL.FieldWorks.IText.InterlinLineChoices choices, ITsString tssForm, bool fWantOnlyWfiAnalysis ) : System
helpTopicProvider IHelpTopicProvider
owner SandboxBase
caches CachePair
hvoSbWord int
oldAnalysis AnalysisTree
wa IWfiAnalysis
gloss IWfiGloss
choices SIL.FieldWorks.IText.InterlinLineChoices
tssForm ITsString
fWantOnlyWfiAnalysis bool
Результат System

Run() публичный Метод

Run the algorithm, returning the 'analysis' hvo (WfiWordform, WfiAnalysis, or WfiGloss).
public Run ( ) : IAnalysis
Результат IAnalysis

UpdateMlaIfDifferent() защищенный Метод

Ensure that the specified writing system of property flidDest in object hvoDst in m_sdaMain is the same as property flidSrc in object hvoSrc in m_sda. If not, update.
protected UpdateMlaIfDifferent ( int hvoSrc, int flidSrc, int wsId, int hvoDst, int flidDest ) : void
hvoSrc int
flidSrc int
wsId int
hvoDst int
flidDest int
Результат void

Описание свойств

m_analysisMorphs защищенное свойство

protected int[] m_analysisMorphs
Результат int[]

m_analysisMsas защищенное свойство

protected int[] m_analysisMsas
Результат int[]

m_analysisSenses защищенное свойство

protected int[] m_analysisSenses
Результат int[]

m_caches защищенное свойство

protected CachePair m_caches
Результат CachePair

m_choices защищенное свойство

protected InterlinLineChoices,SIL.FieldWorks.IText m_choices
Результат SIL.FieldWorks.IText.InterlinLineChoices

m_cmorphs защищенное свойство

protected int m_cmorphs
Результат int

m_fWantOnlyWfiAnalysis защищенное свойство

protected bool m_fWantOnlyWfiAnalysis
Результат bool

m_helpTopicProvider защищенное свойство

protected IHelpTopicProvider m_helpTopicProvider
Результат IHelpTopicProvider

m_hvoSbWord защищенное свойство

protected int m_hvoSbWord
Результат int

m_sandbox защищенное свойство

protected SandboxBase,SIL.FieldWorks.IText m_sandbox
Результат SandboxBase

m_sda защищенное свойство

protected ISilDataAccess m_sda
Результат ISilDataAccess

m_sdaMain защищенное свойство

protected ISilDataAccess m_sdaMain
Результат ISilDataAccess

m_wa защищенное свойство

protected IWfiAnalysis m_wa
Результат IWfiAnalysis