Maria GDK 4.5.0.137
Documentation of managed code in release branch
Loading...
Searching...
No Matches
TPG.GeoFramework.SearchLayer.SearchLayerViewModel Class Reference

View model for layer with search capabilities. More...

Inheritance diagram for TPG.GeoFramework.SearchLayer.SearchLayerViewModel:
TPG.GeoFramework.Core.GeoLayerViewModel TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel TPG.GeoFramework.Core.ViewModelBase TPG.GeoFramework.Contracts.Geo.Layer.IGeoLayerViewModel TPG.GeoFramework.Contracts.Geo.Layer.IGeoLayerViewModel TPG.GeoFramework.Contracts.Geo.Layer.IViewModelBase TPG.GeoFramework.Contracts.Geo.Layer.IViewModelBase TPG.GeoFramework.Contracts.Geo.Layer.IViewModelBase

Classes

class  TotalSearchResult
 Contains total search result information. More...
 

Public Member Functions

 SearchLayerViewModel (IGeoContext geoContext, IGeoNavigator geoNavigator, ISearchLayerViewFactory viewFactory)
 Constructor.
 
ISearchQuery NavigateBack ()
 Execute navigate back command.
Returns
Query used to navigate back.

 
bool CanNavigateBack ()
 Can execute navigate back handler.
Returns
True if backward navigation is possible, otherwise false.

 
void Search (ISearchQuery searchQuery)
 Search all providers given a text.
Parameters
searchQuerySearch query information.

 
void Search (ISearchQuery searchQuery, ISearchSources searchSources)
 Search all providers given a text.
Parameters
searchQuerySearch query information.
searchSourcesSearch sources.

 
void SearchInRange (GeoPos centerPos, double rangeMeters, int maxCount)
 Get place names within a range from a center position.
Parameters
centerPosCenter position.
rangeMetersRange in meters.
maxCountMax place names to return.


 
void SearchInRange (GeoPos centerPos, double rangeMeters, int maxCount, ISearchSources searchSources)
 Get place names within a range from a center position.
Parameters
centerPosCenter position.
rangeMetersRange in meters.
maxCountMax place names to return.
searchSourcesSearch sources.


 
void Clear (bool clearHistory=true)
 Clear search layer.
Parameters
clearHistoryIf true clears backward search navigation. Default is true.


 
override void Update ()
 Event called at regular intervals to update contents of the layer.
 
override void HandleInputEvent (GeoInputEventArgs inputEventArgs)
 Called to forward events to the layer.
Parameters
inputEventArgs
If the layer handles the event, it must set the Handled property to true.
 
- Public Member Functions inherited from TPG.GeoFramework.Core.GeoLayerViewModel
 GeoLayerViewModel (IGeoContext geoContext, IGeoNavigator geoNavigator)
 
abstract void HandleInputEvent (GeoInputEventArgs inputEventArgs)
 Called to forward events to the layer.
 
virtual void Generate ()
 Requests that the layer generates it's view.
 
abstract void Update ()
 Event called at regular intervals to update contents of the layer.
 
virtual void SetDirty (bool isDirty)
 Sets a boolean value indicating the need for an update of the contents of a layer.
 
void SetDirty (object sender)
 Sets dirty flag and stores sender, use to avoid cyclic dirtying.
 
virtual bool IsDirty ()
 
- Public Member Functions inherited from TPG.GeoFramework.Core.ViewModelBase
void Dispose ()
 Invoked when this object is being removed from the application and will be subject to garbage collection.
 
void HandleInputEvent (GeoInputEventArgs inputEventArgs)
 Called to forward events to the layer.
 
void Generate ()
 Requests that the layer generates it's view.
 
void Update ()
 Event called at regular intervals to update contents of the layer.
 
void SetDirty (bool isDirty)
 Sets a boolean value indicating the need for an update of the contents of a layer.
 
void SetDirty (object dirtySource)
 Sets dirty flag and stores sender, use to avoid cyclic dirtying.
 
bool IsDirty ()
 
void Search (ISearchQuery searchQuery)
 Search all providers given a text.
 
void Search (ISearchQuery searchQuery, ISearchSources searchSources)
 Search all providers given a text.
 
void SearchInRange (GeoPos centerPos, double rangeMeters, int maxCount)
 Get place names within a range from a center position.
 
void SearchInRange (GeoPos centerPos, double rangeMeters, int maxCount, ISearchSources searchSources)
 Get place names within a range from a center position.
 
