QGIS API Documentation 3.39.0-Master (3783037d301)
|
Result record of layer metadata provider search. More...
#include <qgsabstractlayermetadataprovider.h>
Public Member Functions | |
QgsLayerMetadataProviderResult ()=default | |
QgsLayerMetadataProviderResult (const QgsLayerMetadata &metadata) | |
Constructor for QgsLayerMetadataProviderResult. | |
const QString & | authid () const |
Returns the layer CRS authid. | |
const QString & | dataProviderName () const |
Returns the data provider name. | |
const QgsPolygon & | geographicExtent () const |
Returns the layer extent in EPSG:4326. | |
Qgis::GeometryType | geometryType () const |
Returns the layer geometry type. | |
Qgis::LayerType | layerType () const |
Returns the layer type. | |
void | setAuthid (const QString &authid) |
Sets the layer authid. | |
void | setDataProviderName (const QString &dataProviderName) |
Sets the data provider name to dataProviderName. | |
void | setGeographicExtent (const QgsPolygon &geographicExtent) |
Sets the layer extent in EPSG:4326 to geographicExtent. | |
void | setGeometryType (Qgis::GeometryType geometryType) |
Sets the layer geometry type to geometryType. | |
void | setLayerType (Qgis::LayerType layerType) |
Sets the layer type to layerType. | |
void | setStandardUri (const QString &standardUri) |
Sets the metadata standard URI to standardUri. | |
void | setUri (const QString &Uri) |
Sets the layer data source URI to Uri. | |
const QString & | standardUri () const |
Returns the metadata standard URI (usually "http://mrcc.com/qgis.dtd") | |
const QString & | uri () const |
Returns the layer data source URI. | |
Public Member Functions inherited from QgsLayerMetadata | |
QgsLayerMetadata ()=default | |
void | addConstraint (const QgsLayerMetadata::Constraint &constraint) |
Adds an individual constraint to the existing constraints. | |
QgsLayerMetadata * | clone () const override |
Clones the metadata object. | |
void | combine (const QgsAbstractMetadataBase *other) override |
Combines the metadata from this object with the metadata from an other object. | |
QgsLayerMetadata::ConstraintList | constraints () const |
Returns a list of constraints associated with using the resource. | |
bool | contains (const QString &searchString) const |
Returns true if the metadata identifier, title, abstract, keywords or categories contain searchString using case-insensitive search. | |
QgsCoordinateReferenceSystem | crs () const |
Returns the coordinate reference system described by the layer's metadata. | |
QString | encoding () const |
Returns the character encoding of the data in the resource. | |
QgsLayerMetadata::Extent & | extent () |
Returns the spatial and temporal extents associated with the resource. | |
const QgsLayerMetadata::Extent & | extent () const |
Returns the spatial and temporal extents associated with the resource. | |
QString | fees () const |
Returns any fees associated with using the resource. | |
QStringList | licenses () const |
Returns a list of licenses associated with the resource (examples: http://opendefinition.org/licenses/). | |
bool | matches (const QVector< QRegularExpression > &searchReList) const |
Returns true if the metadata identifier, title, abstract, keywords or categories matches any regular expression from searchReList. | |
bool | operator== (const QgsLayerMetadata &metadataOther) const |
void | readFromLayer (const QgsMapLayer *layer) |
Reads the metadata state from a layer's custom properties (see QgsMapLayer::customProperty() ). | |
bool | readMetadataXml (const QDomElement &metadataElement) override |
Sets state from DOM document. | |
QStringList | rights () const |
Returns a list of attribution or copyright strings associated with the resource. | |
void | saveToLayer (QgsMapLayer *layer) const |
Saves the metadata to a layer's custom properties (see QgsMapLayer::setCustomProperty() ). | |
void | setConstraints (const QgsLayerMetadata::ConstraintList &constraints) |
Sets the list of constraints associated with using the resource. | |
void | setCrs (const QgsCoordinateReferenceSystem &crs) |
Sets the coordinate reference system for the layer's metadata. | |
void | setEncoding (const QString &encoding) |
Sets the character encoding of the data in the resource. | |
void | setExtent (const QgsLayerMetadata::Extent &extent) |
Sets the spatial and temporal extents associated with the resource. | |
void | setFees (const QString &fees) |
Sets the fees associated with using the resource. | |
void | setLicenses (const QStringList &licenses) |
Sets a list of licenses associated with the resource. | |
void | setRights (const QStringList &rights) |
Sets a list of rights (attribution or copyright strings) associated with the resource. | |
bool | writeMetadataXml (QDomElement &metadataElement, QDomDocument &document) const override |
Stores state in a DOM node. | |
Public Member Functions inherited from QgsAbstractMetadataBase | |
virtual | ~QgsAbstractMetadataBase ()=default |
QString | abstract () const |
Returns a free-form description of the resource. | |
void | addContact (const QgsAbstractMetadataBase::Contact &contact) |
Adds an individual contact to the existing contacts. | |
void | addHistoryItem (const QString &text) |
Adds a single history text to the end of the existing history list. | |
void | addKeywords (const QString &vocabulary, const QStringList &keywords) |
Adds a list of descriptive keywords for a specified vocabulary. | |
void | addLink (const QgsAbstractMetadataBase::Link &link) |
Adds an individual link to the existing links. | |
QStringList | categories () const |
Returns categories of the resource. | |
QgsAbstractMetadataBase::ContactList | contacts () const |
Returns a list of contact persons or entities associated with the resource. | |
QDateTime | dateTime (Qgis::MetadataDateType type) const |
Returns the date for the specified date type. | |
QStringList | history () const |
Returns a freeform description of the history or lineage of the resource. | |
QString | identifier () const |
A reference, URI, URL or some other mechanism to identify the resource. | |
QgsAbstractMetadataBase::KeywordMap | keywords () const |
Returns the keywords map, which is a set of descriptive keywords associated with the resource. | |
QStringList | keywords (const QString &vocabulary) const |
Returns a list of keywords for the specified vocabulary. | |
QStringList | keywordVocabularies () const |
Returns a list of keyword vocabularies contained in the metadata. | |
QString | language () const |
Returns the human language associated with the resource. | |
QgsAbstractMetadataBase::LinkList | links () const |
Returns a list of online resources associated with the resource. | |
QString | parentIdentifier () const |
A reference, URI, URL or some other mechanism to identify the parent resource that this resource is a part (child) of. | |
bool | removeKeywords (const QString &vocabulary) |
Remove a vocabulary from the list. | |
void | setAbstract (const QString &abstract) |
Sets a free-form abstract (description) of the resource. | |
void | setCategories (const QStringList &categories) |
Sets categories of the resource. | |
void | setContacts (const QgsAbstractMetadataBase::ContactList &contacts) |
Sets the list of contacts or entities associated with the resource. | |
void | setDateTime (Qgis::MetadataDateType type, QDateTime date) |
Sets a date value for the specified date type. | |
void | setHistory (const QStringList &history) |
Sets the freeform description of the history or lineage of the resource. | |
void | setIdentifier (const QString &identifier) |
Sets the reference, URI, URL or some other mechanism to identify the resource. | |
void | setKeywords (const QgsAbstractMetadataBase::KeywordMap &keywords) |
Sets the keywords map, which is a set of descriptive keywords associated with the resource. | |
void | setLanguage (const QString &language) |
Sets the human language associated with the resource. | |
void | setLinks (const QgsAbstractMetadataBase::LinkList &links) |
Sets the list of online resources associated with the resource. | |
void | setParentIdentifier (const QString &parentIdentifier) |
Sets a reference, URI, URL or some other mechanism to identify the parent resource that this resource is a part (child) of. | |
void | setTitle (const QString &title) |
Sets the human readable title (name) of the resource, typically displayed in search results. | |
void | setType (const QString &type) |
Sets the type (nature) of the resource. | |
QString | title () const |
Returns the human readable name of the resource, typically displayed in search results. | |
QString | type () const |
Returns the nature of the resource. | |
Additional Inherited Members | |
Public Types inherited from QgsLayerMetadata | |
typedef QList< QgsLayerMetadata::Constraint > | ConstraintList |
A list of constraints. | |
Public Types inherited from QgsAbstractMetadataBase | |
typedef QList< QgsAbstractMetadataBase::Contact > | ContactList |
A list of contacts. | |
typedef QMap< QString, QStringList > | KeywordMap |
Map of vocabulary string to keyword list. | |
typedef QList< QgsAbstractMetadataBase::Link > | LinkList |
A list of links. | |
Protected Member Functions inherited from QgsAbstractMetadataBase | |
QgsAbstractMetadataBase ()=default | |
Constructor for QgsAbstractMetadataBase. | |
bool | equals (const QgsAbstractMetadataBase &other) const |
Tests whether the common metadata fields in this object are equal to other. | |
Protected Attributes inherited from QgsAbstractMetadataBase | |
QString | mAbstract |
QgsAbstractMetadataBase::ContactList | mContacts |
QMap< Qgis::MetadataDateType, QDateTime > | mDates |
Metadata dates. | |
QStringList | mHistory |
QString | mIdentifier |
QgsAbstractMetadataBase::KeywordMap | mKeywords |
Keywords map. | |
QString | mLanguage |
QgsAbstractMetadataBase::LinkList | mLinks |
QString | mParentIdentifier |
QString | mTitle |
QString | mType |
Result record of layer metadata provider search.
The result contains QGIS metadata information and all information that is required by QGIS to load the layer and to filter the results.
The class extends QgsLayerMetadata by adding information taken directly from the provider which is required for filtering (geographic extent) or because the actual values may be different by those stored in the metadata (CRS authid) or totally missing from the metadata (data provider name and layer type).
Definition at line 59 of file qgsabstractlayermetadataprovider.h.
QgsLayerMetadataProviderResult::QgsLayerMetadataProviderResult | ( | const QgsLayerMetadata & | metadata | ) |
Constructor for QgsLayerMetadataProviderResult.
metadata | layer metadata. |
Definition at line 43 of file qgsabstractlayermetadataprovider.cpp.
|
default |
const QString & QgsLayerMetadataProviderResult::authid | ( | ) | const |
Returns the layer CRS authid.
Definition at line 69 of file qgsabstractlayermetadataprovider.cpp.
const QString & QgsLayerMetadataProviderResult::dataProviderName | ( | ) | const |
Returns the data provider name.
Definition at line 89 of file qgsabstractlayermetadataprovider.cpp.
const QgsPolygon & QgsLayerMetadataProviderResult::geographicExtent | ( | ) | const |
Returns the layer extent in EPSG:4326.
Definition at line 49 of file qgsabstractlayermetadataprovider.cpp.
Qgis::GeometryType QgsLayerMetadataProviderResult::geometryType | ( | ) | const |
Returns the layer geometry type.
Definition at line 59 of file qgsabstractlayermetadataprovider.cpp.
Qgis::LayerType QgsLayerMetadataProviderResult::layerType | ( | ) | const |
Returns the layer type.
Definition at line 99 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setAuthid | ( | const QString & | authid | ) |
Sets the layer authid.
Definition at line 74 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setDataProviderName | ( | const QString & | dataProviderName | ) |
Sets the data provider name to dataProviderName.
Definition at line 94 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setGeographicExtent | ( | const QgsPolygon & | geographicExtent | ) |
Sets the layer extent in EPSG:4326 to geographicExtent.
Definition at line 54 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setGeometryType | ( | Qgis::GeometryType | geometryType | ) |
Sets the layer geometry type to geometryType.
Definition at line 64 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setLayerType | ( | Qgis::LayerType | layerType | ) |
Sets the layer type to layerType.
Definition at line 104 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setStandardUri | ( | const QString & | standardUri | ) |
Sets the metadata standard URI to standardUri.
Definition at line 114 of file qgsabstractlayermetadataprovider.cpp.
void QgsLayerMetadataProviderResult::setUri | ( | const QString & | Uri | ) |
Sets the layer data source URI to Uri.
Definition at line 84 of file qgsabstractlayermetadataprovider.cpp.
const QString & QgsLayerMetadataProviderResult::standardUri | ( | ) | const |
Returns the metadata standard URI (usually "http://mrcc.com/qgis.dtd")
Definition at line 109 of file qgsabstractlayermetadataprovider.cpp.
const QString & QgsLayerMetadataProviderResult::uri | ( | ) | const |
Returns the layer data source URI.
Definition at line 79 of file qgsabstractlayermetadataprovider.cpp.