QGIS API Documentation  3.6.0-Noosa (5873452)
Public Types | Public Member Functions | List of all members
QgsWfs::QgsWfsParameters Class Reference

Provides an interface to retrieve and manipulate WFS parameters received from the client. More...

#include <qgswfsparameters.h>

Inheritance diagram for QgsWfs::QgsWfsParameters:
Inheritance graph
[legend]

Public Types

enum  Format {
  NONE, GML2, GML3, GeoJSON,
  XSD
}
 Output format for the response. More...
 
enum  ResultType { RESULTS, HITS }
 Type of results. More...
 

Public Member Functions

 QgsWfsParameters (const QgsServerParameters &parameters)
 Constructor for WFS parameters with specific values. More...
 
 QgsWfsParameters ()
 Constructor for WFS parameters with default values only. More...
 
virtual ~QgsWfsParameters ()=default
 Default destructor for QgsWfsParameters. More...
 
QString bbox () const
 Returns BBOX if defined or an empty string. More...
 
QgsRectangle bboxAsRectangle () const
 Returns BBOX as a rectangle if defined and valid. More...
 
void dump () const
 Dumps parameters. More...
 
QStringList expFilters () const
 Returns EXP_FILTER parameter as list. More...
 
QStringList featureIds () const
 Returns FEATUREID parameter as list. More...
 
QStringList filters () const
 Returns FILTER parameter as list. More...
 
QString geometryNameAsString () const
 Returns GEOMETRYNAME parameter as a string. More...
 
QString maxFeatures () const
 Returns MAXFEATURES parameter as a string. More...
 
int maxFeaturesAsInt () const
 Returns MAXFEATURES parameter as an int or its default value if not defined. More...
 
Format outputFormat () const
 Returns format. More...
 
QString outputFormatAsString () const
 Returns OUTPUTFORMAT parameter as a string. More...
 
QStringList propertyNames () const
 Returns PROPERTYNAME parameter as list. More...
 
ResultType resultType () const
 Returns resultType. More...
 
QString resultTypeAsString () const
 Returns RESULTTYPE parameter as a string. More...
 
QStringList sortBy () const
 Returns SORTBY parameter as list. More...
 
QString srsName () const
 Returns SRSNAME parameter as a string. More...
 
QString startIndex () const
 Returns STARTINDEX parameter as a string. More...
 
int startIndexAsInt () const
 Returns STARTINDEX parameter as an int or its default value if not defined. More...
 
QStringList typeNames () const
 Returns TYPENAME parameter as list. More...
 
QgsProjectVersion versionAsNumber () const
 Returns VERSION parameter if defined or its default value. More...
 
- Public Member Functions inherited from QgsServerParameters
 QgsServerParameters ()
 Constructor. More...
 
 QgsServerParameters (const QUrlQuery &query)
 Constructor. More...
 
virtual ~QgsServerParameters ()=default
 
void add (const QString &key, const QString &value)
 Adds a parameter. More...
 
void clear ()
 Removes all parameters. More...
 
QString fileName () const
 Returns FILE_NAME parameter as a string or an empty string if not defined. More...
 
void load (const QUrlQuery &query)
 Loads new parameters. More...
 
QString map () const
 Returns MAP parameter as a string or an empty string if not defined. More...
 
void remove (const QString &key)
 Removes a parameter. More...
 
void remove (QgsServerParameter::Name name)
 Removes a parameter. More...
 
QString request () const
 Returns REQUEST parameter as a string or an empty string if not defined. More...
 
QString service () const
 Returns SERVICE parameter as a string or an empty string if not defined. More...
 
QMap< QString, QString > toMap () const
 Returns all parameters in a map. More...
 
QUrlQuery urlQuery () const
 Returns a url query with underlying parameters. More...
 
QString value (const QString &key) const
 Returns the value of a parameter. More...
 
QString version () const
 Returns VERSION parameter as a string or an empty string if not defined. More...
 

Additional Inherited Members

- Protected Attributes inherited from QgsServerParameters
QMap< QString, QString > mUnmanagedParameters
 

Detailed Description

Provides an interface to retrieve and manipulate WFS parameters received from the client.

Since
QGIS 3.0

Definition at line 125 of file qgswfsparameters.h.

Member Enumeration Documentation

◆ Format

Output format for the response.

Enumerator
NONE 
GML2 
GML3 
GeoJSON 
XSD 

Definition at line 132 of file qgswfsparameters.h.

◆ ResultType

Type of results.

Enumerator
RESULTS 
HITS 

Definition at line 142 of file qgswfsparameters.h.

Constructor & Destructor Documentation

◆ QgsWfsParameters() [1/2]

QgsWfs::QgsWfsParameters::QgsWfsParameters ( const QgsServerParameters parameters)

Constructor for WFS parameters with specific values.

Parameters
parametersMap of parameters where keys are parameters' names.

Definition at line 174 of file qgswfsparameters.cpp.

◆ QgsWfsParameters() [2/2]

QgsWfs::QgsWfsParameters::QgsWfsParameters ( )

Constructor for WFS parameters with default values only.

Definition at line 123 of file qgswfsparameters.cpp.

◆ ~QgsWfsParameters()

virtual QgsWfs::QgsWfsParameters::~QgsWfsParameters ( )
virtualdefault

Default destructor for QgsWfsParameters.