void Clear (bool clearHistory=true)
 Clear search layer.
 
ISearchQuery NavigateBack ()
 Execute navigate back command.
 
bool CanNavigateBack ()
 Can execute navigate back handler.
 

Protected Member Functions

List< PlaceNameItemPerformSearchInRange (GeoPos centerPos, double rangeMeters, int maxCount, ISearchSources datasources, CancellationToken ct)
 
TotalSearchResult SearchAndSortResult (ISearchQuery searchQuery, ISearchSources datasources, CancellationToken ct)
 Search for matches and sort result.
 
- Protected Member Functions inherited from TPG.GeoFramework.Core.GeoLayerViewModel
virtual void SetVisible (bool value)
 
override void OnDispose (bool disposing)
 Make sure that all layers disconnect their shared GeoContexts.
 
- Protected Member Functions inherited from TPG.GeoFramework.Core.ViewModelBase
virtual void OnDispose (bool disposing)
 Child classes can override this method to perform clean-up logic, such as removing event handlers.
 
void NotifyPropertyChanged< TProperty > (Expression< Func< TProperty > > property, INotifyPropertyChanged sender)
 
void NotifyPropertyChanged (string propertyName)
 
virtual void OnPropertyChanged ([CallerMemberName] string propertyName=null)
 

Protected Attributes

readonly Stack< Tuple< ISearchQuery, SearchSources > > _searchQueries
 
- Protected Attributes inherited from TPG.GeoFramework.Core.GeoLayerViewModel
string _name = null
 

Properties

int MinimumFacetOccurenceFilter [get, set]
 Get or set the minimum number of occurences of a facet for it to be returned by a search operation.
 
bool ShowSearchMatchName [get, set]
 Get or set if search match name is shown.
 
bool ShowSearchMatchMark [get, set]
 Get or set if a mark is displayed at the search match position.
 
List< ISearchProviderSearchProviders [get, set]
 Get or set serach providers.
 
List< ISearchMatchRendererSearchMatchRenderers [get, set]
 Get or set search match renderers.
 
List< string > SimplifiedSearchMatchRenderingFilter [get, set]
 Get or set kist of ids which should have simplified rendering.
 
ISearchMatch SelectedSearchMatch [get, set]
 Get or set selected search match.
 
Dictionary< string, int > TotalMatchCount [get]
 Get or set total number of matches.
 
ObservableCollection< PlaceNameItemSearchInRangeResult [get]
 Get Search in Range result.
 
ObservableCollection< ISearchMatchSearchMatches [get, set]
 Get Search matches.
 
ObservableCollection< ISearchFacetFacets [get]
 Get facets.
 
ObservableCollection< ISearchFacetSelectedFacets [get]
 Get selected facets.
 
bool ExtractFacets [get, set]
 Get or set if facets should be extracted. Default is true.
 
bool UseGeoLimits [get, set]
 Get or set if geo limits should be used in searches. Default is true.
 
bool ReturnResultDatasources [get, set]
 Get or set if datasources should be returned with matches. Default is true.
 
- Properties inherited from TPG.GeoFramework.Core.GeoLayerViewModel
IGeoControlViewModel GeoControlViewModel [get, set]
 Get or set geo control view model.
 
UIElement Tooltip [get, set]
 Get or set tooltip UI element.
 
string Name [get]
 A name representing the type of layer.
 
bool Visible [get, set]
 Gets or sets the visibility of the layer.
 
IGeoContext GeoContext [get, set]
 Gets or sets the GeoContext related to the layer.
 
IGeoNavigator GeoNavigator [get, set]
 Gets or sets the GeoNavigator related to the GeoControl.
 
IGeoLayerViewFactory GeoLayerViewFactory [get, set]
 Gets a factory responsible for creating a IGeoLayerViewFactory view.
 
IGeoLayerView GeoLayerView [get, set]
 Gets or sets the view associated with this view model.
 
ClipMargins ClipMargins [get, set]
 Enables or disables clipping of the contents of the view, based on the specifed clip margins.
 
HashSet< object > DirtySources [get]
 All contributors to current dirty.
 
- Properties inherited from TPG.GeoFramework.Core.ViewModelBase
virtual string DisplayName [get, protected set]
 Returns the user-friendly name of this object. Child classes can set this property to a new value, or override it to determine the value on-demand.
 
- Properties inherited from TPG.GeoFramework.Contracts.Geo.Layer.IViewModelBase
string DisplayName [get]
 
