ArcGIS Runtime SDK for iOS: AGSPortalQueryParameters Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSPortalQueryParameters Class Reference

Description

Defines a query on a portal.

To query a portal for items or groups, the AGSPortal's findItemsWithQueryParameters: and findGroupsWithQueryParameters: methods must use the query parameters specified by the AGSPortalQueryParameters class. You can choose any of pre-defined query strings, supplied by this class, or you can create a custom query string as per the specification in the Portal API. The default number of results returned is 10. Adjust this limit to return more results and use with the startIndex property, if you wish to paginate the results.

Since
100
Inheritance diagram for AGSPortalQueryParameters:
AGSJSONSerializableBase <AGSJSONSerializable>

Instance Methods

(instancetype) - initWithQuery:
 
(instancetype) - initWithQuery:limit:
 
(nullable id) - toJSON:
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(AGSPortalQueryParameters *) + queryParametersForGroupsWithOwner:title:
 
(AGSPortalQueryParameters *) + queryParametersForItemsInGroup:
 
(AGSPortalQueryParameters *) + queryParametersForItemsOfType:inGroup:
 
(AGSPortalQueryParameters *) + queryParametersForItemsOfType:inGroup:withSearchString:
 
(AGSPortalQueryParameters *) + queryParametersForItemsOfType:owner:searchString:
 
(AGSPortalQueryParameters *) + queryParametersForItemsOfType:withSearchString:
 
(AGSPortalQueryParameters *) + queryParametersForItemsOfTypes:owner:groupID:searchString:
 
(AGSPortalQueryParameters *) + queryParametersForItemsWithOwner:searchString:
 
(AGSPortalQueryParameters *) + queryParametersForItemWithID:
 
(AGSPortalQueryParameters *) + queryParametersWithQuery:
 
(AGSPortalQueryParameters *) + queryParametersWithQuery:limit:
 

Properties

AGSEnvelopeboundingBox
 
NSArray< NSString * > * categories
 
NSInteger limit
 
NSString * query
 
BOOL searchPublic
 
NSString * sortField
 
AGSPortalQuerySortOrder sortOrder
 
NSInteger startIndex
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 

Method Documentation

◆ fromJSON:error:

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

◆ initWithQuery:

- (instancetype) initWithQuery: (NSString *)  query

Initializes a AGSPortalQueryParameters with a query string.

Parameters
queryThe query string.
Since
100

◆ initWithQuery:limit:

- (instancetype) initWithQuery: (NSString *)  query
limit: (NSInteger)  limit 

Initializes a AGSPortalQueryParameters with a query string and the limit on results.

Parameters
queryThe query string.
limitThe number of results to be returned.
Since
100

◆ queryParametersForGroupsWithOwner:title:

+ (AGSPortalQueryParameters*) queryParametersForGroupsWithOwner: (nullable NSString *)  username
title: (nullable NSString *)  title 

Returns query parameters that will find groups with a specified owner and title. Either property can be nil, but not simultaneously.

Parameters
usernameThe username of the owner.
titleThe title of the group.
Since
100

◆ queryParametersForItemsInGroup:

+ (AGSPortalQueryParameters*) queryParametersForItemsInGroup: (NSString *)  groupID

Returns query parameters that will find all items belonging to a specified group.

Parameters
groupIDThe id of the group.
Since
100

◆ queryParametersForItemsOfType:inGroup:

