Base class for parameters needed to perform a query within a Portal. More...
Header: | #include <PortalQueryParameters.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Inherited By: | Esri::ArcGISRuntime::PortalQueryParametersForGroups and Esri::ArcGISRuntime::PortalQueryParametersForItems |
Public Functions
PortalQueryParameters() | |
PortalQueryParameters(const Esri::ArcGISRuntime::PortalQueryParameters &other) | |
PortalQueryParameters(Esri::ArcGISRuntime::PortalQueryParameters &&other) | |
virtual | ~PortalQueryParameters() |
Esri::ArcGISRuntime::Envelope | boundingBox() const |
QStringList | categories() const |
bool | isEmpty() const |
bool | isSearchPublic() const |
int | limit() const |
QString | query() const |
void | setBoundingBox(const Esri::ArcGISRuntime::Envelope &boundingBox) |
void | setCategories(const QStringList &categories) |
void | setLimit(int limit) |
void | setSearchPublic(bool searchPublic) |
void | setSortField(const QString &sortField) |
void | setSortOrder(Esri::ArcGISRuntime::PortalQuerySortOrder sortOrder) |
void | setStartIndex(int startIndex) |
QString | sortField() const |
Esri::ArcGISRuntime::PortalQuerySortOrder | sortOrder() const |
int | startIndex() const |
Esri::ArcGISRuntime::PortalQueryParameters & | operator=(const Esri::ArcGISRuntime::PortalQueryParameters &other) |
Esri::ArcGISRuntime::PortalQueryParameters & | operator=(Esri::ArcGISRuntime::PortalQueryParameters &&other) |
Detailed Description
This class forms ths basis for parameters used when searching for items, and groups. Queries can be specified using this type such that they are limited to:
- the number of results returned.
- a spatial search area.
- resources within an organization.
Results can be sorted. Start index and results limit are used when paging through large result sets.
See the ArcGIS REST API for more details.
Relevant samples:
- Search for web map by keyword: Find webmap portal items by using a search term.
See also PortalQueryParametersForItems, PortalQueryParametersForGroups, and Portal.
Member Function Documentation
[since Esri::ArcGISRuntime 100.3]
PortalQueryParameters::PortalQueryParameters ()
Default constructor.
Create invalid PortalQueryParameters. Use PortalQueryParametersForItems or PortalQueryParametersForGroups to create a default empty PortalQueryParameters.
This function was introduced in Esri::ArcGISRuntime 100.3.
PortalQueryParameters::PortalQueryParameters (const Esri::ArcGISRuntime::PortalQueryParameters &other)
Copy constructor from other PortalQueryParameters.
PortalQueryParameters::PortalQueryParameters (Esri::ArcGISRuntime::PortalQueryParameters &&other)
Move constructor from other PortalQueryParameters.
[virtual]
PortalQueryParameters::~PortalQueryParameters ()
Destructor.
Esri::ArcGISRuntime::Envelope PortalQueryParameters::boundingBox () const
Returns an Envelope specifying the bounding box for a spatial search. Spatial search is an overlaps/intersects function of the bounding box and the extent of the document. Documents that have no extent (e.g., mxds, 3dds, lyr) will not be found when doing a bounding box search. Document extent is assumed to be in the WGS84 geographic coordinate system.
See also setBoundingBox().
[since Esri::ArcGISRuntime 100.13]
QStringList PortalQueryParameters::categories() const
Returns an array of content category specifications to use when searching for items using Portal::findItemsAsync().
Each entry in the Array is a String containing a comma-separated list of up to 8 organization-level content categories. The full path of each category is required and an OR relationship is applied between the categories within a particular String.
There can be up to 8 Strings with an AND relationship being applied between the different Strings.
For example, to search for items belonging to either the Water or Forest categories, both within the US, specify 2 Strings as follows: "/Categories/Water,/Categories/Forest" and "/Region/US".
The categories property is ignored if the PortalQueryParameters is used to search for groups using Portal::findGroupsAsync(const Esri::ArcGISRuntime::PortalQueryParameters&, QObject*).
This function was introduced in Esri::ArcGISRuntime 100.13.
See also setCategories().
[since Esri::ArcGISRuntime 100.3]
bool PortalQueryParameters::isEmpty () const
Returns whether this PortalQueryParameters is empty.
This function was introduced in Esri::ArcGISRuntime 100.3.
bool PortalQueryParameters::isSearchPublic () const
Returns whether public items outside the organization may be included in the search results.
Default behavior is they are included.
int PortalQueryParameters::limit() const
Returns the maximum number of results to be included in the result set response.
The limit, along with the startIndex, can be used to paginate the search results.
The default value is 10, and the maximum allowed value is 100.
Note that the actual number of returned results may be less than limit. This happens when the number of results remaining after the startIndex is less than limit.
See also setLimit().
QString PortalQueryParameters::query() const
Returns the query string searched.
void PortalQueryParameters::setBoundingBox (const Esri::ArcGISRuntime::Envelope &boundingBox )
Sets the boundingBox to boundingBox.
See also boundingBox.
[since Esri::ArcGISRuntime 100.6]
void PortalQueryParameters::setCategories (const QStringList &categories)
Sets the categories to categories.
This function was introduced in Esri::ArcGISRuntime 100.6.
See also categories.
void PortalQueryParameters::setLimit (int limit)
briefSetsthe limit to limit.
See also limit.
void PortalQueryParameters::setSearchPublic (bool searchPublic )
Sets the searchPublic to searchPublic.
See also isSearchPublic.
void PortalQueryParameters::setSortField (const QString &sortField )
Sets the sortField to sortField.
See also sortField.
void PortalQueryParameters::setSortOrder (Esri::ArcGISRuntime::PortalQuerySortOrder sortOrder )
Sets the sort order for search results to sortOrder.
See also sortOrder.
void PortalQueryParameters::setStartIndex (int startIndex )
Sets the startIndex to startIndex.
See also startIndex.
QString PortalQueryParameters::sortField () const
Returns a string containing one or more fields names, comma separated, specifying the field(s) to sort the results by.
Sort field names are case-insensitive. Supported field names are "title", "created", "type", "owner", "modified", "avgrating", "numratings", "numcomments", and "numviews".
See also setSortField().
Esri::ArcGISRuntime::PortalQuerySortOrder PortalQueryParameters::sortOrder () const
Returns the sort order, indicating whether the results are returned in ascending or descending order.
Default value is PortalQuerySortOrder::Ascending.
See also setSortOrder().
int PortalQueryParameters::startIndex () const
TReturns the index within the entire set of results of the first entry in the current page.
The startIndex, along with the limit, can be used to paginate the search results. The index number is 1-based and the default value is 1.
See also setStartIndex().
Esri::ArcGISRuntime::PortalQueryParameters &PortalQueryParameters::operator=(const Esri::ArcGISRuntime::PortalQueryParameters &other)
Assignment operator from other PortalQueryParameters.
Esri::ArcGISRuntime::PortalQueryParameters &PortalQueryParameters::operator=(Esri::ArcGISRuntime::PortalQueryParameters &&other)
Move operator from other PortalQueryParameters.