- Properties inherited from TPG.GeoFramework.Contracts.Geo.Layer.IGeoLayerViewModel
string Name [get]
 A name representing the type of layer.
 
bool Visible [get, set]
 Gets or sets the visibility of the layer.
 
IGeoContext GeoContext [get, set]
 Gets or sets the GeoContext related to the layer.
 
IGeoLayerViewFactory GeoLayerViewFactory [get]
 Gets a factory responsible for creating a IGeoLayerViewFactory view.
 
IGeoLayerView GeoLayerView [get, set]
 Gets or sets the view associated with this view model.
 
IGeoNavigator GeoNavigator [get, set]
 Gets or sets the GeoNavigator related to the GeoControl.
 
IGeoControlViewModel GeoControlViewModel [get, set]
 Get or set geo control view model.
 
ClipMargins ClipMargins [get, set]
 Enables or disables clipping of the contents of the view, based on the specifed clip margins.
 
HashSet< object > DirtySources [get]
 All contributors to current dirty.
 
UIElement Tooltip [get, set]
 Get or set tooltip UI element.
 
- Properties inherited from TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel
int MinimumFacetOccurenceFilter [get, set]
 Get or set the minimum number of occurences of a facet for it to be returned by a search operation.
 
List< string > SimplifiedSearchMatchRenderingFilter [get, set]
 Get or set kist of ids which should have simplified rendering.
 
ObservableCollection< PlaceNameItemSearchInRangeResult [get]
 Get Search in Range result.
 
ObservableCollection< ISearchMatchSearchMatches [get, set]
 Get Search matches.
 
ObservableCollection< ISearchFacetFacets [get]
 Get facets.
 
ObservableCollection< ISearchFacetSelectedFacets [get]
 Get selected facets.
 
List< ISearchProviderSearchProviders [get, set]
 Get or set serach providers.
 
List< ISearchMatchRendererSearchMatchRenderers [get, set]
 Get or set search match renderers.
 
ISearchMatch SelectedSearchMatch [get, set]
 Get or set selected search match.
 
bool ShowSearchMatchName [get, set]
 Get or set if search match name is shown.
 
bool ShowSearchMatchMark [get, set]
 Get or set if a mark is displayed at the search match position.
 
Dictionary< string, int > TotalMatchCount [get]
 Get or set total number of matches.
 
bool ExtractFacets [get, set]
 Get or set if facets should be extracted. Default is true.
 
bool UseGeoLimits [get, set]
 Get or set if geo limits should be used in searches. Default is true.
 
bool ReturnResultDatasources [get, set]
 Get or set if datasources should be returned with matches. Default is true.
 

Events

SearchMatchSelectionChangedEventHandler SearchMatchSelectionChanged = delegate { }
 
SearchCompletedEventHandler SearchCompleted = delegate { }
 
SearchCompletedEventHandler SearchInRangeCompleted = delegate { }
 
- Events inherited from TPG.GeoFramework.Core.GeoLayerViewModel
VisibleChangedEventHandler VisibleChanged = delegate { }
 
LayerChangedEventHandler LayerChanged = delegate { }
 
- Events inherited from TPG.GeoFramework.Core.ViewModelBase
PropertyChangedEventHandler PropertyChanged = delegate { }
 Raised when a property on this object has a new value.
 
- Events inherited from TPG.GeoFramework.Contracts.Geo.Layer.IGeoLayerViewModel
VisibleChangedEventHandler VisibleChanged
 Visibility changed.
 
LayerChangedEventHandler LayerChanged
 Layer changed.
 
- Events inherited from TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel
SearchMatchSelectionChangedEventHandler SearchMatchSelectionChanged
 Identifies the search match selection changed event.
 
SearchCompletedEventHandler SearchCompleted
 Identifies the search completed event.
 
SearchCompletedEventHandler SearchInRangeCompleted
 Identifies the search-in-range completed event.
 

Detailed Description

View model for layer with search capabilities.

Constructor & Destructor Documentation

◆ SearchLayerViewModel()

TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchLayerViewModel ( IGeoContext  geoContext,
IGeoNavigator  geoNavigator,
ISearchLayerViewFactory  viewFactory 
)
inline

Constructor.

Parameters
geoContextGeo context.
geoNavigatorGeo navigator.
viewFactoryLayer view factory.


Member Function Documentation

◆ CanNavigateBack()

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.CanNavigateBack ( )
inline

Can execute navigate back handler.

