Interface Data
-
- All Known Implementing Classes:
- DataImpl
public interface DataData service component interface.
The data service component is a class of GIS service components that encapsulate data-related GIS functions.
-
-
Method Summary
Methods Modifier and Type Method and Description EditResultaddFeatures(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.voidbatchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Adding features in bulk, adding a large number of elements outperforms the addFeatures interface, but in some cases, some feature additions fail to know the specific failed feature ID.booleanclearFeatures(java.lang.String datasourceName, java.lang.String datasetName)Empty the elements in the specified dataset.booleancontainsDataset(java.lang.String datasourceName, java.lang.String datasetName)Determines whether the specified data source contains the specified data set.java.util.List<Geometry>coordtransfer(Geometry[] geometrys, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys)According to the target coordinate system, converting the geographic object collection coordinate systembooleancopyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName)Copy the data set.booleancreateDataset(java.lang.String datasourceName, DatasetInfo datasetInfo)In the specified data source, creates a new data set based on the specified dataset information.booleandeleteDataset(java.lang.String datasourceName, java.lang.String datasetName)In the specified data source, deletes a data set based on the specified dataset information.EditResultdeleteFeatures(java.lang.String datasourceName, QueryParameter queryParameter)Specifies the data source to remove the feature via sql.EditResultdeleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids)Removes a set of features in the specified dataset.DatasetInfogetDatasetInfo(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.DatasourceInfogetDatasourceInfo(java.lang.String datasourceName)Gets information about a given data source.java.util.List<DatasourceInfo>getDatasourceInfos()Gets information for all data sources.java.util.List<DomainInfo>getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)Gets all the domain information for the specified datasetGetFeatureResultgetFeature(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 bufferDistance, java.lang.String[] fields)Gets the elements that fall within the buffer of the specified geometry object.java.util.List<Feature>getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, 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[] fields)Gets the elements that have a specific spatial query mode with the specified geometry object.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 satisfies a 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[] 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, 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.GridValuegetGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D)Gets the raster value for the specified coordinate position of the raster dataset.GridValuesgetGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)Gets the raster value matrix in the rectangle according to the specified rectangle range.ImageValuegetImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D)Gets the image information of the specified coordinate position of the image data set.ImageValuesgetImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)Gets the raster value matrix in the rectangle according to the specified rectangle range.booleanisDisableQueryCache()Whether to enable caching when performing data querybooleanrenameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName)Modifies the name of the specified dataset.doublestatistic(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.doublestatistic(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.voidupdateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo)In the specified data source, update the information for the specified data set.voidupdateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo)Updates the original data source information with the new data source information.EditResultupdateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures)Updates a set of features in the specified dataset.voidupdateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFiledInfos)Updates the field information for the specified dataset.
-
-
-
Method Detail
-
createDataset
boolean createDataset(java.lang.String datasourceName, DatasetInfo datasetInfo) throws DataExceptionIn the specified data source, creates a new data set based on the specified dataset information.
- Parameters:
datasourceName- the name of the datasource.datasetInfo- Data set info.- Returns:
- Returns true if the dataset is created successfully, false otherwise.
- Throws:
DataException- Data service component exception information.
-
deleteDataset
boolean deleteDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionIn the specified data source, deletes a data set based on the specified dataset information.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.- Throws:
DataException- Data service component exception information.
-
copyDataset
boolean copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName) throws DataExceptionCopy 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.
- Parameters:
srcDatasourceName- the name of the source data source.srcDatasetName- the name of the source dataset.dataSourceName- Target data source name.destDatasetName- the name of the destination dataset.- Returns:
- Returns true if the dataset is copied successfully, false otherwise.
- Throws:
DataException- Data service component exception information.
-
renameDataset
boolean renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName) throws DataExceptionModifies the name of the specified dataset.
- Parameters:
datasourceName- the name of the datasource.oldName- Old data set name.newName- New data set name.- Returns:
- Returns true if the dataset is modified successfully, false otherwise.
- Throws:
DataException- Data service component exception information.
-
containsDataset
boolean containsDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionDetermines whether the specified data source contains the specified data set.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.- Returns:
- True if the specified data source contains the specified dataset, false otherwise.
- Throws:
DataException- Data service component exception information.
-
addFeatures
EditResult addFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
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.- Parameters:
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.- Returns:
- edit the results.
- Throws:
DataException- Data service component exception information.
-
batchAddFeatures
void batchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataExceptionAdding features in bulk, adding a large number of elements outperforms the addFeatures interface, but in some cases, some feature additions fail to know the specific failed feature ID.
- Parameters:
datasourceName-datasetName-targetFeatures-- Throws:
DataException- Since:
- 6.1.3
-
deleteFeatures
EditResult deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids) throws DataException
Removes a set of features in the specified dataset.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.ids- The ID array of the feature to be deleted.- Returns:
- edit the results.
- Throws:
DataException- Data service component exception information.
-
deleteFeatures
EditResult deleteFeatures(java.lang.String datasourceName, QueryParameter queryParameter) throws DataException
Specifies the data source to remove the feature via sql.
- Parameters:
datasourceName- the name of the datasource.queryParam- Query parameters.- Returns:
- edit the results.
- Throws:
DataException- Data service component exception information.- Since:
- 8.0.1
-
updateFeatures
EditResult updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
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.
- Parameters:
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.- Returns:
- edit the results.
- Throws:
DataException- Data service component exception information.
-
clearFeatures
boolean clearFeatures(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionEmpty the elements in the specified dataset.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.- Returns:
- returns true if the feature clears, false otherwise.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields) throws DataException
Gets the feature in the specified dataset based on the specified feature ID.
- 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.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields, int fromIndex, int toIndex) throws DataException
Gets the feature in the specified data set according to the specified feature ID in the way of supporting paging.
- 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 list.
- Throws:
DataException- Data service component exception information.- Since:
- 8.1.1
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String[] fields) throws DataException
Gets the feature in the specified dataset based on the specified feature ID.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.bounds- The specified query range.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields) throws DataException
Get the elements within the specified space and meet certain attribute filters.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.bounds- The specified query range.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- feature list.
- Throws:
DataException
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String[] fields) throws DataException
Gets the elements that fall within the buffer of the specified geometry object.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.geometry- Geometric object.bufferDistance- The radius of the buffer, in units of the current data set Coordinate unit (coordUnit).fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, double bufferDistance, java.lang.String attributeFilter, java.lang.String[] fields) throws DataException
Gets the elements that fall within the buffer of the specified space object and satisfy certain attribute filters.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.geometry- Geometric object.bufferDistance- The radius of the buffer, in units of the current data set Coordinate unit (coordUnit).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.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String[] fields) throws DataException
Gets the elements that have a specific spatial query mode with the specified geometry object.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.geometry- Geometric object.spatialQueryMode- spatial query mode.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
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) throws DataException
Gets the elements that specify a geometric object that satisfies a spatial query mode and satisfies the specified attribute filter.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.geometry- Geometric object.spatialQueryMode- spatial query mode.attributeFilter- Attribute filter.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam) throws DataException
Gets the elements through SQL query criteria.
- Parameters:
datasourceName- the name of the datasource.queryParam- Query parameters.- Returns:
- feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures) throws DataException
Gets the elements through SQL query criteria.
- Parameters:
datasourceName- the name of the datasource.queryParam- Query parameters.maxFeatures- The maximum number of elements that can be returned.- Returns:
- Feature list.
- Throws:
DataException- Data service component exception information.
-
getFeature
GetFeatureResult getFeature(GetFeatureParameters parameters) throws DataException
Query and return the feature results.
- Parameters:
parameters- Is the encapsulation of other getFeature parameters.- Returns:
- Throws:
DataException
-
getDatasourceInfos
java.util.List<DatasourceInfo> getDatasourceInfos() throws DataException
Gets information for all data sources.
- Returns:
- data source information list.
- Throws:
DataException- Data service component exception information.
-
getDatasourceInfo
DatasourceInfo getDatasourceInfo(java.lang.String datasourceName) throws DataException
Gets information about a given data source.
- Parameters:
datasourceName- the name of the datasource.- Returns:
- data source information.
- Throws:
DataException- Data service component exception information.
-
updateDatasourceInfo
void updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo) throws DataExceptionUpdates the original data source information with the new data source information.
- Parameters:
datasourceName- the name of the datasource.newDatasourceInfo- new data source information.- Throws:
DataException- Data service component exception information.
-
getDatasetInfos
java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName) throws DataException
Gets all dataset information for the specified data source.
- Parameters:
datasourceName- the name of the datasource.- Returns:
- Data set information list.
- Throws:
DataException- Data service component exception information.
-
getDatasetNames
java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName) throws DataExceptionGets all dataset names for the current data source.
- Parameters:
datasourceName- the name of the datasource.- Returns:
- A list of dataset names.
- Throws:
DataException
-
getDatasetInfo
DatasetInfo getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets the specified data set information for the specified data source.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.- Returns:
- Data set information.
- Throws:
DataException- Data service component exception information.
-
updateDatasetInfo
void updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo) throws DataExceptionIn the specified data source, update the information for the specified data set.
- Parameters:
datasourceName- the name of the datasource.datasetName- The name of the dataset to be updated.newDatasetInfo- New data source information.- Throws:
DataException- Data service component exception information.
-
getDomainInfos
java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets all the domain information for the specified dataset
- Parameters:
datasourceName- the name of the datasourcedatasetName- the dataset name- Returns:
- Domain information list
- Throws:
DataException
-
getFieldInfos
java.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets all the field information for the specified dataset.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.- Returns:
- Field info list
- Throws:
DataException- Data service component exception information.
-
updateFieldInfos
void updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFiledInfos) throws DataExceptionUpdates 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.
- Parameters:
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.- Throws:
DataException- Data service component exception information.
-
statistic
double statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode) throws DataExceptionIn the specified data set, statistics and calculations the specified field according to the specified statistical method.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.fieldIndex- Field number.statisticMode- Statistical methods.- Returns:
- statistics result.
- Throws:
DataException- Data service component exception information.
-
statistic
double statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode) throws DataExceptionIn the specified data set, statistics and calculations the specified field according to the specified statistical method.
- Parameters:
datasourceName- the name of the datasource.datasetName- the dataset name.fieldName- Field name.statisticMode- Statistical methods.- Returns:
- statistics result.
- Throws:
DataException- Data service component exception information.
-
getGridValue
GridValue getGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D) throws DataException
Gets the raster value for the specified coordinate position of the raster dataset.
- Parameters:
datasoruceName-datasetName-point2D-- Returns:
- Throws:
DataException- Since:
- 8.1.1
-
getGridValues
GridValues getGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
Gets the raster value matrix in the rectangle according to the specified rectangle range.- Parameters:
datasourceName-datasetName-geometry-- Returns:
- Throws:
DataException
-
getImageValue
ImageValue getImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2D) throws DataException
Gets the image information of the specified coordinate position of the image data set.
- Parameters:
datasoruceName-datasetName-point2D-index- the specified band- Returns:
- Throws:
DataException- Since:
- 8.1.1
-
getImageValues
ImageValues getImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
Gets the raster value matrix in the rectangle according to the specified rectangle range.- Parameters:
datasourceName-datasetName-geometry-- Returns:
- Throws:
DataException
-
coordtransfer
java.util.List<Geometry> coordtransfer(Geometry[] geometrys, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys) throws DataException
According to the target coordinate system, converting the geographic object collection coordinate system
- Parameters:
geometrys-sourcePrjCoorSys-targetPrjCoordSys-- Returns:
- Throws:
DataException- Since:
- 8.1.1
-
isDisableQueryCache
boolean isDisableQueryCache()
Whether to enable caching when performing data query- Returns:
-
-