Skip To Content ArcGIS for Developers Sign In Dashboard

PortalQueryParametersForItems Class

(Esri::ArcGISRuntime::PortalQueryParametersForItems)

The query parameters suitable for finding content contained in a portal. More...

Header: #include <PortalQueryParametersForItems>
Since: Esri::ArcGISRuntime 100.0
Inherits: PortalQueryParameters

Public Functions

PortalQueryParametersForItems()
PortalQueryParametersForItems(const QString &query)
PortalQueryParametersForItems(const QString &query, int limit)
PortalQueryParametersForItems(const Envelope &boundingBox)
PortalQueryParametersForItems(const QString &query, const Envelope &boundingBox)
PortalQueryParametersForItems(const PortalQueryParametersForItems &other)
PortalQueryParametersForItems(PortalQueryParametersForItems &&other)
PortalQueryParametersForItems(const PortalQueryParameters &other)
~PortalQueryParametersForItems()
QString groupId() const
QString itemId() const
QString owner() const
QString searchString() const
void setGroupId(const QString &groupId)
void setItemId(const QString &itemId)
void setOwner(const QString &owner)
void setSearchString(const QString &searchString)
void setTypes(const QList<PortalItemType> &types)
QList<PortalItemType> types() const
PortalQueryParametersForItems &operator=(const PortalQueryParametersForItems &other)
PortalQueryParametersForItems &operator=(PortalQueryParametersForItems &&other)
PortalQueryParametersForItems &operator=(const PortalQueryParameters &other)

Static Public Members

PortalQueryParametersForItems forItemType(PortalItemType type, const QString &searchString = QString())
PortalQueryParametersForItems forItemTypeInGroup(PortalItemType type, const QString &groupId, const QString &searchString = QString())
PortalQueryParametersForItems forItemTypeWithOwner(PortalItemType type, const QString &owner, const QString &searchString = QString())
PortalQueryParametersForItems forItemTypes(QList<PortalItemType> types, const QString &owner, const QString &groupId, const QString &searchString)
PortalQueryParametersForItems inGroup(const QString &groupId)
PortalQueryParametersForItems withId(const QString &ItemId)
PortalQueryParametersForItems withOwner(const QString &owner)

Detailed Description

The query parameters suitable for finding content contained in a portal.

Methods are provided for a number of particular parameters: groupId, itemId, owner and type. There are also a methods for a searchString that can be a complex expression, containing names and values of one or more fields, for example "owner:username AND title:mygroupname".

A typical usage pattern is:

Example: Use query parameters to retrieve web maps with specific tags from a portal.

// webmaps authored prior to July 2nd, 2014 are not supported
// so search only from that date to the current time (in milliseconds)
QString fromDate = QString("000000%1").arg(QDateTime(QDate(2014, 7, 2)).toMSecsSinceEpoch());
QString toDate = QString("000000%1").arg(QDateTime::currentDateTime().toMSecsSinceEpoch());

PortalQueryParametersForItems query;
query.setSearchString(QString("tags:\"%1\" AND +uploaded:[%2 TO %3]")
                      .arg(keyword, fromDate, toDate));
query.setTypes(QList<PortalItemType>() << PortalItemType::WebMap);

m_portal->findItems(query);

Example: Obtain the next set of query parameters from a result set:

PortalQueryParametersForItems nextQuery = m_webmapResults->nextQueryParameters();
// check whether the startIndex of the new query is valid
if (nextQuery.startIndex() != -1)
  m_portal->findItems(nextQuery);

Detailed information on search capabilities and syntax can be found in the ArcGIS REST API.

See also Portal, PortalItem, and PortalQueryResultSetForItems.

Member Function Documentation

PortalQueryParametersForItems::PortalQueryParametersForItems()

Default constructor.

PortalQueryParametersForItems::PortalQueryParametersForItems(const QString &query)

Constructor that accepts a query string.

PortalQueryParametersForItems::PortalQueryParametersForItems(const QString &query, int limit)

Constructor that accepts a query string and a limit on the number of results to return.

PortalQueryParametersForItems::PortalQueryParametersForItems(const Envelope &boundingBox)

