QGIS API Documentation  3.0.2-Girona (307d082)
Classes | Public Member Functions | List of all members
QgsMetadataValidator Class Referenceabstract

Abstract base class for metadata validators. More...

#include <qgslayermetadatavalidator.h>

Inheritance diagram for QgsMetadataValidator:
Inheritance graph
[legend]

Classes

struct  ValidationResult
 Contains the parameters describing a metadata validation failure. More...
 

Public Member Functions

virtual ~QgsMetadataValidator ()=default
 
virtual bool validate (const QgsLayerMetadata &metadata, QList< QgsMetadataValidator::ValidationResult > &results) const =0
 Validates a metadata object, and returns true if the metadata is considered valid. More...
 

Detailed Description

Abstract base class for metadata validators.

Since
QGIS 3.0

Definition at line 33 of file qgslayermetadatavalidator.h.

Constructor & Destructor Documentation

◆ ~QgsMetadataValidator()

virtual QgsMetadataValidator::~QgsMetadataValidator ( )
virtualdefault

Member Function Documentation

◆ validate()

virtual bool QgsMetadataValidator::validate ( const QgsLayerMetadata metadata,
QList< QgsMetadataValidator::ValidationResult > &  results 
) const
pure virtual

Validates a metadata object, and returns true if the metadata is considered valid.

If validation fails, the results list will be filled with a list of items describing why the validation failed and what needs to be rectified to fix the metadata.

Implemented in QgsNativeMetadataValidator.


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