Class GenerateGeodatabaseParameters
GeodatabaseSyncTask.generateGeodatabase(GenerateGeodatabaseParameters, String)
 to generate sync-enabled geodatabases from supporting ArcGIS feature services.
 
 Consider using the convenience method GeodatabaseSyncTask.createDefaultGenerateGeodatabaseParametersAsync(Geometry)
 to get a properly initialized instance of this class with appropriate default values which take into account the capabilities
 supported by the ArcGIS feature service and the data it contains.
- Since:
- 100.0.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumSpecifies the direction to synchronize attachments when a geodatabase is synchronized against its originating service.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs a new GenerateGeodatabaseParameters instance.
- 
Method SummaryModifier and TypeMethodDescriptionGets the direction for attachments to be synchronized with its originating service.Gets the geometry to use as a spatial filter.Gets a mutable list of GenerateLayerOption objects which specify how to filter features on a layer-by-layer basis for inclusion in a sync-enabled geodatabase.Gets the spatial reference that is used for the generated geodatabase.booleanSpecifies whether Annotation data is to be included from the service, when generating, or downloading to, an offline geodatabase.booleanSpecifies whether Contingent Value data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.booleanSpecifies whether Dimension data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.Gets the synchronization model that is used for the generated geodatabase.Specifies the generation and synchronization mode of Utility Network data from the service to an offline geodatabase.booleanIndicates if attachments for features should be included in the generated geodatabase.voidsetAttachmentSyncDirection(GenerateGeodatabaseParameters.AttachmentSyncDirection attachmentSyncDirection) Sets the direction for attachments to be synchronized with its originating service.voidSets the geometry to use as a spatial filter.voidsetOutSpatialReference(SpatialReference outSpatialReference) Sets the spatial reference that is used for the generated geodatabase.voidsetReturnAttachments(boolean returnAttachments) Sets if attachments for features should be included in the generated geodatabase.voidsetSyncAnnotations(boolean syncAnnotations) Specifies whether Annotation data is to be included from the service, when generating, or downloading to, an offline geodatabase.voidsetSyncContingentValues(boolean syncContingentValues) Specifies whether Contingent Value data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.voidsetSyncDimensions(boolean syncDimensions) Specifies whether Dimension data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.voidsetSyncModel(SyncModel syncModel) Sets the synchronization model that is used for the generated geodatabase.voidsetUtilityNetworkSyncMode(UtilityNetworkSyncMode utilityNetworkSyncMode) Specifies the generation and synchronization mode of Utility Network data from the service to an offline geodatabase.
- 
Constructor Details- 
GenerateGeodatabaseParameterspublic GenerateGeodatabaseParameters()Constructs a new GenerateGeodatabaseParameters instance. Use this constructor if you are setting all of its properties yourself. Consider using the convenience methodGeodatabaseSyncTask.createDefaultGenerateGeodatabaseParametersAsync(Geometry)rather than this constructor to get an initialized instance of this class with properties already set which take into account the capabilities supported by the ArcGIS feature service.- Since:
- 100.0.0
 
 
- 
- 
Method Details- 
getLayerOptionsGets a mutable list of GenerateLayerOption objects which specify how to filter features on a layer-by-layer basis for inclusion in a sync-enabled geodatabase. If not previously set, this method will return an empty list to which you can add GenerateLayerOption objects.For non-spatial records, you must set GenerateLayerOption.isUseGeometry()to false and provide a suitable where clause usingGenerateLayerOption.setWhereClause(String).Note, these layer options are only applicable to generate geodatabases using the sync model of SyncModel.PER_LAYER.- Returns:
- the list of GenerateLayerOption objects to apply to layers
- Since:
- 100.0.0
 
- 
getAttachmentSyncDirectionGets the direction for attachments to be synchronized with its originating service. If not set, default value isGenerateGeodatabaseParameters.AttachmentSyncDirection.NONE.This parameter is available when SyncCapabilities.isSupportsAttachmentsSyncDirection()is true. This parameter defines how attachments will be synced and is only applicable if the feature service has attachments. SeeGenerateGeodatabaseParameters.AttachmentSyncDirectionfor information on available options:- Returns:
- the direction for attachments to be synchronized
- Since:
- 100.0.0
- See Also:
 