Returns
True if backward navigation is possible, otherwise false.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ Clear()

void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.Clear ( bool  clearHistory = true)
inline

Clear search layer.

Parameters
clearHistoryIf true clears backward search navigation. Default is true.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ HandleInputEvent()

override void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.HandleInputEvent ( GeoInputEventArgs  inputEventArgs)
inlinevirtual

Called to forward events to the layer.

Parameters
inputEventArgs
If the layer handles the event, it must set the Handled property to true.

Implements TPG.GeoFramework.Core.GeoLayerViewModel.

◆ NavigateBack()

ISearchQuery TPG.GeoFramework.SearchLayer.SearchLayerViewModel.NavigateBack ( )
inline

Execute navigate back command.

Returns
Query used to navigate back.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ Search() [1/2]

void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.Search ( ISearchQuery  searchQuery)
inline

Search all providers given a text.

Parameters
searchQuerySearch query information.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ Search() [2/2]

void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.Search ( ISearchQuery  searchQuery,
ISearchSources  searchSources 
)
inline

Search all providers given a text.

Parameters
searchQuerySearch query information.
searchSourcesSearch sources.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SearchAndSortResult()

TotalSearchResult TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchAndSortResult ( ISearchQuery  searchQuery,
ISearchSources  datasources,
CancellationToken  ct 
)
inlineprotected

Search for matches and sort result.

Parameters
searchQuerySearch query.
ctCancelation token to check if cancelation is requested.
Returns
Sorted search result.

◆ SearchInRange() [1/2]

void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchInRange ( GeoPos  centerPos,
double  rangeMeters,
int  maxCount 
)
inline

Get place names within a range from a center position.

Parameters
centerPosCenter position.
rangeMetersRange in meters.
maxCountMax place names to return.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SearchInRange() [2/2]

void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchInRange ( GeoPos  centerPos,
double  rangeMeters,
int  maxCount,
ISearchSources  searchSources 
)
inline

Get place names within a range from a center position.

Parameters
centerPosCenter position.
rangeMetersRange in meters.
maxCountMax place names to return.
searchSourcesSearch sources.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ Update()

override void TPG.GeoFramework.SearchLayer.SearchLayerViewModel.Update ( )
inlinevirtual

Event called at regular intervals to update contents of the layer.

Implements TPG.GeoFramework.Core.GeoLayerViewModel.

Property Documentation

◆ ExtractFacets

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.ExtractFacets
getset

Get or set if facets should be extracted. Default is true.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ Facets

ObservableCollection<ISearchFacet> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.Facets
get

◆ MinimumFacetOccurenceFilter

int TPG.GeoFramework.SearchLayer.SearchLayerViewModel.MinimumFacetOccurenceFilter
getset

Get or set the minimum number of occurences of a facet for it to be returned by a search operation.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ ReturnResultDatasources

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.ReturnResultDatasources
getset

Get or set if datasources should be returned with matches. Default is true.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SearchInRangeResult

ObservableCollection<PlaceNameItem> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchInRangeResult
get

Get Search in Range result.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SearchMatches

ObservableCollection<ISearchMatch> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchMatches
getset

◆ SearchMatchRenderers

List<ISearchMatchRenderer> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchMatchRenderers
getset

Get or set search match renderers.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SearchProviders

List<ISearchProvider> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SearchProviders
getset

Get or set serach providers.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SelectedFacets

ObservableCollection<ISearchFacet> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SelectedFacets
get

◆ SelectedSearchMatch

ISearchMatch TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SelectedSearchMatch
getset

Get or set selected search match.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ ShowSearchMatchMark

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.ShowSearchMatchMark
getset

Get or set if a mark is displayed at the search match position.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ ShowSearchMatchName

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.ShowSearchMatchName
getset

Get or set if search match name is shown.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ SimplifiedSearchMatchRenderingFilter

List<string> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.SimplifiedSearchMatchRenderingFilter
getset

Get or set kist of ids which should have simplified rendering.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ TotalMatchCount

Dictionary<string,int> TPG.GeoFramework.SearchLayer.SearchLayerViewModel.TotalMatchCount
get

Get or set total number of matches.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.

◆ UseGeoLimits

bool TPG.GeoFramework.SearchLayer.SearchLayerViewModel.UseGeoLimits
getset

Get or set if geo limits should be used in searches. Default is true.

Implements TPG.GeoFramework.SearchLayer.Contracts.ISearchLayerViewModel.


The documentation for this class was generated from the following file: