Class GenerateGeodatabaseParameters

    • Constructor Detail

      • GenerateGeodatabaseParameters

        public GenerateGeodatabaseParameters()
        Constructs a new GenerateGeodatabaseParameters instance. Use this constructor if you are setting all of its properties yourself. Consider using the convenience method GeodatabaseSyncTask.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 Detail

      • getLayerOptions

        public List<GenerateLayerOption> getLayerOptions()
        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. 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 using GenerateLayerOption.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
      • getExtent

        public Geometry getExtent()
        Gets 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:
        setExtent(Geometry)
      • setExtent

        public void setExtent​(Geometry extent)
        Sets 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 that GenerateLayerOption.isUseGeometry() is set to false and a suitable where clause is provided via GenerateLayerOption.setWhereClause(String).

        Parameters:
        extent - the Geometry to use as a spatial filter
        Throws:
        IllegalArgumentException - if extent is null
        Since:
        100.0.0
      • getOutSpatialReference

        public SpatialReference getOutSpatialReference()
        Gets 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 by setExtent(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
      • setOutSpatialReference

        public void setOutSpatialReference​(SpatialReference outSpatialReference)
        Sets 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 by setExtent(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
      • isReturnAttachments

        public 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 true.
        Returns:
        true if attachments are to be included in the generated geodatabase
        Since:
        100.0.0
      • setReturnAttachments

        public 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 true.
        Parameters:
        returnAttachments - true if attachments are to be included in the generated geodatabase
        Since:
        100.0.0
      • getSyncModel

        public SyncModel getSyncModel()
        Gets 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.
        Returns:
        the synchronization model
        Since:
        100.0.0
      • setSyncModel

        public void setSyncModel​(SyncModel syncModel)
        Sets 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 is SyncModel.PER_LAYER. Check the service supports the required sync model, see ArcGISFeatureServiceInfo.getSyncCapabilities().
        Parameters:
        syncModel - the synchronization model
        Throws:
        IllegalArgumentException - if syncModel is null
        Since:
        100.0.0