Constructor that accepts a bounding box (boundingBox).

PortalQueryParametersForItems::PortalQueryParametersForItems(const QString &query, const Envelope &boundingBox)

Constructor that accepts a query string and a bounding box (boundingBox).

PortalQueryParametersForItems::PortalQueryParametersForItems(const PortalQueryParametersForItems &other)

Copy constructor from other PortalQueryParametersForItems.

PortalQueryParametersForItems::PortalQueryParametersForItems(PortalQueryParametersForItems &&other)

Move constructor from other PortalQueryParametersForItems.

PortalQueryParametersForItems::PortalQueryParametersForItems(const PortalQueryParameters &other)

Copy constructor from other PortalQueryParameters.

PortalQueryParametersForItems::~PortalQueryParametersForItems()

Destructor.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::forItemType(PortalItemType type, const QString &searchString = QString())

Static function that returns a new PortalQueryParametersForItems with a type and searchString set.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::forItemTypeInGroup(PortalItemType type, const QString &groupId, const QString &searchString = QString())

Static function that returns a new PortalQueryParametersForItems with a type, groupId, and searchString set.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::forItemTypeWithOwner(PortalItemType type, const QString &owner, const QString &searchString = QString())

Static function that returns a new PortalQueryParametersForItems with a type, owner username, and searchString set.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::forItemTypes(QList<PortalItemType> types, const QString &owner, const QString &groupId, const QString &searchString)

Static function that returns a new PortalQueryParametersForItems with a list of item types, an owner username, a groupId, and a searchString set.

QString PortalQueryParametersForItems::groupId() const

Returns the ID of the PortalGroup for which all items must belong.

See also setGroupId() and PortalGroup.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::inGroup(const QString &groupId)

Static function that returns a new PortalQueryParametersForItems with a groupId set.

QString PortalQueryParametersForItems::itemId() const

Returns the ID of the specific PortalItem to be retrieved.

See also setItemId() and PortalItem.

QString PortalQueryParametersForItems::owner() const

Returns the username of the PortalUser to whom all the items must belong.

See also setOwner() and PortalUser.

QString PortalQueryParametersForItems::searchString() const

Returns the custom search string to be used for querying.

See the ArcGIS REST API for more details.

See also setSearchString().

void PortalQueryParametersForItems::setGroupId(const QString &groupId)

Sets the groupId of the PortalGroup for which all items must belong.

See also groupId() and PortalGroup.

void PortalQueryParametersForItems::setItemId(const QString &itemId)

Sets the itemId of the specific PortalItem to be retrieved.

See also itemId() and PortalItem.

void PortalQueryParametersForItems::setOwner(const QString &owner)

Sets the username of the owner to whom all the items must belong.

See also owner() and PortalUser.

void PortalQueryParametersForItems::setSearchString(const QString &searchString)

Sets the custom searchString to be used for querying.

See the ArcGIS REST API for more details.

See also searchString().

void PortalQueryParametersForItems::setTypes(const QList<PortalItemType> &types)

Sets the types of PortalItems to retrieve.

See also types() and PortalItemType.

QList<PortalItemType> PortalQueryParametersForItems::types() const

Returns the list of types of PortalItem to retrieve.

See also setTypes().

[static] PortalQueryParametersForItems PortalQueryParametersForItems::withId(const QString &ItemId)

Static function that returns a new PortalQueryParametersForItems with an ItemId set.

[static] PortalQueryParametersForItems PortalQueryParametersForItems::withOwner(const QString &owner)

Static function that returns a new PortalQueryParametersForItems with an owner username set.

PortalQueryParametersForItems &PortalQueryParametersForItems::operator=(const PortalQueryParametersForItems &other)

Assignment operator from other PortalQueryParametersForItems.

PortalQueryParametersForItems &PortalQueryParametersForItems::operator=(PortalQueryParametersForItems &&other)

Move operator from other PortalQueryParametersForItems.

PortalQueryParametersForItems &PortalQueryParametersForItems::operator=(const PortalQueryParameters &other)

Assignment operator from other PortalQueryParameters.


Feedback on this topic?