The parameters that specify how a sync-enabled geodatabase is generated and downloaded from an ArcGIS feature service using a GenerateGeodatabaseJob. More...
Header: | #include <GenerateGeodatabaseParameters.h> |
Since: | Esri::ArcGISRuntime 100.0 |
Public Functions
GenerateGeodatabaseParameters() | |
GenerateGeodatabaseParameters(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters &other) | |
GenerateGeodatabaseParameters(Esri::ArcGISRuntime::GenerateGeodatabaseParameters &&other) | |
~GenerateGeodatabaseParameters() | |
Esri::ArcGISRuntime::AttachmentSyncDirection | attachmentSyncDirection() const |
Esri::ArcGISRuntime::GenerateGeodatabaseParameters | clone() const |
Esri::ArcGISRuntime::Geometry | extent() const |
bool | isEmpty() const |
bool | isReturnAttachments() const |
bool | isSyncAnnotations() const |
bool | isSyncAttributeRules() const |
bool | isSyncContingentValues() const |
bool | isSyncDimensions() const |
QList<Esri::ArcGISRuntime::GenerateLayerOption> | layerOptions() const |
Esri::ArcGISRuntime::SpatialReference | outSpatialReference() const |
void | setAttachmentSyncDirection(Esri::ArcGISRuntime::AttachmentSyncDirection attachmentSyncDirection) |
void | setExtent(const Esri::ArcGISRuntime::Geometry &extent) |
void | setLayerOptions(const QList<Esri::ArcGISRuntime::GenerateLayerOption> &generateLayerOptions) |
void | setOutSpatialReference(const Esri::ArcGISRuntime::SpatialReference &outSpatialReference) |
void | setReturnAttachments(bool returnAttachments) |
void | setSyncAnnotations(bool syncAnnotations) |
void | setSyncAttributeRules(bool syncAttributeRules) |
void | setSyncContingentValues(bool syncContingentValues) |
void | setSyncDimensions(bool syncDimensions) |
void | setSyncModel(Esri::ArcGISRuntime::SyncModel syncModel) |
void | setUtilityNetworkSyncMode(Esri::ArcGISRuntime::UtilityNetworkSyncMode utilityNetworkSyncMode) |
Esri::ArcGISRuntime::SyncModel | syncModel() const |
Esri::ArcGISRuntime::UtilityNetworkSyncMode | utilityNetworkSyncMode() const |
Esri::ArcGISRuntime::GenerateGeodatabaseParameters & | operator=(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters &other) |
Esri::ArcGISRuntime::GenerateGeodatabaseParameters & | operator=(Esri::ArcGISRuntime::GenerateGeodatabaseParameters &&other) |
Detailed Description
To generate parameters with values which take into account the capabilities supported by the ArcGIS feature service and the data it contains, call GeodatabaseSyncTask::createDefaultGenerateGeodatabaseParametersAsync(const Esri::ArcGISRuntime::Geometry&). You can then modify the parameters with any desired changes. Alternatively, you can generate an empty set of parameters using GenerateGeodatabaseParameters and set the parameters individually. To create a GenerateGeodatabaseJob, pass the parameters to the GeodatabaseSyncTask::generateGeodatabase(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters&, const QString&) method and provide a path where the .geodatabase file can be downloaded to on the device.
You can also use the GenerateGeodatabaseParameters to provide more fine-grained control over the geodatabase that is exported when an offline map is generated. For more information, see the GenerateOfflineMapParameterOverrides class.
Relevant samples:
- Edit and sync features: Synchronize offline edits with a feature service.
- Generate geodatabase replica from feature service: Generate a local geodatabase from an online feature service.
- Generate Offline Map (Overrides): Take a web map offline with additional options for each layer.
Member Function Documentation
GenerateGeodatabaseParameters::GenerateGeodatabaseParameters ()
Default constructor.
GenerateGeodatabaseParameters::GenerateGeodatabaseParameters (const Esri::ArcGISRuntime::GenerateGeodatabaseParameters &other)
Copy constructor from other GenerateGeodatabaseParameters.
GenerateGeodatabaseParameters::GenerateGeodatabaseParameters (Esri::ArcGISRuntime::GenerateGeodatabaseParameters &&other)
Move constructor from other GenerateGeodatabaseParameters.
GenerateGeodatabaseParameters::~GenerateGeodatabaseParameters ()
Destructor.
Esri::ArcGISRuntime::AttachmentSyncDirection GenerateGeodatabaseParameters::attachmentSyncDirection () const
Returns specifies the direction for attachments to be synchronized.
This parameter is available when the service resource sync capabilities includes supportsAttachmentsSyncDirection. This parameter defines how attachments will be synced and is only applicable if the feature service has attachments.
- AttachmentSyncDirection::Bidirectional - Attachment edits can be both uploaded from the client and downloaded from the service when syncing.
- AttachmentSyncDirection::Upload - Attachment edits can only be uploaded from the client when syncing. This is useful in cases where the data collector does not want to consume space with attachments from the service, but does need to collect new attachments.
- AttachmentSyncDirection::None - Attachment edits are never synced from either the client or the server.
When isReturnAttachments is set to true
, you can set attachmentSyncDirection to either AttachmentSyncDirection::Bidirectional (default) or AttachmentSyncDirection::Upload. In this case, create replica includes attachments from the service.
When isReturnAttachments is set to false
, you can set attachmentSyncDirection to either AttachmentSyncDirection::Upload or AttachmentSyncDirection::None (default). In this case, the geodatabase does not include attachments from the service.
Attachment sync direction is set during the GeodatabaseSyncTask::generateGeodatabase(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters&, const QString&) operation and cannot be overridden during GeodatabaseSyncTask::syncGeodatabase(const Esri::ArcGISRuntime::SyncGeodatabaseParameters&, Esri::ArcGISRuntime::Geodatabase*).
See also setAttachmentSyncDirection().
[since Esri::ArcGISRuntime 200.1]
Esri::ArcGISRuntime::GenerateGeodatabaseParameters GenerateGeodatabaseParameters::clone() const
Clones the GenerateGeodatabaseParameters to a new instance.
Returns a new instance of the current GenerateGeodatabaseParameters.
This function was introduced in Esri::ArcGISRuntime 200.1.
Esri::ArcGISRuntime::Geometry GenerateGeodatabaseParameters::extent() const
Returns the geographic extent within which features will be included in the sync-enabled geodatabase.
To include non-spatial records, you must set up the LayerOptions for that layer to include a GenerateLayerOption::whereClause and set GenerateLayerOption::isUseGeometry to false
.
See also setExtent().
bool GenerateGeodatabaseParameters::isEmpty () const
Returns whether this GenerateGeodatabaseParameters is empty.
bool GenerateGeodatabaseParameters::isReturnAttachments () const
Returns if attachments are added to the geodatabase.
The default value is false
. This parameter is only applicable if the feature service has attachments.
[since Esri::ArcGISRuntime 100.14]
bool GenerateGeodatabaseParameters::isSyncAnnotations () const
Returns whether Annotation data is to be included from the service, when generating, or downloading to, an offline geodatabase.
Feature layers and tables are always included in the generation and synchronization of the geodatabase. Annotation data can be optionally included when downloading from the service.
After this data is taken offline to a local geodatabase, any subsequent inserts, edits or deletions will NOT be applied to the server data when re-synchronized. If features linked to the annotation have been changed, the server WILL apply the feature-linked annotation updates. Another download from the server will replace any offline inserts, edits or deletions of Annotation features.
The default value is true
. Annotation data will be included.
SyncCapabilities::isSupportsAnnotations can be used to check whether Annotation data is available from the service.
This property can be used at the same time as specifying other additional data types to be included.
This function was introduced in Esri::ArcGISRuntime 100.14.
[since Esri::ArcGISRuntime 200.6]
bool GenerateGeodatabaseParameters::isSyncAttributeRules () const
Returns specifies whether Attribute Rule data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
Feature layers and tables are always included in the generation and synchronization of the geodatabase. Attribute Rule data can be optionally included.
The default value is false
. Attribute Rule data will not be included.
SyncCapabilities::isSupportsAttributeRules can be used to check whether Attribute Rule data is available from the service.
This property can be used at the same time as specifying other additional data types to be included.
This function was introduced in Esri::ArcGISRuntime 200.6.
[since Esri::ArcGISRuntime 100.13]
bool GenerateGeodatabaseParameters::isSyncContingentValues () const
Returns whether Contingent Value data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
Feature layers and tables are always included in the generation and synchronization of the geodatabase. Contingent Value data can be optionally included.
The default value is false
. Contingent Value data will not be included.
SyncCapabilities::isSupportsContingentValues can be used to check whether Contingent Value data is available from the service.
This property can be used at the same time as specifying other additional data types to be included.
This function was introduced in Esri::ArcGISRuntime 100.13.
[since Esri::ArcGISRuntime 100.14]
bool GenerateGeodatabaseParameters::isSyncDimensions () const
Returns whether Dimension data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
Feature layers and tables are always included in the generation and synchronization of the geodatabase. Dimension data can be optionally included.
The default value is true
. Dimension data will be included.
SyncCapabilities::isSupportsDimensions can be used to check whether Dimension data is available from the service.
This property can be used at the same time as specifying other additional data types to be included.
This function was introduced in Esri::ArcGISRuntime 100.14.
QList<Esri::ArcGISRuntime::GenerateLayerOption > GenerateGeodatabaseParameters::layerOptions () const
Returns the list of layers and tables to include in the geodatabase if the sync model is layer.
This must be populated with minimum of one valid layer id. For valid layers and tables see ArcGISFeatureServiceInfo::layerInfos and ArcGISFeatureServiceInfo::tableInfos. You can also populate with all layers using GeodatabaseSyncTask::createDefaultGenerateGeodatabaseParametersAsync(const Esri::ArcGISRuntime::Geometry&).
See also setLayerOptions().
Esri::ArcGISRuntime::SpatialReference GenerateGeodatabaseParameters::outSpatialReference () const
Returns the spatial reference that is used for the generated geodatabase.
If this is empty, the Extent's spatial reference is used. If that is empty the feature services spatial reference is then used.
See also setOutSpatialReference().
void GenerateGeodatabaseParameters::setAttachmentSyncDirection (Esri::ArcGISRuntime::AttachmentSyncDirection attachmentSyncDirection )
Sets the attachmentSyncDirection to attachmentSyncDirection.
See also attachmentSyncDirection.
void GenerateGeodatabaseParameters::setExtent (const Esri::ArcGISRuntime::Geometry &extent)
Sets the geographic extent of features to include in the geodatabase.
- extent - The geographic extent.
See also extent().
void GenerateGeodatabaseParameters::setLayerOptions (const QList<Esri::ArcGISRuntime::GenerateLayerOption > &generateLayerOptions )
Sets the layerOptions to generateLayerOptions.
See also layerOptions.
void GenerateGeodatabaseParameters::setOutSpatialReference (const Esri::ArcGISRuntime::SpatialReference &outSpatialReference )
Sets the outSpatialReference to outSpatialReference.
See also outSpatialReference.
void GenerateGeodatabaseParameters::setReturnAttachments (bool returnAttachments )
Sets the returnAttachments to returnAttachments.
See also isReturnAttachments.
[since Esri::ArcGISRuntime 100.14]
void GenerateGeodatabaseParameters::setSyncAnnotations (bool syncAnnotations )
Sets the syncAnnotations to syncAnnotations.
This function was introduced in Esri::ArcGISRuntime 100.14.
See also isSyncAnnotations.
[since Esri::ArcGISRuntime 200.6]
void GenerateGeodatabaseParameters::setSyncAttributeRules (bool syncAttributeRules )
Sets the syncAttributeRules to syncAttributeRules.
This function was introduced in Esri::ArcGISRuntime 200.6.
See also isSyncAttributeRules.
[since Esri::ArcGISRuntime 100.13]
void GenerateGeodatabaseParameters::setSyncContingentValues (bool syncContingentValues )
Sets the syncContingentValues to syncContingentValues.
This function was introduced in Esri::ArcGISRuntime 100.13.
See also isSyncContingentValues.
[since Esri::ArcGISRuntime 100.14]
void GenerateGeodatabaseParameters::setSyncDimensions (bool syncDimensions )
Sets the syncDimensions to syncDimensions.
This function was introduced in Esri::ArcGISRuntime 100.14.
See also isSyncDimensions.
void GenerateGeodatabaseParameters::setSyncModel (Esri::ArcGISRuntime::SyncModel syncModel )
Sets the syncModel to syncModel.
See also syncModel.
[since Esri::ArcGISRuntime 100.11]
void GenerateGeodatabaseParameters::setUtilityNetworkSyncMode (Esri::ArcGISRuntime::UtilityNetworkSyncMode utilityNetworkSyncMode )
Sets the utilityNetworkSyncMode to utilityNetworkSyncMode.
This function was introduced in Esri::ArcGISRuntime 100.11.
See also utilityNetworkSyncMode.
Esri::ArcGISRuntime::SyncModel GenerateGeodatabaseParameters::syncModel () const
Returns the synchronization model that will be used generate a geodatabase.
The default is sync model is Layer. Check the services supports the required sync model, see ArcGISFeatureServiceInfo::syncCapabilities.
{ArcGISFeatureServiceInfo::syncCapabilities}, {Esri::ArcGISRuntime::SyncCapabilities} {SyncCapabilities}
See also setSyncModel() and Esri::ArcGISRuntime::ArcGISFeatureServiceInfo::syncCapabilities.
[since Esri::ArcGISRuntime 100.11]
Esri::ArcGISRuntime::UtilityNetworkSyncMode GenerateGeodatabaseParameters::utilityNetworkSyncMode () const
Returns the generation and synchronization mode of Utility Network data from the service to an offline geodatabase.
Feature layers and tables are always included in the generation and synchronization of the geodatabase. Utility Network System data can be optionally included.
When this property is set to something other than UtilityNetworkSyncMode::None, the schema of all data layers and tables in the feature service is required to support querying associations or tracing offline.
You can filter feature data using layerOptions by:
- setting GenerateLayerOption::queryOption to GenerateLayerQueryOption::None
- specifying a GenerateLayerOption::whereClause
- setting GenerateLayerOption::isUseGeometry to
true
Excluding data layers or including system layers of the feature service in the layerOptions will result in an error in the GenerateGeodatabaseJob.
Use SyncCapabilities to check which synchronization mode the feature service supports. If SyncCapabilities::isSupportsUtilityNetworkSystem is true
, UtilityNetworkSyncMode::SyncSystemTables may be used. If SyncCapabilities::isSupportsUtilityNetworkTopology is also true
, UtilityNetworkSyncMode::SyncSystemAndTopologyTables may be used.
Setting this property to something other than UtilityNetworkSyncMode::None allows offline UtilityNetwork query associations. Setting this property to SyncCapabilities::isSupportsUtilityNetworkTopology also enables offline tracing.
When a replica is created with tracing support from an ArcGIS Enterprise 11.2 or earlier feature service, the syncModel must be SyncModel::None. As of ArcGIS Enterprise 11.3, feature services configured with edit capabilities will support SyncModel::Geodatabase.
Utility network sync mode (UtilityNetworkSyncMode) | Required sync capabilities (SyncCapabilities) | Enables utility network capabilities (UtilityNetworkCapabilities) |
---|---|---|
UtilityNetworkSyncMode::None | No sync capability required | No utility network capability enabled |
UtilityNetworkSyncMode::SyncSystemTables | SyncCapabilities::isSupportsUtilityNetworkSystem | UtilityNetworkCapabilities::isSupportsQueryAssociations |
UtilityNetworkSyncMode::SyncSystemAndTopologyTables | SyncCapabilities::isSupportsUtilityNetworkSystem, SyncCapabilities::isSupportsUtilityNetworkTopology | UtilityNetworkCapabilities::isSupportsQueryAssociations, UtilityNetworkCapabilities::isSupportsTrace |
The default value is UtilityNetworkSyncMode::None. Utility Network System data will not be included.
This property can be used while specifying other additional data types to be included.
This function was introduced in Esri::ArcGISRuntime 100.11.
See also setUtilityNetworkSyncMode().
Esri::ArcGISRuntime::GenerateGeodatabaseParameters &GenerateGeodatabaseParameters::operator=(const Esri::ArcGISRuntime::GenerateGeodatabaseParameters &other)
Assignment operator from other GenerateGeodatabaseParameters.
Esri::ArcGISRuntime::GenerateGeodatabaseParameters &GenerateGeodatabaseParameters::operator=(Esri::ArcGISRuntime::GenerateGeodatabaseParameters &&other)
Move operator from other GenerateGeodatabaseParameters.