- 
setAttachmentSyncDirectionpublic void setAttachmentSyncDirection(GenerateGeodatabaseParameters.AttachmentSyncDirection attachmentSyncDirection) Sets the direction for attachments to be synchronized with its originating service. The default value isGenerateGeodatabaseParameters.AttachmentSyncDirection.NONE.This parameter is available when SyncCapabilities.isSupportsAttachmentsSyncDirection()is true. This parameter defines how attachments will be synced and is only applicable if the feature service has attachments. SeeGenerateGeodatabaseParameters.AttachmentSyncDirectionfor information on available options:- GenerateGeodatabaseParameters.AttachmentSyncDirection.BIDIRECTIONAL
- GenerateGeodatabaseParameters.AttachmentSyncDirection.UPLOAD
- GenerateGeodatabaseParameters.AttachmentSyncDirection.NONE
 When isReturnAttachments()is true, you can set the AttachmentSyncDirection to eitherGenerateGeodatabaseParameters.AttachmentSyncDirection.BIDIRECTIONAL(default) orGenerateGeodatabaseParameters.AttachmentSyncDirection.UPLOAD. In both of these cases, the geodatabase will include attachments from the service, but the ability to retrieve attachment edits from the server will differ based on the chosen AttachmentSyncDirection.When isReturnAttachments()is false, you can set AttachmentSyncDirection to eitherGenerateGeodatabaseParameters.AttachmentSyncDirection.NONE(default) orGenerateGeodatabaseParameters.AttachmentSyncDirection.UPLOAD. In both cases, the geodatabase does not include attachments from the service, but the ability to send local attachment edits to the server will differ based on the chosen AttachmentSyncDirection.Attachment sync direction is set during the GeodatabaseSyncTask.generateGeodatabase(GenerateGeodatabaseParameters, String)operation and cannot be overridden duringGeodatabaseSyncTask.syncGeodatabase(SyncGeodatabaseParameters, Geodatabase).- Parameters:
- attachmentSyncDirection- the direction for attachments to be synchronized
- Throws:
- IllegalArgumentException- if attachmentSyncDirection is null
- Since:
- 100.0.0
- See Also:
 
- 
getExtentGets the geometry to use as a spatial filter. All features with geometries that intersect with this extent are replicated into the geodatabase.- Returns:
- the Geometry to use as a spatial filter, or null if none has been set
- Since:
- 100.0.0
- See Also:
 
- 
setExtentSets the geometry to use as a spatial filter. This is typically an Envelope, but other geometry types can also be used. All features with geometries that intersect with this extent are replicated into the geodatabase.To include non-spatial records, you must ensure that layer options are properly defined via getLayerOptions(), each layer options requires thatGenerateLayerOption.isUseGeometry()is set to false and a suitable where clause is provided viaGenerateLayerOption.setWhereClause(String).- Parameters:
- extent- the Geometry to use as a spatial filter
- Throws:
- IllegalArgumentException- if extent is null
- Since:
- 100.0.0
 
- 
getOutSpatialReferenceGets the spatial reference that is used for the generated geodatabase. If the data on the server is not in this spatial reference, it will be reprojected before being included in the geodatabase. If this is null, the spatial reference of the extent set bysetExtent(Geometry)is used. If that is also null, the feature service's spatial reference is used.- Returns:
- the spatial reference that is used for the generated geodatabase, or null if none has been set
- Since:
- 100.0.0
 
- 
setOutSpatialReferenceSets the spatial reference that is used for the generated geodatabase. If the data on the server is not in this spatial reference, it will be reprojected before being included in the geodatabase. If this is null, the spatial reference of the extent set bysetExtent(Geometry)is used. If that is also null, the feature service's spatial reference is used.- Parameters:
- outSpatialReference- the spatial reference to use for the generated geodatabase
- Since:
- 100.0.0
 
