Class UGCDataProvider
- java.lang.Object
-
- com.supermap.services.providers.UGCDataProvider
-
- All Implemented Interfaces:
- AttachmentCapabilities, BatchEditCapability, CoordTransferCapabilities, DataProvider, Disposable, FeatureMetadataCapabilities, GetFeatureSupportDynamicProj, GridValueCapabilities, ProviderContextAware
public class UGCDataProvider extends java.lang.Object implements DataProvider, GridValueCapabilities, GetFeatureSupportDynamicProj, Disposable, ProviderContextAware, BatchEditCapability, AttachmentCapabilities, FeatureMetadataCapabilities, CoordTransferCapabilities
SuperMap data service provider.
UGCDataProvider provides services related to SuperMap data and encapsulates all the GIS functions related to SuperMap data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classUGCDataProvider.DelayInnerUGCDataProvider
-
Field Summary
Fields Modifier and Type Field and Description protected UGCDataProviderSettingsettingprotected com.supermap.services.providers.IWorkspaceworkspace
-
Constructor Summary
Constructors Constructor and Description UGCDataProvider()The default constructor.UGCDataProvider(UGCDataProviderSetting providerSetting)Constructs a UGCDataProvider object based on the configuration information of a SuperMap data service provider.
-
Method Summary
Methods Modifier and Type Method and Description AttachmentInfoaddAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, Attachment attachment)Related to the attachment for feature.EditResultaddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Adds a set of features of the same type to a specified dataset.voidbatchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Adds elements in batch, the performance is higher than the addFeatures interface when adding massive features.protected voidcheckExcludedFieldsInDatasources(ExcludedFieldsInDatasource[] excludedFieldsInDatasources)Checks for duplicate excluded fields, ie., the excluded fields of the same dataset in the same datasource are set multiple times.protected static voidcheckParameterNull(java.lang.Object obj, java.lang.String parameterName)Checks whether the parameter is null.booleanclearFeatures(java.lang.String datasourceName, java.lang.String datasetName)Clears the features in a specified dataset.booleancontainsDataset(java.lang.String datasourceName, java.lang.String datasetName)Determines whether a specified datasource contains a specified dataset.java.util.List<Geometry>coordtransfer(Geometry[] geometry, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys)According to the target coordinate system, converting the collection object coordinate systembooleancopyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)Copies a replication of a specified dataset.booleancreateDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)Creates a new dataset in a specified datasource according to the dataset information.booleandeleteAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)Delete the attachment related to feature.booleandeleteDataset(java.lang.String datasourceName, java.lang.String datasetName)Removes the specified dataset in the specified datasource.EditResultdeleteFeatures(java.lang.String datasourceName, QueryParameter parameters)Deletes features by SQL.EditResultdeleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)Deletes features in a specified dataset according to the specified IDs.voiddispose()Releases the resources used by a SuperMap data service provider, i.e., releases the workspace.AttachmentgetAttachement(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)Gets the attachment data according to the attachment ID.java.util.List<AttachmentInfo>getAttachmentInfos(java.lang.String datasourceName, java.lang.String datasetName, int featureId)Gets the attachment info list related to feature.DatasetInfogetDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName)Gets the information of a specified dataset in a given datasource.java.util.List<DatasetInfo>getDatasetInfos(java.lang.String datasourceName)Gets information about all the datasets in a specified datasource.java.util.List<java.lang.String>getDatasetNames(java.lang.String datasourceName)Gets all dataset names for the current data source.DatasourceInfogetDatasourceInfo(java.lang.String datasourceName)Gets information about a specified datasource.java.util.List<DatasourceInfo>getDatasourceInfos()Gets information about all the datasources corresponding to the current data service provider.java.util.List<DomainInfo>getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)Gets the domain info of the specified dataset.GetFeatureResultgetFeature(GetFeatureParameters parameters)Query and return the feature results.java.util.List<Feature>getFeature(java.lang.String datasourceName, QueryParameter queryParam)Gets features by a SQL query condition.protected java.util.List<Feature>getFeature(java.lang.String datasourceName, QueryParameter queryParam, GeometryType networkType)Gets all the field info of the specified dataset.java.util.List<Feature>getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures)Gets features by a SQL query condition.java.util.List<Feature>getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures, PrjCoordSys targetPrj)Gets features by a SQL query condition.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double distance, java.lang.String attributeFilter, java.lang.String[] fields)Gets the features that fall within a buffer of a specified geometric object and meet a certain attribute filter condition.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields)Gets features by performing spatial query.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields, PrjCoordSys targetPrj)Gets features by performing spatial query.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields)Gets features with specified IDs in a specified dataset.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields, int fromIndex, int toIndex)Gets the feature in the specified data set according to the specified feature ID in the way of supporting paging.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields)Gets the features that fall within a specified space and meet a certain attribute filter condition.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields, PrjCoordSys targetPrj)Gets the features that fall within a specified space and meet a certain attribute filter condition.FeatureMetadatagetFeatureMetadata(java.lang.String datasourceName, java.lang.String datasetName, int featureId)Gets the feature meta info.java.util.List<FieldInfo>getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName)Get all the field info of the specified dataset.GridValuegetGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d)Gets grid value according to the coordinate position.GridValuesgetGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)Gets the grid value matrix within a specified rectangle.ImageValuegetImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d)Gets pixel value according to the coordinate position.ImageValuesgetImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)Gets the grid value matrix within a specified rectangle.com.supermap.services.providers.UGCDataProvider.InnerUGCDataProviderFactorygetInnerUGCDataProviderFactory()java.lang.StringgetProviderName()static com.supermap.data.GeometrygetUGOGeometryForEdit(com.supermap.data.Geometry oldGeometry, Geometry newGeometry)Deprecated.CallCommontypesConversion#getUGOGeometrymethod to finish converting directly, don't need to use this method. To avoid errors, using this method temporarily.protected voidinit(UGCDataProviderSetting providerSetting)voidpauseForRefreshWorkspace()Prevents the request to refresh the workspace.voidrefreshWorkspace()Refreshes the workspace.voidrefreshWorkspaceFinished()Continues the request after finishing refreshing the workspace.booleanrenameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)Modifies the name of a specified dataset.voidsetInnerUGCDataProviderFactory(com.supermap.services.providers.UGCDataProvider.InnerUGCDataProviderFactory innerUGCDataProviderFactory)voidsetProviderContext(ProviderContext context)Sets the service provider context.voidsetProviderName(java.lang.String providerName)doublestatistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode)Calculates statistics on a specified field of a dataset based on a specified statistical mode.doublestatistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode)Calculates statistics on a specified field of a dataset based on a specified statistical mode.booleansupportAttachments(java.lang.String datasourceName, java.lang.String datasetName)Whether the dataset attachment is enable.booleansupportFeatureMetadatas(java.lang.String datasourceName, java.lang.String datasetName)Whether this dataset feature supports the metadata info.voidupdateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)Updates information about a specified dataset in a given datasource.voidupdateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)Updates the original datasource info with new datasource info.EditResultupdateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Updates features in a specified dataset.voidupdateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFieldInfos)Updates the field information in a specified dataset.
-
-
-
Field Detail
-
workspace
protected com.supermap.services.providers.IWorkspace workspace
-
setting
protected UGCDataProviderSetting setting
-
-
Constructor Detail
-
UGCDataProvider
public UGCDataProvider()
The default constructor.
-
UGCDataProvider
public UGCDataProvider(UGCDataProviderSetting providerSetting)
Constructs a UGCDataProvider object based on the configuration information of a SuperMap data service provider.
- Parameters:
providerSettingSuperMap- The configuration information of data service provider.
-
-
Method Detail
-
checkParameterNull
protected static void checkParameterNull(java.lang.Object obj, java.lang.String parameterName)Checks whether the parameter is null.
The IllegalArgumentException will be thrown if parameterName is null.
- Parameters:
objThe- type of the parameter to be checked.parameterNameThe- name of the parameter to be checked.
-
addFeatures
public EditResult addFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Adds a set of features of the same type to a specified dataset.
Every dataset in SuperMap has a type (
DatasetType). A dataset can be a point, a line, or a region dataset. The features in a dataset are of the same type with the dataset. For instance, the features stored in a point dataset must be point features. Therefore, a feature added to a dataset must be of the same type with that dataset.- Specified by:
addFeaturesin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.targetFeaturesThe- list of features to be added. The features must be of the same type.- Returns:
- The edited result.
-
batchAddFeatures
public void batchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Adds elements in batch, the performance is higher than the addFeatures interface when adding massive features. But the result doesn't show the detailed failure messages, such as the IDs of the features that are added failed.
- Specified by:
batchAddFeaturesin interfaceBatchEditCapability- Parameters:
datasourceName-datasetName-targetFeatures-- Since:
- 6.1.3
-
clearFeatures
public boolean clearFeatures(java.lang.String datasourceName, java.lang.String datasetName)Clears the features in a specified dataset.
- Specified by:
clearFeaturesin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.- Returns:
- true if the features are successfully cleared; false otherwise.
-
containsDataset
public boolean containsDataset(java.lang.String datasourceName, java.lang.String datasetName)Determines whether a specified datasource contains a specified dataset.
- Specified by:
containsDatasetin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.- Returns:
- true if the given datasource contains the specified dataset; false otherwise.
-
copyDataset
public boolean copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)Copies a replication of a specified dataset.
Copies a replication of a specified dataset from specified datasource to target datasource and saves it with a specified name.
- Specified by:
copyDatasetin interfaceDataProvider- Parameters:
srcDatasourceNameThe- name of the source datasource.srcDatasetNameThe- name of the source dataset.destDatasourceNameThe- target datasource name.destDatasetNameThe- target dataset name.- Returns:
- true if the dataset is successfully copied; false otherwise.
-
createDataset
public boolean createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)Creates a new dataset in a specified datasource according to the dataset information.
- Specified by:
createDatasetin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetInfoThe- dataset information.- Returns:
- true if the dataset is successfully created; false otherwise.
-
deleteDataset
public boolean deleteDataset(java.lang.String datasourceName, java.lang.String datasetName)Removes the specified dataset in the specified datasource.
- Specified by:
deleteDatasetin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.- Returns:
- true if the dataset is successfully deleted; false otherwise.
-
deleteFeatures
public EditResult deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)
Deletes features in a specified dataset according to the specified IDs.
- Specified by:
deleteFeaturesin interfaceDataProvider- Parameters:
datasourceNameThe- target datasource name.datasetNameThe- target dataset name.idsThe- IDs of the features to be deleted.- Returns:
- The edited result.
-
deleteFeatures
public EditResult deleteFeatures(java.lang.String datasourceName, QueryParameter parameters)
Deletes features by SQL.
- Specified by:
deleteFeaturesin interfaceDataProvider- Parameters:
datasourceName-parameters-- Returns:
- Since:
- 8.0.1
-
getDatasetInfo
public DatasetInfo getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName)
Gets the information of a specified dataset in a given datasource.
- Specified by:
getDatasetInfoin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.- Returns:
- The dataset information.
-
getDatasetInfos
public java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName)
Gets information about all the datasets in a specified datasource.
- Specified by:
getDatasetInfosin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.- Returns:
- The list of dataset information.
-
getDatasourceInfo
public DatasourceInfo getDatasourceInfo(java.lang.String datasourceName)
Gets information about a specified datasource.
- Specified by:
getDatasourceInfoin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.- Returns:
- Datasource info.
-
getDatasourceInfos
public java.util.List<DatasourceInfo> getDatasourceInfos()
Gets information about all the datasources corresponding to the current data service provider.
- Specified by:
getDatasourceInfosin interfaceDataProvider- Returns:
- The list of datasource information.
-
getDomainInfos
public java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets the domain info of the specified dataset.
- Specified by:
getDomainInfosin interfaceDataProvider- Parameters:
datasourceNameThe- datasource name.datasetNameThe- dataset name.- Returns:
- The list of domain infos.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields)
Gets features with specified IDs in a specified dataset.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.idsThe- feature IDs.fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields, int fromIndex, int toIndex)
Description copied from interface:DataProviderGets the feature in the specified data set according to the specified feature ID in the way of supporting paging.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.ids- Feature ID.fields- An array of fields to be returned. When the parameter is null, all fields are returned.fromIndex- The minimum index number for the result of the pagingtoIndex- The maximum index number for the result of the paging- Returns:
- Feature lists.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double distance, java.lang.String attributeFilter, java.lang.String[] fields)
Gets the features that fall within a buffer of a specified geometric object and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.geometryThe- geometric object.distanceThe- buffer distance and the unit is the coordUnit of current dataset.attributeFilterThe- attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields)
Gets the features that fall within a specified space and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.boundsThe- specified query bounds.attributeFilterThe- attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields, PrjCoordSys targetPrj)
Gets the features that fall within a specified space and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceGetFeatureSupportDynamicProj- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.boundsThe- specified query bounds.attributeFilterThe- attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.targetPrjThe- coordinate system of target geometries.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields)
Gets features by performing spatial query.
That is., obtaining the features that have the specific spatial query mode with the specified geometry object and satisfy the specified attribute filter condition.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.geometryThe- geometric object.spatialQueryModeThe- spatial query mode.attributeFilterThe- attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields, PrjCoordSys targetPrj)
Gets features by performing spatial query.
That is., obtaining the features that have the specific spatial query mode with the specified geometry object and satisfy the specified attribute filter condition.
- Specified by:
getFeaturein interfaceGetFeatureSupportDynamicProj- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.geometryThe- geometric object.spatialQueryModeThe- spatial query mode.attributeFilterThe- attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fieldsThe- array of fields to be returned. All the fields are returned if this parameter is null.targetPrjThe- coordinate system of the geometries to be returned.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures)
Gets features by a SQL query condition.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.queryParamQuery- parameter.maxFeaturesThe- maximum features to be returned.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures, PrjCoordSys targetPrj)
Gets features by a SQL query condition.
- Specified by:
getFeaturein interfaceGetFeatureSupportDynamicProj- Parameters:
datasourceNameThe- list of datasource names.queryParamQuery- parameter.maxFeaturesThe- maximum features to be returned.- Returns:
- The list of features.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam)
Gets features by a SQL query condition.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.queryParamQuery- parameter.- Returns:
- The list of features.
-
getFeature
public GetFeatureResult getFeature(GetFeatureParameters parameters)
Description copied from interface:DataProviderQuery and return the feature results.
- Specified by:
getFeaturein interfaceDataProvider- Parameters:
parameters- Is the encapsulation of other getFeature parameters.- Returns:
-
getGridValue
public GridValue getGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d)
Gets grid value according to the coordinate position.
- Specified by:
getGridValuein interfaceGridValueCapabilities- Parameters:
datasourceName-datasetName-point2d-- Returns:
- Since:
- 8.0.2
-
getImageValue
public ImageValue getImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d)
Gets pixel value according to the coordinate position.
- Specified by:
getImageValuein interfaceGridValueCapabilities- Parameters:
datasourceName-datasetName-point2d-index-- Returns:
- Since:
- 8.0.2
-
getGridValues
public GridValues getGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)
Gets the grid value matrix within a specified rectangle.
- Specified by:
getGridValuesin interfaceGridValueCapabilities- Parameters:
datasourceName-datasetName-point2d-- Returns:
- Since:
- 8.0.2
-
getImageValues
public ImageValues getImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)
Gets the grid value matrix within a specified rectangle.
- Specified by:
getImageValuesin interfaceGridValueCapabilities- Parameters:
datasourceName-datasetName-point2d-index-- Returns:
- Since:
- 8.0.2
-
getFieldInfos
public java.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName)
Get all the field info of the specified dataset.
- Specified by:
getFieldInfosin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.- Returns:
- Field info list.
-
renameDataset
public boolean renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)Modifies the name of a specified dataset.
- Specified by:
renameDatasetin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.oldNameThe- name of the dataset to be modified.newNameNew- name.- Returns:
- true if the dataset is successfully modified; false otherwise.
-
statistic
public double statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode)Calculates statistics on a specified field of a dataset based on a specified statistical mode.
- Specified by:
statisticin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.fieldIndexThe- field index.statisticModeThe- statistical mode.- Returns:
- The statistic result.
-
statistic
public double statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode)Calculates statistics on a specified field of a dataset based on a specified statistical mode.
- Specified by:
statisticin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.fieldNameThe- name of the specified field.statisticModeThe- statistical mode.- Returns:
- The statistic result.
-
updateDatasetInfo
public void updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)Updates information about a specified dataset in a given datasource.
- Specified by:
updateDatasetInfoin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- name of the dataset to be updated.newDatasetInfoThe- dataset information.
-
updateDatasourceInfo
public void updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)Updates the original datasource info with new datasource info.
- Specified by:
updateDatasourceInfoin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.newDatasourceInfoThe- new datasource info.
-
updateFeatures
public EditResult updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Updates features in a specified dataset.
targetFeatures is used to set the expected features after update, of which the IDs should be identical with the IDs of the features to be updated. The update process is finding out the feature to be updated with the ID from the targetFeatures first, then updating the source feature with the targetFeature.
- Specified by:
updateFeaturesin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.targetFeaturesThe- list of new features whose IDs are the same with those of the features to be updated.- Returns:
- The edited result.
-
updateFieldInfos
public void updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFieldInfos)Updates the field information in a specified dataset.
A field can be added, deleted, or modified by using this method.All the fields (except the SuperMap system fields) in a dataset are replaced with new fields.
If SuperMap data are used, the alias of the SuperMap system fields cannot be updated.
- Specified by:
updateFieldInfosin interfaceDataProvider- Parameters:
datasourceNameThe- list of datasource names.datasetNameThe- dataset name.newFieldInfosThe- new field information. If SuperMap data are used, the SuperMap system fields cannot be included in this information list.
-
dispose
public void dispose()
Releases the resources used by a SuperMap data service provider, i.e., releases the workspace.
- Specified by:
disposein interfaceDisposable
-
setProviderContext
public void setProviderContext(ProviderContext context)
Sets the service provider context.
- Specified by:
setProviderContextin interfaceProviderContextAware- Parameters:
contextThe- service provider context.
-
init
protected void init(UGCDataProviderSetting providerSetting)
-
checkExcludedFieldsInDatasources
protected void checkExcludedFieldsInDatasources(ExcludedFieldsInDatasource[] excludedFieldsInDatasources)
Checks for duplicate excluded fields, ie., the excluded fields of the same dataset in the same datasource are set multiple times.
- Parameters:
excludedFieldsInDatasources-- Since:
- 8.1.0
-
getFeature
protected java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, GeometryType networkType)
Gets all the field info of the specified dataset.
- Parameters:
datasourceNameThe- list of datasource names.queryParamQuery- parameter.networkTypeThe- feature type in the network dataset .- Returns:
- Feature info list.
-
pauseForRefreshWorkspace
public void pauseForRefreshWorkspace()
Prevents the request to refresh the workspace.
-
refreshWorkspaceFinished
public void refreshWorkspaceFinished()
Continues the request after finishing refreshing the workspace.
-
refreshWorkspace
public void refreshWorkspace()
Refreshes the workspace.
-
getAttachmentInfos
public java.util.List<AttachmentInfo> getAttachmentInfos(java.lang.String datasourceName, java.lang.String datasetName, int featureId)
Description copied from interface:AttachmentCapabilitiesGets the attachment info list related to feature.
- Specified by:
getAttachmentInfosin interfaceAttachmentCapabilitiesfeatureId- Feature ID.- Returns:
-
getAttachement
public Attachment getAttachement(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)
Description copied from interface:AttachmentCapabilitiesGets the attachment data according to the attachment ID.
- Specified by:
getAttachementin interfaceAttachmentCapabilitiesid- Attachment ID- Returns:
-
addAttachment
public AttachmentInfo addAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, Attachment attachment)
Description copied from interface:AttachmentCapabilitiesRelated to the attachment for feature.
- Specified by:
addAttachmentin interfaceAttachmentCapabilitiesfeatureId- Feature ID.attachment- Attachment content.- Returns:
-
supportAttachments
public boolean supportAttachments(java.lang.String datasourceName, java.lang.String datasetName)Description copied from interface:AttachmentCapabilitiesWhether the dataset attachment is enable.
- Specified by:
supportAttachmentsin interfaceAttachmentCapabilities- Returns:
-
deleteAttachment
public boolean deleteAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)Description copied from interface:AttachmentCapabilitiesDelete the attachment related to feature.
- Specified by:
deleteAttachmentin interfaceAttachmentCapabilities- Returns:
-
supportFeatureMetadatas
public boolean supportFeatureMetadatas(java.lang.String datasourceName, java.lang.String datasetName)Description copied from interface:FeatureMetadataCapabilitiesWhether this dataset feature supports the metadata info.
- Specified by:
supportFeatureMetadatasin interfaceFeatureMetadataCapabilities- Returns:
-
getFeatureMetadata
public FeatureMetadata getFeatureMetadata(java.lang.String datasourceName, java.lang.String datasetName, int featureId)
Description copied from interface:FeatureMetadataCapabilitiesGets the feature meta info.
- Specified by:
getFeatureMetadatain interfaceFeatureMetadataCapabilities- Returns:
-
getUGOGeometryForEdit
@Deprecated public static com.supermap.data.Geometry getUGOGeometryForEdit(com.supermap.data.Geometry oldGeometry, Geometry newGeometry)Deprecated. CallCommontypesConversion#getUGOGeometrymethod to finish converting directly, don't need to use this method. To avoid errors, using this method temporarily.Gets the UGO geometry needed to be updated.
- Parameters:
oldGeometryThe- original UGO geometry.newGeometryThe- geometry to be updated.- Returns:
-
getProviderName
public java.lang.String getProviderName()
-
setProviderName
public void setProviderName(java.lang.String providerName)
-
getInnerUGCDataProviderFactory
public com.supermap.services.providers.UGCDataProvider.InnerUGCDataProviderFactory getInnerUGCDataProviderFactory()
-
setInnerUGCDataProviderFactory
public void setInnerUGCDataProviderFactory(com.supermap.services.providers.UGCDataProvider.InnerUGCDataProviderFactory innerUGCDataProviderFactory)
-
getDatasetNames
public java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName)
Description copied from interface:DataProviderGets all dataset names for the current data source.
- Specified by:
getDatasetNamesin interfaceDataProvider- Parameters:
datasourceName- the data source name.- Returns:
- A list of dataset names.
-
coordtransfer
public java.util.List<Geometry> coordtransfer(Geometry[] geometry, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys)
Description copied from interface:CoordTransferCapabilitiesAccording to the target coordinate system, converting the collection object coordinate system
- Specified by:
coordtransferin interfaceCoordTransferCapabilities- Returns:
-
-