public class

GenerateGeodatabaseParameters

extends TaskParameters
java.lang.Object
   ↳ com.esri.core.internal.tasks.TaskParameters
     ↳ com.esri.core.tasks.geodatabase.GenerateGeodatabaseParameters

Class Overview

A class representing the parameters used to generate a geodatabase when using the GeodatabaseSyncTask class.

Use the setOutSpatialRef(SpatialReference) method, or a constructor with the outSpatialRef parameter, to ensure the geometries in the geodatabase have a spatial reference that matches the map in which they will be displayed.

Use the geodatabaseExtent parameter of a constructor or the setExtent(Geometry) method) to limit the extent of the data to be synchronized. If limiting the extent, ensure the spatial reference of that extent geometry is also specified correctly, using the subsequent geodatabaseSpatialReference parameter of the constructor, or using the setInSpatialRef(SpatialReference) method.

Summary

Public Constructors
GenerateGeodatabaseParameters(FeatureServiceInfo featureServerInfo)
Creates an instance of the parameters for generating a geodatabase.
GenerateGeodatabaseParameters(FeatureServiceInfo featureServerInfo, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference)
Creates an instance of the parameters for generating a geodatabase.
GenerateGeodatabaseParameters(FeatureServiceInfo featureServerInfo, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference, LayerQueries queries, boolean returnAttachments)
Creates an instance of the parameters for generating a geodatabase.
GenerateGeodatabaseParameters(int[] layerIds, LayerQueries queries, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference, boolean returnAttachments, SyncModel syncModel, SpatialReference outSpatialRef)
Creates an instance of the parameters for generating a geodatabase.
GenerateGeodatabaseParameters(String syncInfoJson)
Internal use only.
GenerateGeodatabaseParameters(int[] layerIds, Geometry geodatabaseExtent, SpatialReference inSpatialRef, boolean returnAttachments, SyncModel syncModel)
Creates an instance of the parameters for generating a geodatabase.
GenerateGeodatabaseParameters(int[] layerIds, Geometry geodatabaseExtent, SpatialReference inSpatialRef, boolean returnAttachments, SyncModel syncModel, SpatialReference outSpatialRef)
Creates an instance of the parameters for generating a geodatabase.
Public Methods
boolean equals(Object obj)
static GenerateGeodatabaseParameters fromJson(JsonParser jsonParser)
Map<String, String> generateRequestParams()
For internal use only.
Geometry getExtent()
Gets the geometry representing the extent of the data in the new geodatabase.
SpatialReference getInSpatialRef()
Gets the spatial reference of the extent set with setExtent(Geometry).
int[] getLayerIds()
Gets the IDs of the layers that will be contained in the generated geodatabase.
SpatialReference getOutSpatialRef()
Gets the spatial reference of the geometries in the new geodatabase.
LayerQueries getQueries()
Gets the layer queries used to generate the new geodatabase.
SyncModel getSyncModel()
Gets the sync model that will be used when synching the new geodatabase.
int hashCode()
boolean isReturnAttachments()
Indicates whether or not we are returning attachments in the new geodatabase.
void setExtent(Geometry geometry)
Sets the geometry that will represent the extent of the data in the new geodatabase.
void setInSpatialRef(SpatialReference inSpatialRef)
Sets the spatial reference of the extent set with setExtent(Geometry).
void setLayerIds(int[] layerIds)
Sets the layer IDs to be contained in the generated geodatabase.
void setOutSpatialRef(SpatialReference outSpatialRef)
Sets the spatial reference of the geometries in the new geodatabase.
void setQueries(LayerQueries queries)
Sets the layer queries used to generate the new geodatabase.
void setReturnAttachments(boolean returnAttachments)
Sets whether or not we want to return attachments in the new geodatabase.
void setSyncModel(SyncModel syncModel)
Sets the sync model that will be used when synching the new geodatabase.
String toJson()
Returns a JSON representation of the generate geodatabase parameters instance.
boolean validate()
For internal use only.
[Expand]
Inherited Methods
From class com.esri.core.internal.tasks.TaskParameters
From class java.lang.Object

Public Constructors