- 
isReturnAttachmentspublic boolean isReturnAttachments()Indicates if attachments for features should be included in the generated geodatabase. Attachments can be large, so excluding them may reduce the size of the geodatabase. Only applicable if the feature service supports attachments. Default value is false. This parameter is only applicable if the feature service has attachments.- Returns:
- true if attachments are to be included in the generated geodatabase
- Since:
- 100.0.0
 
- 
setReturnAttachmentspublic void setReturnAttachments(boolean returnAttachments) Sets if attachments for features should be included in the generated geodatabase. Attachments can be large, so excluding them may reduce the size of the geodatabase. Only applicable if the feature service supports attachments. Default value is false. This parameter is only applicable if the feature service has attachments.- Parameters:
- returnAttachments- true if attachments are to be included in the generated geodatabase
- Since:
- 100.0.0
 
- 
getSyncAnnotationspublic boolean getSyncAnnotations()Specifies 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. Once 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. - Returns:
- specifies whether Annotation data is to be included from the service, when generating, or downloading to, an offline geodatabase.
- Since:
- 100.14.0
 
- 
setSyncAnnotationspublic void setSyncAnnotations(boolean syncAnnotations) Specifies 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. Once 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. - Parameters:
- syncAnnotations- specifies whether Annotation data is to be included from the service, when generating, or downloading to, an offline geodatabase.
- Since:
- 100.14.0
 
- 
getSyncContingentValuespublic boolean getSyncContingentValues()Specifies 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 true. Contingent Value data will 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. - Returns:
- true if Contingent Value data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
- Since:
- 100.13.0
- See Also:
 
- 
setSyncContingentValuespublic void setSyncContingentValues(boolean syncContingentValues) Specifies 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 true. Contingent Value data will 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. - Parameters:
- syncContingentValues- specifies whether Contingent Value data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
- Since:
- 100.11.0
- See Also:
 
- 
getSyncDimensionspublic boolean getSyncDimensions()Specifies 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. - Returns:
- specifies whether Dimension data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
- Since:
- 100.14.0
 
- 
setSyncDimensionspublic void setSyncDimensions(boolean syncDimensions) Specifies 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. - Parameters:
- syncDimensions- specifies whether Dimension data is to be included from the service, when generating, or synchronizing with, an offline geodatabase.
- Since:
- 100.14.0
 
- 
getSyncModelGets the synchronization model that is used for the generated geodatabase. The sync model defines whether the geodatabase should be configured to sync with the originating service as a whole or individually on a per layer basis. The default value isSyncModel.PER_LAYER. Check the service supports the required sync model; seeArcGISFeatureServiceInfo.getSyncCapabilities().- Returns:
- the synchronization model
- Since:
- 100.0.0
 
- 
setSyncModelSets the synchronization model that is used for the generated geodatabase. The sync model defines whether the geodatabase should be configured to sync with the originating service as a whole or individually on a per layer basis. The default value isSyncModel.PER_LAYER. Check the service supports the required sync model; seeArcGISFeatureServiceInfo.getSyncCapabilities().- Parameters:
- syncModel- the synchronization model
- Throws:
- IllegalArgumentException- if syncModel is null
- Since:
- 100.0.0
 
