C# Класс SIL.FieldWorks.XWorks.ConcDecorator

This class exists to decorate the main SDA for concordance views and browse views that show occurrence counts. It implements the Occurrences and OccurrencesCount properties for WfiWordform, WfiAnalysis, and/or WfiGloss. Both occurrences and OccurrencesCount are decorator rather than virtual properties because the results depend on per-window choices of which texts to include. It also implements the property ConcOccurrences, which is a decorator-only object as well as a decorator-only property. ConcOccurrences is the top-level list of occurrences of whatever the user asked to search for in Concordance view. Occurrences are 'fake' HVOs that don't correspond to any real object in the database. They also have properties only recognized by the decorator, such as a reference, begin and end character offsets (in the original paragraph string...used to bold the keyword), the object (typically StTxtPara) and segment they belong to, and several other derived properties which can be displayed in optional columns of the concordance views.
Наследование: SIL.FieldWorks.FDO.Application.DomainDataByFlidDecoratorBase, IAnalysisOccurrenceFromHvo, ISetMediator, IRefreshCache
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddNotification ( IVwNotifyChange nchng ) : void

Count the things that are interested in us so that, when there are no more, we can indicate that we no longer care about changes to the collection of interesting texts. Review JohnT: could it ever happen that we regain our interest in those changes, getting a new notifiee after we lost our last one?

ConcDecorator ( ISilDataAccessManaged domainDataByFlid, XmlNode configurationNode, IFdoServiceLocator services ) : System
IsInterestingText ( IStText text ) : bool

Makes more acessible the means of testing for interesting texts.

OccurrenceFromHvo ( int hvo ) : IParaFragment

Makes the actual analysis occurrence available (e.g., for configuring the appropriate interlinear view).

OnItemDataModified ( object argument ) : void

This is invoked by reflection when the Respeller dialog changes the frequency of a wordform.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
Refresh ( ) : void

Refresh your cached properties.

RemoveNotification ( IVwNotifyChange nchng ) : void
ResumeRefresh ( ) : void
SetMediator ( Mediator mediator ) : void
SetOccurrences ( int hvo, IEnumerable occurrences ) : void

This is used by the ConcordanceControl (in ITextDll), which in various ways comes up with a list of occurrences to display in a concordance browse view. Often the occurrences made in this way do not have a meaningful Index, but we are not using that here. We make a dummy HVO for the root as well as the items, if we don't already have one.

SuspendRefresh ( ) : void
UpdateAnalysisOccurrences ( IAnalysis obj, bool includeChildren ) : void
UpdateExactAnalysisOccurrences ( IAnalysis obj ) : void

Make sure we have the right list of occurrences for the specified analysis (assumes we are using ExactOccurrences).

UpdateOccurrences ( int values ) : void

Update the occurrences list (kflidConcOccurrences of LangProject) to the specified array, without sending PropChanged. (Typically used during ReloadList.)

VecProp ( int hvo, int tag ) : int[]
get_BooleanProp ( int hvo, int tag ) : bool
get_IntProp ( int hvo, int tag ) : int
get_MultiStringAlt ( int hvo, int tag, int ws ) : ITsString
get_ObjectProp ( int hvo, int tag ) : int
get_StringProp ( int hvo, int tag ) : ITsString
get_VecItem ( int hvo, int tag, int index ) : int
get_VecSize ( int hvo, int tag ) : int

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

Метод Описание
AddAdditionalOccurrences ( int hvoWf, IParaFragment>.Dictionary occurrences, int &nextId, List valuesList ) : void

Overridden in RespellingSda to add caption occurrences.

ReplaceAnalysisOccurrences ( int hvo, int values ) : void

Replace the occurrence values for a WfiWordform. Assume that all of the values are already registered in m_occurrences through previous calls to GetAnalysisOccurrences().

This is used by the Respelling subclass of this decorator.

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

Метод Описание
BelongsToInterestingText ( ISegment seg ) : bool
EmptyUserString ( ) : ITsString
GetAnalysisOccurrences ( int hvo ) : int[]
GetAnalysisOccurrences ( int hvo, bool includeChildren ) : int[]