public GenerateGeodatabaseParameters (FeatureServiceInfo featureServerInfo)

Creates an instance of the parameters for generating a geodatabase. The geodatabase created with this constructor will contain all the layers in the feature service indicated by featureServerInfo and will cover its initial extent. No attachments will be returned.

Parameters
featureServerInfo FeatureServiceInfo: information on feature service that will be used to create this geodatabase

public GenerateGeodatabaseParameters (FeatureServiceInfo featureServerInfo, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference)

Creates an instance of the parameters for generating a geodatabase. The geodatabase created with this constructor will contain all the layers in the feature service indicated by featureServerInfo and will cover the given extent. No attachments will be returned.

Parameters
featureServerInfo FeatureServiceInfo: information on feature service that will be used to create this geodatabase
geodatabaseExtent Geometry: the geometry used to define the area to be extracted from the service
geodatabaseSpatialReference SpatialReference: the spatial reference of the geodatabaseExtent parameter

public GenerateGeodatabaseParameters (FeatureServiceInfo featureServerInfo, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference, LayerQueries queries, boolean returnAttachments)

Creates an instance of the parameters for generating a geodatabase. The geodatabase created with this constructor will contain all the layers in the feature service indicated by featureServerInfo and will cover the given extent. The layers' data can be filtered by using the queries parameter.

Parameters
featureServerInfo FeatureServiceInfo: information on feature service that will be used to create this geodatabase
geodatabaseExtent Geometry: the geometry used to define the area to be extracted from the service
geodatabaseSpatialReference SpatialReference: the spatial reference of the geodatabaseExtent parameter
queries LayerQueries: optional queries to be used for filtering the data extracted for each layer
returnAttachments boolean: specifies if attachments in the service are exported into the geodatabase

public GenerateGeodatabaseParameters (int[] layerIds, LayerQueries queries, Geometry geodatabaseExtent, SpatialReference geodatabaseSpatialReference, boolean returnAttachments, SyncModel syncModel, SpatialReference outSpatialRef)

Creates an instance of the parameters for generating a geodatabase. The Geodatabase created with this constructor will contain the layers in the feature service indicated by the array of layerId. Use this constructor when you want to specify the spatial reference of the created geodatabase, otherwise the data will be in the spatial reference specified by the service.

Parameters
layerIds int: the layers from the service to be extracted into the geodatabase
queries LayerQueries: optional queries to be used for filtering the data extracted for each layer
geodatabaseExtent Geometry: the geometry used to define the area to be extracted from the service
geodatabaseSpatialReference SpatialReference: the spatial reference of the geodatabaseExtent parameter
returnAttachments boolean: specifies if attachments in the service are exported into the geodatabase
syncModel SyncModel: specifies the synchronisation model used for the geodatabase
outSpatialRef SpatialReference: specifies the spatial reference that the geodatabase will be created in

public GenerateGeodatabaseParameters (String syncInfoJson)

Internal use only.

Parameters
syncInfoJson String
Throws
IOException

public GenerateGeodatabaseParameters (int[] layerIds, Geometry geodatabaseExtent, SpatialReference inSpatialRef, boolean returnAttachments, SyncModel syncModel)

Creates an instance of the parameters for generating a geodatabase. The Geodatabase created with this constructor will contain the layers in the feature service indicated by the array of layerId.

Parameters
layerIds int: the layers from the service to be extracted into the geodatabase
geodatabaseExtent Geometry: the geometry used to define the area to be extracted from the service
inSpatialRef SpatialReference: the spatial reference of the geodatabaseExtent parameter
returnAttachments boolean: specifies if attachments in the service are exported into the geodatabase
syncModel SyncModel: specifies the synchronization model used for the geodatabase

public GenerateGeodatabaseParameters (int[] layerIds, Geometry geodatabaseExtent, SpatialReference inSpatialRef, boolean returnAttachments, SyncModel syncModel, SpatialReference outSpatialRef)

Creates an instance of the parameters for generating a geodatabase. Use this constructor when you want to specify the spatial reference of the created geodatabase, otherwise the data will be in the spatial reference specified by the service.

