public interface DataProvider
Data service providers.
The data service component is a class of GIS service components that encapsulate data-related GIS functions.
Modifier and Type | Method and Description |
---|---|
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 the specified dataset.
|
boolean |
clearFeatures(java.lang.String datasourceName, java.lang.String datasetName)
Clears the elements of the specified dataset.
|
boolean |
containsDataset(java.lang.String datasourceName, java.lang.String datasetName)
Determines whether the specified data source contains the specified data set.
|
boolean |
copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)
Copy the data set.
|
boolean |
createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)
In the specified data source, it creates a new data set based on the data set information.
|
boolean |
deleteDataset(java.lang.String datasourceName, java.lang.String datasetName)
Deletes the specified dataset in the specified data source.
|
EditResult |
deleteFeatures(java.lang.String datasourceName, QueryParameter parameters)
Specifies the data source to remove the feature via sql.
|
EditResult |
deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)
Removes a set of features in the specified dataset.
|
DatasetInfo |
getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName)
Gets the specified data set information for the specified data source.
|
java.util.List<DatasetInfo> |
getDatasetInfos(java.lang.String datasourceName)
Gets all dataset information for the specified data source.
|
java.util.List<java.lang.String> |
getDatasetNames(java.lang.String datasourceName)
Gets all dataset names for the current data source.
|
DatasourceInfo |
getDatasourceInfo(java.lang.String datasourceName)
Gets information about the specified data source.
|
java.util.List<DatasourceInfo> |
getDatasourceInfos()
Get all the data source information corresponding to the current data service provider.
|
java.util.List<DomainInfo> |
getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the domain information for the specified dataset
|
GetFeatureResult |
getFeature(GetFeatureParameters parameters)
Query and return the feature results.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, QueryParameter queryParam)
Gets the elements through SQL query criteria.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures)
Gets the elements through SQL query criteria.
|
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 elements that fall within the buffer of the specified space object and satisfy certain attribute filters.
|
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 the elements that specify a geometric object that has a specific spatial query mode and satisfies the specified attribute filter.
|
java.util.List<Feature> |
getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields)
Gets the feature in the specified dataset based on the specified feature ID.
|
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)
Get the elements within the specified space and meet certain attribute filters.
|
java.util.List<FieldInfo> |
getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the field information for the specified dataset.
|
boolean |
renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)
Modifies the name of the specified dataset.
|
double |
statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
|
double |
statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
|
void |
updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)
In the specified data source, update the information for the specified data set.
|
void |
updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)
Updates the original data source information with the new data source information.
|
EditResult |
updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Updates a set of features in the specified dataset.
|
void |
updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFieldInfos)
Updates the field information for the specified dataset.
|
boolean createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)
In the specified data source, it creates a new data set based on the data set information.
datasourceName
- the name of the datasource.datasetInfo
- Data set info.boolean deleteDataset(java.lang.String datasourceName, java.lang.String datasetName)
Deletes the specified dataset in the specified data source.
datasourceName
- the name of the datasource.datasetName
- the dataset name.boolean containsDataset(java.lang.String datasourceName, java.lang.String datasetName)
Determines whether the specified data source contains the specified data set.
datasourceName
- the name of the datasource.datasetName
- the dataset name.boolean renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)
Modifies the name of the specified dataset.
datasourceName
- the name of the datasource.oldName
- Old data set name.newName
- New data set name.boolean copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)
Copy the data set.
From the specified source data source, the specified source data set is copied to the target dataset in the specified target data source.
dataSourceName
- Data source name.srcDatasetName
- Source data set name.destDatasourceName
- Target data source name.destDatasetName
- Target data set name.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 the specified dataset.
Each dataset of SuperMap has a type (DatasetType
), which can be a point dataset, a line dataset, a surface dataset, etc., and the elements in each dataset have corresponding types, such as those stored in a point dataset must be a point element. Therefore, when adding features to a dataset, the added elements must be of the same type.
datasourceName
- the name of the datasource.datasetName
- the dataset name.targetFeatures
- To add a list of features, the elements in the list must be of the same type.EditResult deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)
Removes a set of features in the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.ids
- The ID array of the feature to be deleted.EditResult deleteFeatures(java.lang.String datasourceName, QueryParameter parameters)
Specifies the data source to remove the feature via sql.
datasourceName
- the name of the datasource.parameters
- Query parameter.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields)
Get the elements within the specified space and meet certain attribute filters.
datasourceName
- the name of the datasource.datasetName
- the dataset name.bounds
- The specified query range.attributeFilter
- Attribute query filter. Such as fieldValue <100, name like '% hotel%'fields
- An array of fields to be returned. When the parameter is null, all fields are returned.EditResult updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)
Updates a set of features in the specified dataset.
The parameter targetFeatures is a new feature list whose feature ID is the same as the feature ID to be updated in the dataset, finds the element to be updated based on the ID, and then updates the original feature to the new feature.
datasourceName
- the name of the datasource.datasetName
- the dataset name.targetFeatures
- new feature list. Its ID is the same as the feature ID to be updated.boolean clearFeatures(java.lang.String datasourceName, java.lang.String datasetName)
Clears the elements of the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields)
Gets the feature in the specified dataset based on the specified feature ID.
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.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.
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 pagingjava.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 elements that fall within the buffer of the specified space object and satisfy certain attribute filters.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.distance
- The radius of the buffer.attributeFilter
- Filter condition of attribute quering Such as fieldValue <100, name like '% hotel%'fields
- An array of fields to be returned. When the parameter is null, all fields are returned.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 the elements that specify a geometric object that has a specific spatial query mode and satisfies the specified attribute filter.
datasourceName
- the name of the datasource.datasetName
- the dataset name.geometry
- Geometric object.spatialQueryMode
- spatial query mode.attributeFilter
- Filter condition of attribute quering Such as fieldValue <100, name like '% hotel%'fields
- An array of fields to be returned. When the parameter is null, all fields are returned.java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam)
Gets the elements through SQL query criteria.
datasourceName
- the name of the datasource.queryParam
- Query parameters.java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures)
Gets the elements through SQL query criteria.
datasourceName
- the name of the datasource.queryParam
- Query parameters.maxFeatures
- The maximum number of features that can be returned.GetFeatureResult getFeature(GetFeatureParameters parameters)
Query and return the feature results.
parameters
- Is the encapsulation of other getFeature parameters.java.util.List<DatasourceInfo> getDatasourceInfos()
Get all the data source information corresponding to the current data service provider.
DatasourceInfo getDatasourceInfo(java.lang.String datasourceName)
Gets information about the specified data source.
datasourceName
- the name of the datasource.void updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)
Updates the original data source information with the new data source information.
datasourceName
- the name of the datasource.newDatasourceInfo
- new data source information.java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName)
Gets all dataset information for the specified data source.
datasourceName
- the name of the datasource.java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName)
Gets all dataset names for the current data source.
datasourceName
- the data source name.DatasetInfo getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName)
Gets the specified data set information for the specified data source.
datasourceName
- the name of the datasource.datasetName
- the dataset name.void updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)
In the specified data source, update the information for the specified data set.
datasourceName
- the name of the datasource.datasetName
- The name of the dataset to be updated.newDatasetInfo
- New data source information.java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the domain information for the specified dataset
datasourceName
- the name of the datasourcedatasetName
- the dataset namejava.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName)
Gets all the field information for the specified dataset.
datasourceName
- the name of the datasource.datasetName
- the dataset name.void updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFieldInfos)
Updates the field information for the specified dataset.
Use this method to achieve add, delete, modify operation to the field, that is, the entire data set field (except SuperMap system field) is replaced with the new field.
If you are using SuperMap data, updating the alias of SuperMap system field is not currently supported.
datasourceName
- the name of the datasource.datasetName
- the dataset name.newFieldInfos
- new field information. If you are using SuperMap data, the new field information list can not contain SuperMap's system fields.double statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
datasourceName
- the name of the datasource.datasetName
- the dataset name.fieldIndex
- Field number.statisticMode
- Statistical methods.double statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode)
In the specified data set, statistics and calculations the specified field according to the specified statistical method.
datasourceName
- the name of the datasource.datasetName
- the dataset name.fieldName
- Field name.statisticMode
- Statistical methods.