C# Class 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.
Inheritance: SIL.FieldWorks.FDO.Application.DomainDataByFlidDecoratorBase, IAnalysisOccurrenceFromHvo, ISetMediator, IRefreshCache
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

AddAdditionalOccurrences() protected méthode

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
Résultat void

AddNotification() public méthode

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
Résultat void

ConcDecorator() public méthode

public ConcDecorator ( ISilDataAccessManaged domainDataByFlid, XmlNode configurationNode, IFdoServiceLocator services ) : System
domainDataByFlid ISilDataAccessManaged
configurationNode System.Xml.XmlNode
services IFdoServiceLocator
Résultat System

IsInterestingText() public méthode

Makes more acessible the means of testing for interesting texts.
public IsInterestingText ( IStText text ) : bool
text IStText
Résultat bool

OccurrenceFromHvo() public méthode

Makes the actual analysis occurrence available (e.g., for configuring the appropriate interlinear view).
public OccurrenceFromHvo ( int hvo ) : IParaFragment
hvo int
Résultat IParaFragment

OnItemDataModified() public méthode

This is invoked by reflection when the Respeller dialog changes the frequency of a wordform.
public OnItemDataModified ( object argument ) : void
argument object
Résultat void

PropChanged() public méthode

public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
Résultat void

Refresh() public méthode

Refresh your cached properties.
public Refresh ( ) : void
Résultat void

RemoveNotification() public méthode

public RemoveNotification ( IVwNotifyChange nchng ) : void
nchng IVwNotifyChange
Résultat void

ReplaceAnalysisOccurrences() protected méthode

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
Résultat void

ResumeRefresh() public méthode

public ResumeRefresh ( ) : void
Résultat void

SetMediator() public méthode

public SetMediator ( Mediator mediator ) : void
mediator Mediator
Résultat void

SetOccurrences() public méthode

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
Résultat void

SuspendRefresh() public méthode

public SuspendRefresh ( ) : void
Résultat void

UpdateAnalysisOccurrences() public méthode

public UpdateAnalysisOccurrences ( IAnalysis obj, bool includeChildren ) : void
obj IAnalysis
includeChildren bool
Résultat void

UpdateExactAnalysisOccurrences() public méthode

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
Résultat void

UpdateOccurrences() public méthode

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
Résultat void

VecProp() public méthode

public VecProp ( int hvo, int tag ) : int[]
hvo int
tag int
Résultat int[]

get_BooleanProp() public méthode

public get_BooleanProp ( int hvo, int tag ) : bool
hvo int
tag int
Résultat bool

get_IntProp() public méthode

public get_IntProp ( int hvo, int tag ) : int
hvo int
tag int
Résultat int

get_MultiStringAlt() public méthode

public get_MultiStringAlt ( int hvo, int tag, int ws ) : ITsString
hvo int
tag int
ws int
Résultat ITsString

get_ObjectProp() public méthode

public get_ObjectProp ( int hvo, int tag ) : int
hvo int
tag int
Résultat int

get_StringProp() public méthode

public get_StringProp ( int hvo, int tag ) : ITsString
hvo int
tag int
Résultat ITsString

get_VecItem() public méthode

public get_VecItem ( int hvo, int tag, int index ) : int
hvo int
tag int
index int
Résultat int

get_VecSize() public méthode

public get_VecSize ( int hvo, int tag ) : int
hvo int
tag int
Résultat int