com.supermap.services.components.spi

Interface DataProvider

    • Method Summary

      Methods 
      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.
    • Method Detail

      • createDataset

        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.

        Parameters:
        datasourceName - the name of the datasource.
        datasetInfo - Data set info.
        Returns:
        Returns true if the dataset is created successfully, false otherwise.
      • deleteDataset

        boolean deleteDataset(java.lang.String datasourceName,
                            java.lang.String datasetName)
        

        Deletes the specified dataset in the specified data source.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
      • containsDataset

        boolean containsDataset(java.lang.String datasourceName,
                              java.lang.String datasetName)
        

        Determines whether the specified data source contains the specified data set.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
        Returns:
        Returns true if contains the specified dataset, false otherwise.
      • renameDataset

        boolean renameDataset(java.lang.String datasourceName,
                            java.lang.String oldName,
                            java.lang.String newName)
        

        Modifies 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.
      • copyDataset

        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.

        Parameters:
        dataSourceName - Data source name.
        srcDatasetName - Source data set name.
        destDatasourceName - Target data source name.
        destDatasetName - Target data set name.
        Returns:
        Returns true if the dataset is copied successfully, false otherwise.
      • addFeatures

        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.

        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.
      • deleteFeatures

        EditResult deleteFeatures(java.lang.String datasourceName,
                                java.lang.String datasetName,
                                int[] ids)
        

        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.
      • deleteFeatures

        EditResult deleteFeatures(java.lang.String datasourceName,
                                QueryParameter parameters)
        

        Specifies the data source to remove the feature via sql.

        Parameters:
        datasourceName - the name of the datasource.
        parameters - Query parameter.
        Returns:
        Edits the results.
      • getFeature

        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.

        Parameters:
        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.
        Returns:
        feature list.
      • updateFeatures

        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.

        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.
      • clearFeatures

        boolean clearFeatures(java.lang.String datasourceName,
                            java.lang.String datasetName)
        

        Clears the elements of the specified dataset.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
        Returns:
        Returns true if the dataset is deleted successfully, false otherwise.
      • getFeature

        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.

        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.
      • getFeature

        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.

        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 paging
        toIndex - The maximum index number for the result of the paging
        Returns:
        Feature lists.
        Since:
        8.1.1
      • getFeature

        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.

        Parameters:
        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.
        Returns:
        feature list.
      • 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)
        

        Gets the elements that specify a geometric object that has a specific 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 - 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.
        Returns:
        feature list.
      • getFeature

        java.util.List<Feature> getFeature(java.lang.String datasourceName,
                                         QueryParameter queryParam)
        

        Gets the elements through SQL query criteria.

        Parameters:
        datasourceName - the name of the datasource.
        queryParam - Query parameters.
        Returns:
        feature list.
      • getFeature

        java.util.List<Feature> getFeature(java.lang.String datasourceName,
                                         QueryParameter queryParam,
                                         int maxFeatures)
        

        Gets the elements through SQL query criteria.

        Parameters:
        datasourceName - the name of the datasource.
        queryParam - Query parameters.
        maxFeatures - The maximum number of features that can be returned.
        Returns:
        Feature lists.
      • getFeature

        GetFeatureResult getFeature(GetFeatureParameters parameters)
        

        Query and return the feature results.

        Parameters:
        parameters - Is the encapsulation of other getFeature parameters.
        Returns:
      • getDatasourceInfos

        java.util.List<DatasourceInfo> getDatasourceInfos()
        

        Get all the data source information corresponding to the current data service provider.

        Returns:
        data source information list.
      • getDatasourceInfo

        DatasourceInfo getDatasourceInfo(java.lang.String datasourceName)
        

        Gets information about the specified data source.

        Parameters:
        datasourceName - the name of the datasource.
        Returns:
        data source information.
      • updateDatasourceInfo

        void updateDatasourceInfo(java.lang.String datasourceName,
                                DatasourceInfo newDatasourceInfo)
        

        Updates the original data source information with the new data source information.

        Parameters:
        datasourceName - the name of the datasource.
        newDatasourceInfo - new data source information.
      • getDatasetInfos

        java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName)
        

        Gets all dataset information for the specified data source.

        Parameters:
        datasourceName - the name of the datasource.
        Returns:
        the list of dataset information.
      • getDatasetNames

        java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName)
        

        Gets all dataset names for the current data source.

        Parameters:
        datasourceName - the data source name.
        Returns:
        A list of dataset names.
      • getDatasetInfo

        DatasetInfo getDatasetInfo(java.lang.String datasourceName,
                                 java.lang.String datasetName)
        

        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.
      • updateDatasetInfo

        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.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - The name of the dataset to be updated.
        newDatasetInfo - New data source information.
      • getDomainInfos

        java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName,
                                                java.lang.String datasetName)
        

        Gets all the domain information for the specified dataset

        Parameters:
        datasourceName - the name of the datasource
        datasetName - the dataset name
        Returns:
        Domain information list
      • getFieldInfos

        java.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName,
                                              java.lang.String datasetName)
        

        Gets all the field information for the specified dataset.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
        Returns:
        Field information list.
      • updateFieldInfos

        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.

        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.
      • statistic

        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.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
        fieldIndex - Field number.
        statisticMode - Statistical methods.
        Returns:
        statistics result.
      • statistic

        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.

        Parameters:
        datasourceName - the name of the datasource.
        datasetName - the dataset name.
        fieldName - Field name.
        statisticMode - Statistical methods.
        Returns:
        statistics result.