Parameters
layerIds int: the layers from the service to be extracted into the geodatabase
geodatabaseExtent Geometry: the geometry used to define the area to be extracted from the service
inSpatialRef SpatialReference: the spatial reference of the geodatabaseExtent parameter
returnAttachments boolean: specifies if attachments in the service are exported into the geodatabase
syncModel SyncModel: specifies the synchronisation model used for the geodatabase
outSpatialRef SpatialReference: specifies the spatial reference that the geodatabase will be created in

Public Methods

public boolean equals (Object obj)

Parameters
obj Object
Returns
boolean

public static GenerateGeodatabaseParameters fromJson (JsonParser jsonParser)

Parameters
jsonParser JsonParser
Returns
GenerateGeodatabaseParameters
Throws
Exception

public Map<String, String> generateRequestParams ()

For internal use only.

Returns
Map<String, String> a Map containing the input parameters
Throws
Exception

public Geometry getExtent ()

Gets the geometry representing the extent of the data in the new geodatabase.

Returns
Geometry the extent of the data in the new geodatabase

public SpatialReference getInSpatialRef ()

Gets the spatial reference of the extent set with setExtent(Geometry).

Returns
SpatialReference the spatial reference of the data extent

public int[] getLayerIds ()

Gets the IDs of the layers that will be contained in the generated geodatabase.

Returns
int[] the layer IDs

public SpatialReference getOutSpatialRef ()

Gets the spatial reference of the geometries in the new geodatabase.

In order to be correctly displayed in a map (in a FeatureLayer), the spatial reference of the geometries must match the spatial reference of the map. Use the setOutSpatialRef(SpatialReference) method to set the spatial reference of the geometries in the generated geodatabase.

Returns
SpatialReference the spatial reference set for the new geodatabase

public LayerQueries getQueries ()

Gets the layer queries used to generate the new geodatabase.

Returns
LayerQueries the queries

public SyncModel getSyncModel ()

Gets the sync model that will be used when synching the new geodatabase.

Returns
SyncModel the sync model

public int hashCode ()

Returns
int

public boolean isReturnAttachments ()

Indicates whether or not we are returning attachments in the new geodatabase.

Returns
boolean true, if we will return attachments in the new geodatabase

public void setExtent (Geometry geometry)

Sets the geometry that will represent the extent of the data in the new geodatabase.

If the geometry has a spatial reference different to the spatial reference of the service, ensure that you call the setInSpatialRef(SpatialReference) method, passing in the spatial reference of the geometry parameter.

Parameters
geometry Geometry: the extent of the data in the new geodatabase

public void setInSpatialRef (SpatialReference inSpatialRef)

Sets the spatial reference of the extent set with setExtent(Geometry).

Parameters
inSpatialRef SpatialReference: the spatial reference of the data extent

public void setLayerIds (int[] layerIds)

Sets the layer IDs to be contained in the generated geodatabase.

Parameters
layerIds int: IDs of the layers to return

public void setOutSpatialRef (SpatialReference outSpatialRef)

Sets the spatial reference of the geometries in the new geodatabase.

In order to be correctly displayed in a map (in a FeatureLayer), the spatial reference of the geometries must match the spatial reference of the map. By default, the geometries spatial reference will match that of the service. If the spatial reference of the service does not match that of the map to which the layer will be added, use this method to set the spatial reference of the geometries in the generated geodatabase.

Parameters
outSpatialRef SpatialReference: the spatial reference set for the new geodatabase

public void setQueries (LayerQueries queries)

Sets the layer queries used to generate the new geodatabase.

Parameters
queries LayerQueries: the layer queries

public void setReturnAttachments (boolean returnAttachments)

Sets whether or not we want to return attachments in the new geodatabase.

Parameters
returnAttachments boolean: true to return attachements, false otherwise

public void setSyncModel (SyncModel syncModel)

Sets the sync model that will be used when synching the new geodatabase.

Parameters
syncModel SyncModel: the new sync model

public String toJson ()

Returns a JSON representation of the generate geodatabase parameters instance.

Returns
String String JSON for geodatabase parameters
Throws
Exception

public boolean validate ()

For internal use only.

Returns
boolean