gws.base.search.finder

Source code: gws.base.search.finder

Module Contents

class gws.base.search.finder.Config(*args, **kwargs)

Bases: gws.ConfigWithAccess

Basic config with permissions.

models: list[gws.ext.config.model] | None

data models for features

spatialContext: SpatialContext | None

spatial context for keyword searches

templates: list[gws.ext.config.template] | None

feature formatting templates

title: str | None

provider title

withFilter: bool = True

enable filter search

withGeometry: bool = True

enable geometry search

withKeyword: bool = True

enable keyword search

class gws.base.search.finder.Object

Bases: gws.Finder

Finder object.

spatialContext: SpatialContext
can_run(search, user)
configure()

Configuration hook.

configure_models()
configure_templates()
context_shape(search: gws.SearchQuery) gws.Shape
run(search, user, layer=None)
class gws.base.search.finder.SpatialContext

Bases: gws.Enum

Enumeration type.

Despite being declared as extending Enum (for IDE support), this class is actually just a simple object and intended to be used as a collection of attributes. It doesn’t provide any Enum-specific utilities.

The rationale behind this is that we need Enum members (e.g. Color.RED) to be scalars, and not complex objects as in the standard Enum.

map = 'map'

search in the map extent

view = 'view'

search in the client view extent