Get the occurrences of a particular analysis in the currently interesting texts.

GetSenseOccurrences ( int hvo ) : int[]

Get the values we want for the occurrences of the specified LexSE HVO.

GetStText ( int hvoOccurrence ) : IStText
m_interestingTexts_InterestingTextsChanged ( object sender, InterestingTextsChangedArgs e ) : void

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

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

Overridden in RespellingSda to add caption occurrences.
protected AddAdditionalOccurrences ( int hvoWf, IParaFragment>.Dictionary occurrences, int &nextId, List valuesList ) : void
hvoWf int
occurrences IParaFragment>.Dictionary
nextId int
valuesList List
Результат void

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

Count the things that are interested in us so that, when there are no more, we can indicate that we no longer care about changes to the collection of interesting texts. Review JohnT: could it ever happen that we regain our interest in those changes, getting a new notifiee after we lost our last one?
public AddNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
Результат void

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

public ConcDecorator ( ISilDataAccessManaged domainDataByFlid, XmlNode configurationNode, IFdoServiceLocator services ) : System
domainDataByFlid ISilDataAccessManaged
configurationNode System.Xml.XmlNode
services IFdoServiceLocator
Результат System

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

Makes more acessible the means of testing for interesting texts.
public IsInterestingText ( IStText text ) : bool
text IStText
Результат bool

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

Makes the actual analysis occurrence available (e.g., for configuring the appropriate interlinear view).
public OccurrenceFromHvo ( int hvo ) : IParaFragment
hvo int
Результат IParaFragment

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

This is invoked by reflection when the Respeller dialog changes the frequency of a wordform.
public OnItemDataModified ( object argument ) : void
argument object
Результат void

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

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
Результат void

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

Refresh your cached properties.
public Refresh ( ) : void
Результат void

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

public RemoveNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
Результат void

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

Replace the occurrence values for a WfiWordform. Assume that all of the values are already registered in m_occurrences through previous calls to GetAnalysisOccurrences().
This is used by the Respelling subclass of this decorator.
protected ReplaceAnalysisOccurrences ( int hvo, int values ) : void
hvo int
values int
Результат void

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

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

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

public SetMediator ( Mediator mediator ) : void
mediator Mediator
Результат void

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

This is used by the ConcordanceControl (in ITextDll), which in various ways comes up with a list of occurrences to display in a concordance browse view. Often the occurrences made in this way do not have a meaningful Index, but we are not using that here. We make a dummy HVO for the root as well as the items, if we don't already have one.
public SetOccurrences ( int hvo, IEnumerable occurrences ) : void
hvo int
occurrences IEnumerable
Результат void

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

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

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

public UpdateAnalysisOccurrences ( IAnalysis obj, bool includeChildren ) : void
obj IAnalysis
includeChildren bool
Результат void

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

Make sure we have the right list of occurrences for the specified analysis (assumes we are using ExactOccurrences).
public UpdateExactAnalysisOccurrences ( IAnalysis obj ) : void
obj IAnalysis
Результат void

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

Update the occurrences list (kflidConcOccurrences of LangProject) to the specified array, without sending PropChanged. (Typically used during ReloadList.)
public UpdateOccurrences ( int values ) : void
values int
Результат void

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

public VecProp ( int hvo, int tag ) : int[]
hvo int
tag int
Результат int[]

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

public get_BooleanProp ( int hvo, int tag ) : bool
hvo int
tag int
Результат bool

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

public get_IntProp ( int hvo, int tag ) : int
hvo int
tag int
Результат int

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

public get_MultiStringAlt ( int hvo, int tag, int ws ) : ITsString
hvo int
tag int
ws int
Результат ITsString

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

public get_ObjectProp ( int hvo, int tag ) : int
hvo int
tag int
Результат int

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

public get_StringProp ( int hvo, int tag ) : ITsString
hvo int
tag int
Результат ITsString

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

public get_VecItem ( int hvo, int tag, int index ) : int
hvo int
tag int
index int
Результат int

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

public get_VecSize ( int hvo, int tag ) : int
hvo int
tag int
Результат int