+ (AGSPortalQueryParameters*) queryParametersForItemsOfType: (AGSPortalItemType type
inGroup: (nullable NSString *)  groupID 

Returns query parameters that will find items with a specified type that belong to a specified group.

Parameters
typeThe type of the portal item.
groupIDThe id of the group. Can be nil.
Since
100

◆ queryParametersForItemsOfType:inGroup:withSearchString:

+ (AGSPortalQueryParameters*) queryParametersForItemsOfType: (AGSPortalItemType type
inGroup: (nullable NSString *)  groupID
withSearchString: (nullable NSString *)  searchString 

Returns query parameters that will find items with a specified type that belong to a specified group.

Parameters
typeThe type of the portal item.
groupIDThe id of the group. Can be nil.
searchStringThe string used for broader search on the items; such as on tags, title etc. Can be nil.
Since
100

◆ queryParametersForItemsOfType:owner:searchString:

+ (AGSPortalQueryParameters*) queryParametersForItemsOfType: (AGSPortalItemType type
owner: (NSString *)  username
searchString: (nullable NSString *)  searchString 

Returns query parameters that will find items with a specified type that belong to a specified owner.

Parameters
typeThe type of the portal item.
usernameThe username of the owner.
searchStringThe string used for broader search on the items; such as on tags, title etc. Can be nil.
Since
100

◆ queryParametersForItemsOfType:withSearchString:

+ (AGSPortalQueryParameters*) queryParametersForItemsOfType: (AGSPortalItemType type
withSearchString: (nullable NSString *)  searchString 

Returns query parameters that will find items with a specified type that satisfy the specified criteria.

Parameters
typeThe type of the portal item.
searchStringThe string used for broader search on the items; such as on tags, title etc. Can be nil.
Since
100

◆ queryParametersForItemsOfTypes:owner:groupID:searchString:

+ (AGSPortalQueryParameters *) queryParametersForItemsOfTypes: (NSArray< NSValue * > *)  types
owner: (nullable NSString *)  owner
groupID: (nullable NSString *)  groupID
searchString: (nullable NSString *)  searchString 

Creates an AGSPortalQueryParameters that will find items with any one of a number of given types Optionally restricts the search to items belonging to a specified owner. An optional search string can be used to restrict the search even further.

Parameters
typesthe item types to search for
ownerthe username of the owner of the items, or nil to search for items with any owner
groupIDThe id of the group. Can be nil.
searchStringa string specifying other criteria for the search, or nil if there are none
Since
100.7

◆ queryParametersForItemsWithOwner:searchString:

+ (AGSPortalQueryParameters*) queryParametersForItemsWithOwner: (NSString *)  username
searchString: (nullable NSString *)  searchString 

Returns query parameters that will find items with a specified owner.

Parameters
usernameThe username of the owner.
searchStringThe string used for broader search on the items; such as on tags, title etc. Can be nil.
Since
100

◆ queryParametersForItemWithID:

+ (AGSPortalQueryParameters*) queryParametersForItemWithID: (NSString *)  itemID

Returns a query parameters that will find an item with a specified id.

Parameters
itemIDThe id of the item.
Since
100

◆ queryParametersWithQuery:

+ (AGSPortalQueryParameters*) queryParametersWithQuery: (NSString *)  query

A method to get an initialized, autoreleased query parameters object with a query string.

Parameters
queryThe query string.
Since
100

◆ queryParametersWithQuery:limit:

+ (AGSPortalQueryParameters*) queryParametersWithQuery: (NSString *)  query
limit: (NSInteger)  limit 

A method to get an initialized, autoreleased query parameters object with a query string and the limit.

Parameters
queryThe query string.
limitThe number of results to be returned.
Since
100

◆ toJSON:

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

Property Documentation

◆ boundingBox

- (AGSEnvelope*) boundingBox
readwritenonatomicstrong

The bounding box for a spatial search, which is an overlaps/intersects function of the query 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.

Since
100

◆ categories

- (NSArray<NSString *>*) categories
readwritenonatomiccopy

An array of content category specifications to use when searching for items.

Each entry is a string containing a comma-separated list of up to eight content categories. The exact 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 eight 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 two strings as follows: "/Categories/Water,/Categories/Forest" and "/Region/US".

This property is ignored if the receiver is used to search for groups using findGroupsWithQueryParameters:completion: (AGSPortal).

See also
- findGroupsWithQueryParameters:completion: (AGSPortal)
Since
100.6

◆ limit

- (NSInteger) limit
readwritenonatomicassign

The number of results to be returned (default = 10). This, along with the startIndex, can help you paginate the search results.

Since
100

◆ query

- (NSString*) query
readwritenonatomiccopy

The query string specified for the search.

Since
100
See also
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000mn000000 for information on query syntax

◆ searchPublic

- (BOOL) searchPublic
readwritenonatomicassign

Indicates whether public items outside the organization may be included in the search results Default behavior is they are included.

Since
100.7

◆ sortField

- (NSString*) sortField
readwritenonatomiccopy

The field on which sorting should be done.

Since
100

◆ sortOrder

- (AGSPortalQuerySortOrder) sortOrder
readwritenonatomicassign

The order of sorting.

Since
100

◆ startIndex

- (NSInteger) startIndex
readwritenonatomicassign

The index from which the results should be returned. The index number is 1-based. You should use this for paginating the search results.

Since
100

◆ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

◆ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100