gws.base.ows.client.model

Generic OWS model.

Source code: gws.base.ows.client.model

Module Contents

class gws.base.ows.client.model.Object

Bases: gws.base.model.default_model.Object

Generic OWS model.

Read-only model that reads features from the queryable source layers of an OWS service provider. Clients cannot create, update or delete features.

provider: gws.OwsServiceProvider

Service provider.

sourceLayers: list[gws.SourceLayer]

Source layers to read features from.

configure()

Configuration hook.

Called when the node is initialized. Raising an exception here aborts the creation of the node.

configure_provider()

Configure the data provider of the model.

The base implementation does nothing.

Returns:

True if a provider was configured.

configure_source_layers()

Select the queryable source layers of the provider, or those given in the configuration.

Returns:

Always True.

configure_sources()

Configure the data sources of the model.

The base implementation does nothing.

Returns:

True if sources were configured.

find_features(search, mc)

Find features matching a search query.

Parameters:
  • search – The search query.

  • mc – The model context.

Returns:

The features found.

props(user)

Generate a Props struct for this object.

Do not call this method directly, use gws.props_of instead, which also checks permissions.

Parameters:

user – The user for which the props should be generated.

Returns:

A Props object or a dict. Nested objects are converted to props as well.