Class: QgsAbstractLayerMetadataProvider

Layer metadata provider backend interface.

Added in version 3.28.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: id(), search()

Abstract Methods

id

Returns the id of the layer metadata provider implementation, usually the name of the data provider but it may be another unique identifier.

search

Searches for metadata optionally filtering by search string and geographic extent.

class qgis.core.QgsAbstractLayerMetadataProvider[source]

Bases: object

abstract id(self) str[source]

Returns the id of the layer metadata provider implementation, usually the name of the data provider but it may be another unique identifier.

Return type:

str

abstract search(self, searchContext: QgsMetadataSearchContext, searchString: str | None = '', geographicExtent: QgsRectangle = QgsRectangle(), feedback: QgsFeedback | None = None) QgsLayerMetadataSearchResults[source]

Searches for metadata optionally filtering by search string and geographic extent.

Parameters:
  • searchContext (QgsMetadataSearchContext) – context for the metadata search.

  • searchString (Optional[str] = '') – defines a filter to limit the results to the records where the search string appears in the “identifier”, “title” or “abstract” metadata fields, a case-insensitive comparison is used for the match.

  • geographicExtent (QgsRectangle = QgsRectangle()) – defines a filter where the spatial extent matches the given extent in EPSG:4326

  • feedback (Optional[QgsFeedback] = None) – can be used to monitor and control the search process.

Return type:

QgsLayerMetadataSearchResults

Returns:

a QgsLayerMetadataSearchResult object with a list of metadata and errors