gws.base.search.finder

Source code: gws.base.search.finder

Module Contents

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

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

withGeometry: bool = True

enable geometry search

withKeyword: bool = True

enable keyword search

withFilter: bool = True

enable filter search

class gws.base.search.finder.Object

Bases: gws.Finder

Finder object.

spatialContext: SpatialContext
configure()

Configuration hook.

configure_models()
configure_templates()
can_run(search, user)
context_shape(search: gws.SearchQuery) gws.Shape
run(search, user, layer=None)