Member Function Documentation

◆ bbox()

QString QgsWfs::QgsWfsParameters::bbox ( ) const

Returns BBOX if defined or an empty string.

Returns
bbox parameter

Definition at line 323 of file qgswfsparameters.cpp.

◆ bboxAsRectangle()

QgsRectangle QgsWfs::QgsWfsParameters::bboxAsRectangle ( ) const

Returns BBOX as a rectangle if defined and valid.

An exception is raised if the BBOX string cannot be converted into a rectangle.

Returns
bbox as rectangle
Exceptions
QgsBadRequestException

Definition at line 328 of file qgswfsparameters.cpp.

◆ dump()

void QgsWfs::QgsWfsParameters::dump ( ) const

Dumps parameters.

Definition at line 204 of file qgswfsparameters.cpp.

◆ expFilters()

QStringList QgsWfs::QgsWfsParameters::expFilters ( ) const

Returns EXP_FILTER parameter as list.

Returns
expFilters parameter as list

Definition at line 338 of file qgswfsparameters.cpp.

◆ featureIds()

QStringList QgsWfs::QgsWfsParameters::featureIds ( ) const

Returns FEATUREID parameter as list.

Returns
featureId parameter as list

Definition at line 313 of file qgswfsparameters.cpp.

◆ filters()

QStringList QgsWfs::QgsWfsParameters::filters ( ) const

Returns FILTER parameter as list.

Returns
filter parameter as list

Definition at line 318 of file qgswfsparameters.cpp.

◆ geometryNameAsString()

QString QgsWfs::QgsWfsParameters::geometryNameAsString ( ) const

Returns GEOMETRYNAME parameter as a string.

Returns
geometryName parameter as string

Definition at line 343 of file qgswfsparameters.cpp.

◆ maxFeatures()

QString QgsWfs::QgsWfsParameters::maxFeatures ( ) const

Returns MAXFEATURES parameter as a string.

Returns
maxFeatures parameter as string

Definition at line 283 of file qgswfsparameters.cpp.

◆ maxFeaturesAsInt()

int QgsWfs::QgsWfsParameters::maxFeaturesAsInt ( ) const

Returns MAXFEATURES parameter as an int or its default value if not defined.

An exception is raised if I is defined and cannot be converted.

Returns
maxFeatures parameter
Exceptions
QgsBadRequestException

Definition at line 288 of file qgswfsparameters.cpp.

◆ outputFormat()

QgsWfsParameters::Format QgsWfs::QgsWfsParameters::outputFormat ( ) const

Returns format.

If the OUTPUTFORMAT parameter is not used, then the default value is GML2 or GML3.

Returns
format

Definition at line 227 of file qgswfsparameters.cpp.

◆ outputFormatAsString()

QString QgsWfs::QgsWfsParameters::outputFormatAsString ( ) const

Returns OUTPUTFORMAT parameter as a string.

Returns
outputFormat parameter as string

Definition at line 222 of file qgswfsparameters.cpp.

◆ propertyNames()

QStringList QgsWfs::QgsWfsParameters::propertyNames ( ) const

Returns PROPERTYNAME parameter as list.

Returns
propertyName parameter as list

Definition at line 278 of file qgswfsparameters.cpp.

◆ resultType()

QgsWfsParameters::ResultType QgsWfs::QgsWfsParameters::resultType ( ) const

Returns resultType.

If the RESULTTYPE parameter is not used, then the default value is RESULTS.

Returns
resultType

Definition at line 266 of file qgswfsparameters.cpp.

◆ resultTypeAsString()

QString QgsWfs::QgsWfsParameters::resultTypeAsString ( ) const

Returns RESULTTYPE parameter as a string.

Returns
resultType parameter as string

Definition at line 261 of file qgswfsparameters.cpp.

◆ sortBy()

QStringList QgsWfs::QgsWfsParameters::sortBy ( ) const

Returns SORTBY parameter as list.

Returns
sortBy parameter as list

Definition at line 333 of file qgswfsparameters.cpp.

◆ srsName()

QString QgsWfs::QgsWfsParameters::srsName ( ) const

Returns SRSNAME parameter as a string.

Returns
srsName parameter as string

Definition at line 303 of file qgswfsparameters.cpp.

◆ startIndex()

QString QgsWfs::QgsWfsParameters::startIndex ( ) const

Returns STARTINDEX parameter as a string.

Returns
startIndex parameter as string

Definition at line 293 of file qgswfsparameters.cpp.

◆ startIndexAsInt()

int QgsWfs::QgsWfsParameters::startIndexAsInt ( ) const

Returns STARTINDEX parameter as an int or its default value if not defined.

An exception is raised if I is defined and cannot be converted.

Returns
startIndex parameter
Exceptions
QgsBadRequestException

Definition at line 298 of file qgswfsparameters.cpp.

◆ typeNames()

QStringList QgsWfs::QgsWfsParameters::typeNames ( ) const

Returns TYPENAME parameter as list.

Returns
typeName parameter as list

Definition at line 308 of file qgswfsparameters.cpp.

◆ versionAsNumber()

QgsProjectVersion QgsWfs::QgsWfsParameters::versionAsNumber ( ) const

Returns VERSION parameter if defined or its default value.

Returns
version

Definition at line 348 of file qgswfsparameters.cpp.


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