- 
getUtilityNetworkSyncModeSpecifies 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,GeodatabaseSyncTask.createDefaultGenerateGeodatabaseParametersAsync(Geometry)will include all the data layers and tables in the feature service in thegetLayerOptions(). Since only the feature layers' schema is required to support querying associations or tracing offline, their feature data may be filtered out by:- setting GenerateLayerOption.getQueryOption()toGenerateLayerOption.QueryOption.NONE
- specifying a GenerateLayerOption.getWhereClause()
- setting GenerateLayerOption.isUseGeometry()to true Excluding data layers or including system layers of the feature service in theGenerateGeodatabaseParameters.getLayerOptions()will result in an error in theGenerateGeodatabaseJob.
 Use SyncCapabilitiesto check which synchronization mode the feature service supports. IfSyncCapabilities.isSupportsUtilityNetworkSystem()is true,UtilityNetworkSyncMode.SYNC_SYSTEM_TABLESmay be used. IfSyncCapabilities.isSupportsUtilityNetworkTopology()is also true,UtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESmay be used.Setting this property to something other than UtilityNetworkSyncMode.NONEallows theUtilityNetworkquery associations offline. Setting this property toUtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESalso enables tracing offline. However,SyncCapabilities.isSupportsUtilityNetworkTopology()does not allow editing the feature layers, which meansgetSyncModel()must be set toSyncModel.NONEor such a combination will result in an error in theGenerateGeodatabaseJob.Utility Network Sync Mode Settings Utility network sync mode ( UtilityNetworkSyncMode)Required sync capabilities ( SyncCapabilities)Enables utility network capabilities ( UtilityNetworkCapabilities)UtilityNetworkSyncMode.NONENo sync capability required No utility network capability enabled UtilityNetworkSyncMode.SYNC_SYSTEM_TABLESSyncCapabilities.getSupportsUtilityNetworkSystem()UtilityNetworkCapabilities.getSupportsQueryAssociations()UtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESSyncCapabilities.isSupportsUtilityNetworkSystem(),SyncCapabilities.isSupportsUtilityNetworkTopology()UtilityNetworkCapabilities.isSupportsQueryAssociations(),UtilityNetworkCapabilities.getSupportsTrace()The default value is UtilityNetworkSyncMode.NONE. Utility Network System data will not be included.This property can be used at the same time as specifying other additional data types to be included. - Returns:
- specifies the generation and synchronization mode of Utility Network data from the service to an offline geodatabase.
- Since:
- 100.11.0
 
- setting 
- 
setUtilityNetworkSyncModeSpecifies 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,GeodatabaseSyncTask.createDefaultGenerateGeodatabaseParametersAsync(Geometry)will include all the data layers and tables in the feature service in thegetLayerOptions(). Since only the feature layers' schema is required to support querying associations or tracing offline, their feature data may be filtered out by:- setting GenerateLayerOption.getQueryOption()toGenerateLayerOption.QueryOption.NONE
- specifying a GenerateLayerOption.getWhereClause()
- setting GenerateLayerOption.isUseGeometry()to true Excluding data layers or including system layers of the feature service in theGenerateGeodatabaseParameters.getLayerOptions()will result in an error in theGenerateGeodatabaseJob.
 Use SyncCapabilitiesto check which synchronization mode the feature service supports. IfSyncCapabilities.isSupportsUtilityNetworkSystem()is true,UtilityNetworkSyncMode.SYNC_SYSTEM_TABLESmay be used. IfSyncCapabilities.isSupportsUtilityNetworkTopology()is also true,UtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESmay be used.Setting this property to something other than UtilityNetworkSyncMode.NONEallows theUtilityNetworkquery associations offline. Setting this property toUtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESalso enables tracing offline. However,SyncCapabilities.isSupportsUtilityNetworkTopology()does not allow editing the feature layers, which meansgetSyncModel()must be set toSyncModel.NONEor such a combination will result in an error in theGenerateGeodatabaseJob.Utility Network Sync Mode Settings Utility network sync mode ( UtilityNetworkSyncMode)Required sync capabilities ( SyncCapabilities)Enables utility network capabilities ( UtilityNetworkCapabilities)UtilityNetworkSyncMode.NONENo sync capability required No utility network capability enabled UtilityNetworkSyncMode.SYNC_SYSTEM_TABLESSyncCapabilities.getSupportsUtilityNetworkSystem()UtilityNetworkCapabilities.getSupportsQueryAssociations()UtilityNetworkSyncMode.SYNC_SYSTEM_AND_TOPOLOGY_TABLESSyncCapabilities.isSupportsUtilityNetworkSystem(),SyncCapabilities.isSupportsUtilityNetworkTopology()UtilityNetworkCapabilities.isSupportsQueryAssociations(),UtilityNetworkCapabilities.getSupportsTrace()The default value is UtilityNetworkSyncMode.NONE. Utility Network System data will not be included.This property can be used at the same time as specifying other additional data types to be included. - Parameters:
- utilityNetworkSyncMode- specifies the generation and synchronization mode of Utility Network data from the service to an offline geodatabase.
- Throws:
- IllegalArgumentException- if utilityNetworkSyncMode is null
- Since:
- 100.11.0
 
- setting 
 
-