Class DataImpl
- java.lang.Object
-
- com.supermap.services.components.impl.DataImpl
-
- All Implemented Interfaces:
- AttachmentAndMetadata, ComponentContextAware, Data, Disposable
public class DataImpl extends java.lang.Object implements Data, AttachmentAndMetadata, Disposable, ComponentContextAware
The implementation class of the data service component interface (
Data).Data service components are a group of GIS service components encapsulating all data-related GIS functions.
This class is the default imlementing class of the data service component interface (
Data).The service providers in a data service component must be data service providers (
Data).- See Also:
Component
-
-
Constructor Summary
Constructors Constructor and Description DataImpl()The default constructor.DataImpl(DataContext context)Constructs aDataImplobject according to the context of a data service component.
-
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.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 geographic object collection 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 a dataset from a specified datasource according to the 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)Deletes features from a specified dataset.voiddispose()Releases the resources used by this data service component.protected voidfinalize()Releases the resources used by this data service component.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 component.java.util.List<DomainInfo>getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName)The new dataset information.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.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, java.lang.String datasetName, Geometry geometry, double bufferDistance, 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, double bufferDistance, 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[] fields)Gets the features that satisfy certain spatial query mode on a specified geometric 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 features that satisfy certain spatial query mode on a specified geometric object and meet a certain attribute filter condition.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[] 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)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 the grid value of the specified coordinate in a grid dataset.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 the pixel value of the specified coordinate in a image dataset.ImageValuesgetImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry)Gets the grid value matrix within a specified rectangle.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 a specified dataset.voidsetComponentContext(ComponentContext context)Sets the service component context.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> newFiledInfos)Updates the field information in a specified dataset.
-
-
-
Constructor Detail
-
DataImpl
public DataImpl()
The default constructor.
-
DataImpl
public DataImpl(DataContext context) throws DataException
Constructs a
DataImplobject according to the context of a data service component.- Parameters:
context- The context information of a given data service component.- Throws:
DataException- A data service component exception thrown when the config parameter is null).
-
-
Method Detail
-
createDataset
public boolean createDataset(java.lang.String dataSourceName, DatasetInfo datasetInfo) throws DataExceptionCreates a new dataset in a specified datasource according to the dataset information.
- Specified by:
createDatasetin interfaceData- Parameters:
dataSourceName- The list of datasource names.datasetInfo- The dataset information.- Returns:
- true if the dataset is successfully created; false otherwise.
- Throws:
DataException- A data service component exception.
-
deleteDataset
public boolean deleteDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionRemoves a dataset from a specified datasource according to the dataset information.
- Specified by:
deleteDatasetin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.- Returns:
- true if the dataset is successfully deleted; false otherwise.
- Throws:
DataException- A data service component exception.
-
copyDataset
public boolean copyDataset(java.lang.String srcDatasourceName, java.lang.String srcDatasetName, java.lang.String destDatasourceName, java.lang.String destDatasetName) throws DataExceptionCopies 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 interfaceData- Parameters:
srcDatasourceName- The source datasource name.srcDatasetName- The source dataset name.destDatasourceName- The target datasource name.destDatasetName- The target dataset name.- Returns:
- true if the dataset is successfully copied; false otherwise.
- Throws:
DataException- A data service component exception.
-
renameDataset
public boolean renameDataset(java.lang.String datasourceName, java.lang.String oldName, java.lang.String newName) throws DataExceptionModifies the name of a specified dataset.
- Specified by:
renameDatasetin interfaceData- Parameters:
datasourceName- The list of datasource names.oldName- The name of the dataset to be modified.newName- New name.- Returns:
- true if the dataset is successfully modified; false otherwise.
- Throws:
DataException- A data service component exception.
-
containsDataset
public boolean containsDataset(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionDetermines whether a specified datasource contains a specified dataset.
- Specified by:
containsDatasetin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.- Returns:
- true if the given datasource contains the specified dataset; false otherwise.
- Throws:
DataException- A data service component exception.
-
addFeatures
public 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 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 interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.targetFeatures- The list of features to be added. The features must be of the same type.- Returns:
- The edited result.
- Throws:
DataException- A data service component exception.
-
batchAddFeatures
public void batchAddFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataExceptionAdds 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 interfaceData- Parameters:
datasourceName-datasetName-targetFeatures-- Throws:
DataException- Since:
- 6.1.3
-
deleteFeatures
public EditResult deleteFeatures(java.lang.String datasourceName, java.lang.String datasetName, int[] ids) throws DataException
Deletes features from a specified dataset.
- Specified by:
deleteFeaturesin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.ids- The IDs of the features to be deleted.- Returns:
- The edited result.
- Throws:
DataException- A data service component exception.
-
deleteFeatures
public EditResult deleteFeatures(java.lang.String datasourceName, QueryParameter queryParameter) throws DataException
Description copied from interface:DataSpecifies the data source to remove the feature via sql.
- Specified by:
deleteFeaturesin interfaceData- Parameters:
datasourceName- the name of the datasource.- Returns:
- edit the results.
- Throws:
DataException- Data service component exception information.
-
updateFeatures
public EditResult updateFeatures(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<Feature> targetFeatures) throws DataException
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 interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.targetFeatures- The list of new features whose IDs are the same with those of the features to be updated.- Returns:
- The edited result.
- Throws:
DataException- A data service component exception.
-
clearFeatures
public boolean clearFeatures(java.lang.String datasourceName, java.lang.String datasetName) throws DataExceptionClears the features in a specified dataset.
- Specified by:
clearFeaturesin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.- Returns:
- true if the features are successfully cleared; false otherwise.
- Throws:
DataException- A data service component exception.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, int[] ids, java.lang.String[] fields) throws DataException
Gets features with specified IDs in a specified dataset.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.ids- The feature IDs.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, java.lang.String datasetName, Rectangle2D bounds, java.lang.String[] fields) throws DataException
Gets the features that fall within a specified space and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.bounds- The specified query bounds.fields- The array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
- Throws:
DataException- Data service component exception information.
-
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) throws DataException
Gets the features that fall within a specified space and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.bounds- The specified query bounds.attributeFilter- The attribute query filter.fields- The array of fields to be returned. All the fields are returned if this parameter is null.- Returns:
- The list of features.
- Throws:
DataException
-
getFeature
public 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 features that fall within a buffer of a specified geometric object and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.geometry- The geometric object.bufferDistance- The buffer distance and the unit is the coordUnit of current dataset.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getFeature
public 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 features that fall within a buffer of a specified geometric object and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.geometry- The geometric object.bufferDistance- The buffer distance and the unit is the coordUnit of current dataset.attributeFilter- The attribute filter condition. For example, fieldValue < 100, name like '%Hotel%'fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getFeature
public 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 features that satisfy certain spatial query mode on a specified geometric object.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.geometry- The specified Geometric object.spatialQueryMode- The spatial query mode.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
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) throws DataException
Gets the features that satisfy certain spatial query mode on a specified geometric object and meet a certain attribute filter condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.geometry- The geometric object.spatialQueryMode- The spatial query mode.attributeFilter- Attribute filter condition.fields- An array of fields to be returned. When the parameter is null, all fields are returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getFeature
public GetFeatureResult getFeature(GetFeatureParameters parameters) throws DataException
Description copied from interface:DataQuery and return the feature results.
- Specified by:
getFeaturein interfaceData- Parameters:
parameters- Is the encapsulation of other getFeature parameters.- Returns:
- Throws:
DataException
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam) throws DataException
Gets features by a SQL query condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.queryParam- Query parameter.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getFeature
public java.util.List<Feature> getFeature(java.lang.String datasourceName, QueryParameter queryParam, int maxFeatures) throws DataException
Gets features by a SQL query condition.
- Specified by:
getFeaturein interfaceData- Parameters:
datasourceName- The list of datasource names.queryParam- Query parameter.maxFeatures- The maximum features to be returned.- Returns:
- The list of features.
- Throws:
DataException- A data service component exception.
-
getDatasourceInfos
public java.util.List<DatasourceInfo> getDatasourceInfos() throws DataException
Gets information about all the datasources corresponding to the current data service component.
- Specified by:
getDatasourceInfosin interfaceData- Returns:
- The list of datasource information.
- Throws:
DataException- A data service component exception.
-
getDatasourceInfo
public DatasourceInfo getDatasourceInfo(java.lang.String datasourceName) throws DataException
Gets information about a specified datasource.
- Specified by:
getDatasourceInfoin interfaceData- Parameters:
datasourceName- The list of datasource names.- Returns:
- Datasource info.
- Throws:
DataException- A data service component exception.
-
updateDatasourceInfo
public void updateDatasourceInfo(java.lang.String datasourceName, DatasourceInfo newDatasourceInfo) throws DataExceptionUpdates the original datasource info with new datasource info.
- Specified by:
updateDatasourceInfoin interfaceData- Parameters:
datasourceName- The list of datasource names.newDatasourceInfo- The new datasource info.- Throws:
DataException- A data service component exception.
-
getDatasetInfos
public java.util.List<DatasetInfo> getDatasetInfos(java.lang.String datasourceName) throws DataException
Gets information about all the datasets in a specified datasource.
- Specified by:
getDatasetInfosin interfaceData- Parameters:
datasourceName- The list of datasource names.- Returns:
- The list of dataset information.
- Throws:
DataException- A data service component exception.
-
getDatasetInfo
public DatasetInfo getDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Gets the information of a specified dataset in a given datasource.
- Specified by:
getDatasetInfoin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.- Returns:
- The dataset information.
- Throws:
DataException- A data service component exception.
-
updateDatasetInfo
public void updateDatasetInfo(java.lang.String datasourceName, java.lang.String datasetName, DatasetInfo newDatasetInfo) throws DataExceptionUpdates information about a specified dataset in a given datasource.
- Specified by:
updateDatasetInfoin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The name of the dataset to be updated.newDatasetInfo- The dataset information.- Throws:
DataException- A data service component exception.
-
getDomainInfos
public java.util.List<DomainInfo> getDomainInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
The new dataset information.
- Specified by:
getDomainInfosin interfaceData- Parameters:
datasourceName- The datasource name.datasetName- The dataset name.- Returns:
- Domain information collection.
- Throws:
DataException
-
getFieldInfos
public java.util.List<FieldInfo> getFieldInfos(java.lang.String datasourceName, java.lang.String datasetName) throws DataException
Get all the field info of the specified dataset.
- Specified by:
getFieldInfosin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.- Returns:
- Field info list.
- Throws:
DataException- A data service component exception.
-
getGridValue
public GridValue getGridValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d) throws DataException
Gets the grid value of the specified coordinate in a grid dataset.
- Specified by:
getGridValuein interfaceData- Parameters:
datasoruceName-datasetName-- Returns:
- Throws:
DataException- Since:
- 8.1.1
-
getGridValues
public GridValues getGridValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
Gets the grid value matrix within a specified rectangle.- Specified by:
getGridValuesin interfaceData- Parameters:
datasourceName-datasetName-bounds-- Returns:
- Throws:
DataException
-
getImageValue
public ImageValue getImageValue(java.lang.String datasourceName, java.lang.String datasetName, Point2D point2d) throws DataException
Gets the pixel value of the specified coordinate in a image dataset.
- Specified by:
getImageValuein interfaceData- Parameters:
datasoruceName-datasetName-- Returns:
- Throws:
DataException- Since:
- 8.1.1
-
getImageValues
public ImageValues getImageValues(java.lang.String datasourceName, java.lang.String datasetName, Geometry geometry) throws DataException
Gets the grid value matrix within a specified rectangle.- Specified by:
getImageValuesin interfaceData- Parameters:
datasourceName-datasetName-bounds-- Returns:
- Throws:
DataException
-
updateFieldInfos
public void updateFieldInfos(java.lang.String datasourceName, java.lang.String datasetName, java.util.List<FieldInfo> newFiledInfos) throws DataExceptionUpdates 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 interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.newFiledInfos- The new field information. If SuperMap data are used, the SuperMap system fields cannot be included in this information list.- Throws:
DataException- A data service component exception.
-
statistic
public double statistic(java.lang.String datasourceName, java.lang.String datasetName, int fieldIndex, StatisticMode statisticMode) throws DataExceptionCalculates statistics on a specified field of a dataset based on a specified statistical mode.
- Specified by:
statisticin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.fieldIndex- The field index.statisticMode- The statistical mode.- Returns:
- The statistic result.
- Throws:
DataException- A data service component exception.
-
statistic
public double statistic(java.lang.String datasourceName, java.lang.String datasetName, java.lang.String fieldName, StatisticMode statisticMode) throws DataExceptionCalculates statistics on a specified field of a dataset based on a specified statistical mode.
- Specified by:
statisticin interfaceData- Parameters:
datasourceName- The list of datasource names.datasetName- The dataset name.fieldName- The name of the specified field.statisticMode- The statistical mode.- Returns:
- The statistic result.
- Throws:
DataException- A data service component exception.
-
dispose
public void dispose()
Releases the resources used by this data service component.
- Specified by:
disposein interfaceDisposable
-
setComponentContext
public void setComponentContext(ComponentContext context)
Description copied from interface:ComponentContextAwareSets the service component context.
- Specified by:
setComponentContextin interfaceComponentContextAware- Parameters:
context- The service component context.
-
getAttachmentInfos
public java.util.List<AttachmentInfo> getAttachmentInfos(java.lang.String datasourceName, java.lang.String datasetName, int featureId)
Description copied from interface:AttachmentAndMetadataGets the attachment info list related to feature.
- Specified by:
getAttachmentInfosin interfaceAttachmentAndMetadatafeatureId- Feature ID.- Returns:
-
supportAttachments
public boolean supportAttachments(java.lang.String datasourceName, java.lang.String datasetName)Description copied from interface:AttachmentAndMetadataWhether the dataset attachment is enable.
- Specified by:
supportAttachmentsin interfaceAttachmentAndMetadata- Returns:
-
getAttachement
public Attachment getAttachement(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)
Description copied from interface:AttachmentAndMetadataGets the attachment data according to the attachment ID.
- Specified by:
getAttachementin interfaceAttachmentAndMetadataid- Attachment ID- Returns:
-
addAttachment
public AttachmentInfo addAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, Attachment attachment)
Description copied from interface:AttachmentAndMetadataRelated to the attachment for feature.
- Specified by:
addAttachmentin interfaceAttachmentAndMetadatafeatureId- Feature ID.attachment- Attachment content.- Returns:
-
deleteAttachment
public boolean deleteAttachment(java.lang.String datasourceName, java.lang.String datasetName, int featureId, int id)Description copied from interface:AttachmentAndMetadataDelete the attachment related to feature.
- Specified by:
deleteAttachmentin interfaceAttachmentAndMetadata- Returns:
-
supportFeatureMetadatas
public boolean supportFeatureMetadatas(java.lang.String datasourceName, java.lang.String datasetName)Description copied from interface:AttachmentAndMetadataWhether this dataset feature supports the metadata info.
- Specified by:
supportFeatureMetadatasin interfaceAttachmentAndMetadata- Returns:
-
getFeatureMetadata
public FeatureMetadata getFeatureMetadata(java.lang.String datasourceName, java.lang.String datasetName, int featureId)
Description copied from interface:AttachmentAndMetadataGets the feature meta info.
- Specified by:
getFeatureMetadatain interfaceAttachmentAndMetadata- Returns:
-
finalize
protected void finalize() throws java.lang.ThrowableReleases the resources used by this data service component.
- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
getDatasetNames
public java.util.List<java.lang.String> getDatasetNames(java.lang.String datasourceName) throws DataExceptionDescription copied from interface:DataGets all dataset names for the current data source.
- Specified by:
getDatasetNamesin interfaceData- Parameters:
datasourceName- the name of the datasource.- Returns:
- A list of dataset names.
- Throws:
DataException
-
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) throws DataException
Description copied from interface:DataGets the feature in the specified data set according to the specified feature ID in the way of supporting paging.
- Specified by:
getFeaturein interfaceData- 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.
-
coordtransfer
public java.util.List<Geometry> coordtransfer(Geometry[] geometry, PrjCoordSys sourcePrjCoorSys, PrjCoordSys targetPrjCoordSys) throws DataException
Description copied from interface:DataAccording to the target coordinate system, converting the geographic object collection coordinate system
- Specified by:
coordtransferin interfaceData- Returns:
- Throws:
DataException
-
isDisableQueryCache
public boolean isDisableQueryCache()
Description copied from interface:DataWhether to enable caching when performing data query- Specified by:
isDisableQueryCachein interfaceData- Returns:
-
-