|
ArcGIS Runtime SDK for iOS
100.9
|
A container for a collection of AGSServiceFeatureTable connected to a feature service.
An AGSServiceGeodatabase connects to a feature service as a whole, grouping together AGSServiceFeatureTable instances for related records queries, connecting to a version in a branch-versioned service, and managing edits for all tables.
Instance Methods | |
| (id< AGSCancelable >) | - applyEditsWithCompletion: |
| (void) | - cancelLoad |
| (id< AGSCancelable >) | - createVersionWithParameters:completion: |
| (id< AGSCancelable >) | - fetchVersionsWithCompletion: |
| (BOOL) | - hasLocalEdits |
| (instancetype) | - initWithURL: |
| (instancetype) | - initWithURL:versionName: |
| (void) | - loadWithCompletion: |
| (void) | - retryLoadWithCompletion: |
| (id< AGSCancelable >) | - switchVersionWithName:completion: |
| (nullable AGSServiceFeatureTable *) | - tableWithLayerID: |
| (id< AGSCancelable >) | - undoLocalEditsWithCompletion: |
Class Methods | |
| (instancetype) | + serviceGeodatabaseWithURL: |
| (instancetype) | + serviceGeodatabaseWithURL:versionName: |
Properties | |
| NSArray< AGSServiceFeatureTable * > * | connectedTables |
| AGSCredential * | credential |
| NSString * | defaultVersionName |
| NSError * | loadError |
| AGSLoadStatus | loadStatus |
| AGSRequestConfiguration * | requestConfiguration |
| AGSArcGISFeatureServiceInfo * | serviceInfo |
| BOOL | supportsBranchVersioning |
| NSURL * | URL |
| NSString * | versionName |
| - (id<AGSCancelable>) applyEditsWithCompletion: | (void(^)(NSArray< AGSFeatureTableEditResult * > *__nullable result, NSError *__nullable error)) | completion |
Applies all local edits in all tables to the service.
Edits in all tables are applied to the feature service in a single call, which is more efficient than doing so one AGSServiceFeatureTable at a time.
| completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
|
requiredinherited |
Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError
| - (id<AGSCancelable>) createVersionWithParameters: | (AGSServiceVersionParameters *) | parameters | |
| completion: | (void(^)(AGSServiceVersionInfo *__nullable result, NSError *__nullable error)) | completion | |
Creates a new version in the service based on the default version
Branch versioning requires that the default version always be the ancestor of all other versions.
If the service isn't branch versioned, this will complete with AGSErrorCodeMappingBranchVersioningNotSupportedByService If the version parameters do not include a name, this will complete with an error.
| parameters | The properties of the new version |
| completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| - (id<AGSCancelable>) fetchVersionsWithCompletion: | (void(^)(NSArray< AGSServiceVersionInfo * > *__nullable result, NSError *__nullable error)) | completion |
Gets a list of all versions on the service
If the service isn't branch versioned, this will complete with AGSErrorCodeMappingBranchVersioningNotSupportedByService
| completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| - (BOOL) hasLocalEdits |
Determines if any of the tables in the AGSServiceGeodatabase have unapplied edits.
| - (instancetype) initWithURL: | (NSURL *) | URL |
Creates a new AGSServiceGeodatabase connected to the default version in a feature service
If the service is branch versioned, the AGSServiceGeodatabase will connect to the default version
| URL | The URL of the service to connect to |
| - (instancetype) initWithURL: | (NSURL *) | URL | |
| versionName: | (NSString *) | versionName | |
Creates a new AGSServiceGeodatabase connected to a specific version in a feature service.
If a version with the name does not exist, or the service is not branch versioned, the AGSServiceGeodatabase will fail to load.
| URL | The URL of the service to connect to. |
| versionName | The existing version to connect to when the AGSServiceGeodatabase loads. |
|
requiredinherited |
Loads data for the object asynchronously. The completion block is invoked upon completion.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad to cancel loading - retryLoadWithCompletion: to force reload
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad and then this methodIf the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
| + (instancetype) serviceGeodatabaseWithURL: | (NSURL *) | URL |
Creates a new AGSServiceGeodatabase connected to the default version in a feature service
If the service is branch versioned, the AGSServiceGeodatabase will connect to the default version
| URL | The URL of the service to connect to |
| + (instancetype) serviceGeodatabaseWithURL: | (NSURL *) | URL | |
| versionName: | (NSString *) | versionName | |
Creates a new AGSServiceGeodatabase connected to a specific version in a feature service.
If a version with the name does not exist, or the service is not branch versioned, the AGSServiceGeodatabase will fail to load.
| URL | The URL of the service to connect to. |
| versionName | The existing version to connect to when the AGSServiceGeodatabase loads. |
| - (id<AGSCancelable>) switchVersionWithName: | (NSString *) | versionName | |
| completion: | (void(^)(NSError *__nullable error)) | completion | |
Switches all connected feature tables to the new version.
An error is returned if:
AGSServiceGeodatabase::connectedTables have unapplied editsCheck the result of hasLocalEdits: before attempting to switch versions, to make sure all changes are saved to the service or discarded from the local cache. Use the applyEditsWithCompletion: or undoLocalEditsWithCompletion: methods as appropriate to save or discard changes before switching versions.
| versionName | The name of the version to connect to. |
| completion | The error parameter is populated on failure. |
| - (nullable AGSServiceFeatureTable *) tableWithLayerID: | (NSInteger) | layerID |
Returns a service feature table object from the ID of a layer or table in the service
If a table instance for the layer already exists in AGSServiceGeodatabase::connectedTables, the existing object will be returned. Otherwise, a new AGSServiceFeatureTable will be created.
| layerID | The layer id for which to create the table |
nil is returned. | - (id<AGSCancelable>) undoLocalEditsWithCompletion: | (void(^)(NSError *__nullable error)) | completion |
Undoes all of the local edits in all the tables.
| completion | The error parameter is populated on failure. |
|
readnonatomiccopy |
An array of feature tables managed by the AGSServiceGeodatabase
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomiccopy |
The name of the default version
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
readnonatomicstrong |
The metadata of the service this object is connected to
|
readnonatomicassign |
Whether the service supports branch versioning
|
readrequirednonatomicstronginherited |
The URL of the remote resource.
|
readnonatomiccopy |
The name of the version the AGSServiceGeodatabase is currently connected to
To change the version this AGSServiceGeodatabase is connected to, use the switchVersionWithName:completion: method.