37 results <<
ValidationResult( QObject::tr(
"identifier" ), QObject::tr(
"Identifier element is required." ) );
40 if ( metadata->
language().isEmpty() )
43 results <<
ValidationResult( QObject::tr(
"language" ), QObject::tr(
"Language element is required." ) );
46 if ( metadata->
type().isEmpty() )
49 results <<
ValidationResult( QObject::tr(
"type" ), QObject::tr(
"Type element is required." ) );
52 if ( metadata->
title().isEmpty() )
55 results <<
ValidationResult( QObject::tr(
"title" ), QObject::tr(
"Title element is required." ) );
58 if ( metadata->
abstract().isEmpty() )
61 results <<
ValidationResult( QObject::tr(
"abstract" ), QObject::tr(
"Abstract element is required." ) );
64 if ( metadata->
contacts().isEmpty() )
67 results <<
ValidationResult( QObject::tr(
"contacts" ), QObject::tr(
"At least one contact is required." ) );
70 if ( metadata->
links().isEmpty() )
73 results <<
ValidationResult( QObject::tr(
"links" ), QObject::tr(
"At least one link is required." ) );
78 QgsAbstractMetadataBase::KeywordMap::const_iterator keywordIt = keywords.constBegin();
80 for ( ; keywordIt != keywords.constEnd(); ++keywordIt )
82 if ( keywordIt.key().isEmpty() )
85 results <<
ValidationResult( QObject::tr(
"keywords" ), QObject::tr(
"Keyword vocabulary cannot be empty." ), index );
87 if ( keywordIt.value().isEmpty() )
90 results <<
ValidationResult( QObject::tr(
"keywords" ), QObject::tr(
"Keyword list cannot be empty." ), index );
99 if ( contact.
name.isEmpty() )
102 results <<
ValidationResult( QObject::tr(
"contacts" ), QObject::tr(
"Contact name cannot be empty." ), index );
111 if ( link.
name.isEmpty() )
114 results <<
ValidationResult( QObject::tr(
"links" ), QObject::tr(
"Link name cannot be empty." ), index );
116 if ( link.
type.isEmpty() )
119 results <<
ValidationResult( QObject::tr(
"links" ), QObject::tr(
"Link type cannot be empty." ), index );
121 if ( link.
url.isEmpty() )
124 results <<
ValidationResult( QObject::tr(
"links" ), QObject::tr(
"Link url cannot be empty." ), index );
148 if ( metadata->
licenses().isEmpty() )
151 results <<
ValidationResult( QObject::tr(
"license" ), QObject::tr(
"At least one license is required." ) );
157 results <<
ValidationResult( QObject::tr(
"crs" ), QObject::tr(
"A valid CRS element is required." ) );
166 results <<
ValidationResult( QObject::tr(
"extent" ), QObject::tr(
"A valid CRS element for the spatial extent is required." ), index );
172 results <<
ValidationResult( QObject::tr(
"extent" ), QObject::tr(
"A valid spatial extent is required." ), index );
197 if ( metadata->
author().isEmpty() )
200 results <<
ValidationResult( QObject::tr(
"author" ), QObject::tr(
"A project author is required." ) );
206 results <<
ValidationResult( QObject::tr(
"creation" ), QObject::tr(
"The project creation date/time is required." ) );
double height() const
Returns the height of the box.
double width() const
Returns the width of the box.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.