com.supermap.services.providers.wfs.convert

Class QueryParameterConverter

  • java.lang.Object
    • com.supermap.services.providers.wfs.convert.QueryParameterConverter


  • public class QueryParameterConverter
    extends java.lang.Object
    

    Parameter converter used to query element.

    For converting the feature query parameter (parameter of the GetFeature series interface) in the data service provider (DataProvider) into a WFS feature query parameter (i.e., WFSQueryParameter).

    • Constructor Summary

      Constructors 
      Constructor and Description
      QueryParameterConverter(java.util.Map<java.lang.String,FeatureType> typeMap, FeatureIDMapping idMapping, java.util.Map<java.lang.String,Property> fieldNameMap)
      According the feature class mapping, the FeatureID converter to build the QueryParameterConverter object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      WFSQueryParameter convert(DatasetInfo dataset, Geometry geometry, double bufferDistance, java.lang.String attributeFilter, java.lang.String[] fields, int maxFeatures)
      Converts the buffer query parameters of DataProvider.
      WFSQueryParameter convert(DatasetInfo dataset, Geometry geometry, SpatialQueryMode spatialQueryMode, java.lang.String attributeFilter, java.lang.String[] fields, int maxFeatures)
      Converts the spatial query parameters for DataProvider.
      WFSQueryParameter convert(DatasetInfo dataset, int[] ids, java.lang.String[] fields, int maxFeatures)
      Converts the ID query parameter of DataProvider.
      WFSQueryParameter convert(DatasetInfo dataset, Rectangle2D bounds, java.lang.String attributeFilter, java.lang.String[] fields, int maxFeatures) 
      java.lang.String encodeUnit2EPSGCode(Unit unit)
      Converts the distance unit (Unit) in SuperMap iServer to the distance unit represented by POSC format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryParameterConverter

        public QueryParameterConverter(java.util.Map<java.lang.String,FeatureType> typeMap,
                               FeatureIDMapping idMapping,
                               java.util.Map<java.lang.String,Property> fieldNameMap)
        

        According the feature class mapping, the FeatureID converter to build the QueryParameterConverter object.

        Parameters:
        typeMap - feature type mapping, where key is the feature type name and the value is the feature type object.
        idMapping - FeatureID converter.
    • Method Detail

      • convert

        public WFSQueryParameter convert(DatasetInfo dataset,
                                Geometry geometry,
                                double bufferDistance,
                                java.lang.String attributeFilter,
                                java.lang.String[] fields,
                                int maxFeatures)
                                  throws InvalidExpressionException
        

        Converts the buffer query parameters of DataProvider.

        The buffer query parameters of DataProvider include: data source name, dataset name, target geometry object, radius of buffer, condition of attribute query filter, and Attribute field to be obtained. Where the data source name and the dataset name determine a data set object.

        Parameters:
        dataset - Data set object, corresponding to the FeatureType object in the WFS service implementation.
        geometry - Target geometric object.
        bufferDistance - Buffer radius.
        attributeFilter - Filter condition of attribute quering
        fields - The property field to get.
        Returns:
        WFS Feature query parameters.
        Throws:
        InvalidExpressionException - When the parameter expression is illegal, the exception is thrown.
      • convert

        public WFSQueryParameter convert(DatasetInfo dataset,
                                Geometry geometry,
                                SpatialQueryMode spatialQueryMode,
                                java.lang.String attributeFilter,
                                java.lang.String[] fields,
                                int maxFeatures)
                                  throws InvalidExpressionException
        

        Converts the spatial query parameters for DataProvider.

        The spatial query parameters of include: data source name, dataset name, target geometry object, spatial query mode, attribute query filter condition, attribute field to be otained . Where the data source name and the dataset name determine a data set object.

        Parameters:
        dataset - Data set object, corresponding to the FeatureType object in the WFS service implementation.
        geometry - Target geometric object.
        spatialQueryMode - Spatial query mode.
        attributeFilter - Filter condition of attribute quering
        fields - The property field to get.
        maxFeatures -
        Returns:
        WFS Feature query parameters.
        Throws:
        InvalidExpressionException - When the parameter expression is illegal, the exception is thrown.
      • convert

        public WFSQueryParameter convert(DatasetInfo dataset,
                                int[] ids,
                                java.lang.String[] fields,
                                int maxFeatures)
        

        Converts the ID query parameter of DataProvider.

        The query query parameters of include: data source name, dataset name, feature ID, attribute field to get. Where the data source name and the dataset name determine a data set object.

        Parameters:
        dataset - Data set object, corresponding to the FeatureType object in the WFS service implementation.
        ids - feature ID
        fields - The property field to get.
        maxFeatures -
        Returns:
        WFS Feature query parameters.
      • convert

        public WFSQueryParameter convert(DatasetInfo dataset,
                                Rectangle2D bounds,
                                java.lang.String attributeFilter,
                                java.lang.String[] fields,
                                int maxFeatures)
        
      • encodeUnit2EPSGCode

        public java.lang.String encodeUnit2EPSGCode(Unit unit)
        

        Converts the distance unit (Unit) in SuperMap iServer to the distance unit represented by POSC format.

        Parameters:
        unit - The distance units in SuperMap iServer.
        Returns:
        POSC format indicates the distance unit.