An AGSPortalItem is a unit of content in the AGSPortal. Each item has a unique identifier and a well- known URL that is independent of the user owning the item. An item may have associated binary or textual data which has to be fetched explicitly using fetchData (AGSPortalItem)
. For example, an item of type AGSPortalItemTypeMapPackage
will fetch the actual bits corresponding to the map package.
The AGSPortalItem's delegate is informed whenever operations performed by the AGSPortalItem complete successfully or encounter an error.
Public Member Functions | |
(void) | - decodeWithJSON: |
(NSDictionary *) | - encodeToJSON |
(NSOperation *) | - fetchComments |
(NSOperation *) | - fetchData |
(NSOperation *) | - fetchThumbnail |
(id) | - initWithJSON: |
(id) | - initWithPortal:itemId: |
Properties | |
AGSPortalAccess | access |
float | avgRating |
NSArray * | comments |
NSDate * | created |
NSString * | credits |
id< AGSPortalItemDelegate > | delegate |
AGSEnvelope * | extent |
NSString * | itemDescription |
NSString * | itemId |
NSString * | license |
NSLocale * | locale |
NSDate * | modified |
int | numComments |
int | numRatings |
int | numViews |
NSString * | owner |
AGSPortal * | portal |
int | size |
NSString * | snippet |
AGSSpatialReference * | spatialReference |
NSArray * | tags |
UIImage * | thumbnail |
NSString * | thumbnailFileName |
NSString * | title |
AGSPortalItemType | type |
- (void) decodeWithJSON: | (NSDictionary *) | json | [optional, inherited] |
Decode object from JSON representation.
json | The JSON representation of the object to be decoded. |
- (NSDictionary *) encodeToJSON | [optional, inherited] |
Encode and return JSON representation for object.
- (NSOperation*) fetchComments |
Kicks off an operation that fetches the comments for the item. The corresponding methods on AGSPortalItemDelegate
are invoked when the operation completes successfully or encounters an error.
- (NSOperation*) fetchData |
Kicks off an operation that fetches raw bytes for the item. The corresponding methods on AGSPortalItemDelegate
are invoked when the operation completes successfully or encounters an error.
- (NSOperation*) fetchThumbnail |
Kicks off an operation that fetches the thumbnail for the item. The corresponding methods on AGSPortalItemDelegate
are invoked when the operation completes successfully or encounters an error.
- (id) initWithJSON: | (NSDictionary *) | json | [optional, inherited] |
Initialize and return object from JSON representation.
json | The JSON representation of the object to be created. |
Reimplemented in AGSWebMapFeatureCollection.
- (id) initWithPortal: | (AGSPortal *) | portal | ||
itemId: | (NSString *) | itemId | ||
Initializes a portal item with a portal and item id.
portal | The portal to which the item may belong to. | |
itemId | The Id of the item. |
- (AGSPortalAccess) access [read, assign] |
Indicates who can access this item. Can be AGSPortalAccessPrivate
, AGSPortalAccessShared
, AGSPortalAccessOrganization
, or AGSPortalAccessPublic
.
If AGSPortalAccessPrivate
, only the item owner can access. AGSPortalAccessShared
allows access to members of a group that the item is shared with . AGSPortalAccessOrganization
restricts item access to members of an organization. If AGSPortalAccessPublic
, all users can access the item.
- (float) avgRating [read, assign] |
Average rating of the item.
- (NSArray*) comments [read, retain] |
Array of comments (AGSPortalItemComment
) of the item. These need to be fetched explicitly using fetchComments.
- (NSDate*) created [read, retain] |
Date on which the item was first uploaded.
- (NSString*) credits [read, retain] |
The access information about the item.
- (id<AGSPortalItemDelegate>) delegate [read, write, assign] |
The delegate for the portal item operations.
- (AGSEnvelope*) extent [read, retain] |
The default extent of the item. Only applicable to certain item types.
- (NSString*) itemDescription [read, retain] |
The description of the item, if any.
- (NSString*) itemId [read, retain] |
The Id of the item.
- (NSString*) license [read, retain] |
Information about licenses or restrictions to view or edit the item.
- (NSLocale*) locale [read, retain] |
The item's language and country information.
- (NSDate*) modified [read, retain] |
Date on which the item was modified.
- (int) numComments [read, assign] |
The number of comments on the item.
- (int) numRatings [read, assign] |
The number of ratings made by the users on the item.
- (int) numViews [read, assign] |
Number of times a file item type is downloaded for the first time or a text item type is opened. For a URL item type, the numViews property increases the first time a service is opened.
- (NSString*) owner [read, retain] |
The user who created the item.
- (AGSPortal*) portal [read, retain] |
The portal that the item belogs to.
- (int) size [read, assign] |
The size of the item in kilobytes.
- (NSString*) snippet [read, retain] |
Snippet or summary of the item with a character limit of 250 characters.
- (AGSSpatialReference*) spatialReference [read, retain] |
The spatial reference of the item. Only applicable to certain item types.
- (NSArray*) tags [read, retain] |
Words or short phrases that describe the item.
- (UIImage*) thumbnail [read, retain] |
The thumbnail image of the item. This needs to be fetched explicitly using fetchThumbnail.
- (NSString*) thumbnailFileName [read, retain] |
The name of the thumbnail image of the item.
- (NSString*) title [read, retain] |
Title of the item.
- (AGSPortalItemType) type [read, assign] |
The type of the item.