SuperMap iServer supports the following types of data service providers:

Configure UGC Data Provider.

Configure a UGC data provider as follows:

<provider name="ugcDataProvider1" class="com.supermap.services.providers.UGCDataProvider">
      <config class="com.supermap.services.providers.UGCDataProviderSetting">
          <workspacePath>../../samples/data/World/World.sxwu</workspacePath>
          <disableFieldNameToUpperCase>false</disableFieldNameToUpperCase>
          <defaultFieldForOrderBy>POP</defaultFieldForOrderBy>
          <excludedFieldsInDatasources>
            <com.supermap.services.providers.ExcludedFieldsInDatasource>
              <dataSourceName>World</dataSourceName>
              <!-- Set exclusion fields -->
              <excludedFieldsInDatasets>
                 <com.supermap.services.providers.ExcludedFieldsInDataset>
                   <datasetName>Countries</datasetName>
                   <excludedFields>SMID,SmUserID</excludedFields>
                 </com.supermap.services.providers.ExcludedFieldsInDataset>
               </excludedFieldsInDatasets>
             <com.supermap.services.providers.ExcludedFieldsInDatasource>
           </excludedFieldsInDatasources>
           <!-- Delay in submitting configuration -->
           <dataProviderDelayCommitSetting>
              <enabled>false</enabled>
              <logEntireErrorMsg>true</logEntireErrorMsg>
              <dayOfWeek>1,2,3,4,5,6,7</dayOfWeek>
              <hour>3</hour>
              <minute>0</minute>
              <commitMode>SPECIFICTIME</commitMode>
              <countToCommit>1000</countToCommit>
              <updateInterval>300</updateInterval>
              <cachePath>/output</cachePath>
           </dataProviderDelayCommitSetting>
           <!-- Batch add element configuration -->
           <maxFeatureWriteThreadCount>1</maxFeatureWriteThreadCount>
           <writePermitTimeout>120</writePermitTimeout>
           <!-- Set the information of the published data source dataset -->
           <datasourceInfos>
              <com.supermap.services.providers.FilteredDatasourceInfo>
                 <datasourceName>China</datasourceName>
                 <includedDatasetNames>
                   <string>World_Continent_pg</string>
                   <string>Island_B_pg</string>
                   <string>World_Ocean_txt</string>
                 </includedDatasetNames>
              </com.supermap.services.providers.FilteredDatasourceInfo>
           </datasourceInfos>
           <isMultiInstance>false</isMultiInstance>  
           <isDatasetsCheck>true</isDatasetsCheck>
           <ignoreTotalCount>false</ignoreTotalCount>
           <videoStreamServiceInfo>  
              <serviceName>test</datasourceName>
              <protocolName>HLS</protocolName>
           </videoStreamServiceInfo>  
        </config>
</provider>

The class in < provider > identifies the implementation class of the UGC data provider, and the class identifies the configuration class corresponding to the UGC data provider, that is , UGCDataProviderSetting , and the content in < config > is the corresponding configuration item.

Among them, com.supermap.services.providers.ExcludedFieldsInDatasource、com.supermap.services.providers.ExcludedFieldsInDataset set implementation classes for field exclusion. <DataSourceName> is the name of the data source , <DatasetName> is the name of the dataset, <ExcludedFields> specify the fields to exclude.

a. When datasource name exists, you need to set:

b. When datasource name does not exist, you need to set:

Configure REST Data Service Providers

Configure a REST data service providers as follows:

<provider name="restMapProvider1" class="com.supermap.services.providers.RESTDataProvider">
        <config class="com.supermap.services.providers.RESTDataProviderSetting">
                <restServiceRootURL>http://localhost:8090/iserver/services/rest</restServiceRootURL>
                <token>GsXST0cE0CumxQUFXBX7Oopin4<token>
        </config>
</provider>

The class in < provider > identifies the implementation class of the REST data service provider, the class in <config > identifies the configuration class corresponding to the REST data service provider, that is, RestDataManagerSetting, the content in < config > is the corresponding configuration item:

Configure ArcGIS REST Data Service Provider

Configure an ArcGIS REST data service providers as follows:

<provider class="com.supermap.services.providers.ArcGISRestDataProvider" enabled="true" name="arcgisRestDataProvider-test"> 
      <config class="com.supermap.services.providers.ArcGISRestDataProviderSetting"> 
        <restServiceRootURL>http://localhost:6080/arcgis/rest/services/SampleWorldCities/FeatureServer</restServiceRootURL>  
        <token>51fda53ceb25478cb37fa059ab013160</token>  
      </config> 
    </provider>

The class in <provider> identifies the implementation class of ArcGIS REST data service provider, the class in <config> identifies the configuration class corresponding to the ArcGIS REST data service provider, namely ArcGISRestDataProviderSetting, the content in <config> is the corresponding configuration item:

Configure WFS Data Service Provider

Configure a WFS data service providers as follows:

<provider class="com.supermap.services.providers.WFSDataProvider"
        enabled="true" name="wfsDataProvider-test">
        <config class="com.supermap.services.providers.WFSDataProviderSetting">
                <serviceRootURL>http://localhost:8090/iserver/services/data-world/wfs100/utf-8</serviceRootURL>
        </config>
</provider>

The class in < provider > identifies the implementation class of the REST data service providers, and the class in < config > identifies the configuration class corresponding to the REST data service provider, that is , WFSDataProviderSetting , and the content in < config > is the corresponding configuration item:

Configuration GeoPackage Data Service Providers

Configure a GeoPackage data service providers as follows:

<provider class="com.supermap.services.providers.GeoPackageDataProvider"  enabled="true"  name="gpkgData-samplevectors">  
      <config class="com.supermap.services.providers.GeoPackageDataProviderSetting"> 
             <filePath>../../samples/sample_vectors.gpkg</filePath>  
      </config>  
</provider> 

The class in < provider > identifies the implementation class of GeoPackage data service providers, and the class in <config> identifies the configuration class corresponding to the GeoPackage data service provider, that is, GeoPackageDataProviderSetting, and the contents in < config > are the same as GeoPackageDataProviderSetting The configuration items in correspond to:

 

Configure Shapefile Data Sservice Provider

Configure a Shapefile data service providers as follows:

    <provider class="com.supermap.services.providers.ShapefileDataProvider" enabled="true" name="shapefileData-">
      <config class="com.supermap.services.providers.ShapefileDataProviderSetting">
        <shpDir>E:/supermap/data/shp</shpDir> 
        <charset>UTF-8</charset>
      </config>
    </provider> 

The class in < provider > identifies the implementation class of the Shapefile data service providers, and the class in <config> identifies the configuration class corresponding to the Shapefile data service provider, that is, ShapefileDataProviderSetting, and the contents in < config > are the same as ShapefileDataProviderSetting The configuration items in correspond to:

 

Configuring PostGIS Data Service Providers

PostGIS data service providers are configured in the < provider > node. The specific configuration is as follows:

    <provider class="com.supermap.services.providers.PostgisDataProvider" enabled="true" name="data-postGIS">
      <config class="com.supermap.services.providers.PostgisDataProviderSetting"> 
        <dbType>postgis</dbType>  
        <host>192.168.17.212</host>  
        <port>5432</port>  
        <database>postGIS</database> 
        <schema>public</schema> 
        <user>postgres</user>  
        <passwd>iserver</passwd> 
        <isDatasetsCheck>true</isDatasetsCheck> 
           <!-- Set the information of the published data source dataset -->
         <datasourceInfos>
            <com.supermap.services.providers.FilteredDatasourceInfo>
               <datasourceName>test</datasourceName>
               <includedDatasetNames>
                 <string>test_pg</string>
                 <string>test_B_pg</string>
                 <string>test_Ocean_txt</string>
                </includedDatasetNames>
            </com.supermap.services.providers.FilteredDatasourceInfo>
         </datasourceInfos> 
      </config>
    </provider> 

The class in < provider > identifies the implementation class of PostGIS data service providers, and The class in <config> identifies the configuration class corresponding to the PostGIS service provider. Class identifies the configuration class corresponding to the PostGIS service providers, that is, PostgisDataProviderSetting, and the content in < config > corresponds to PostgisDataProviderSetting Corresponding configuration item:

Configure Elasticsearch Service Provider

The Elasticsearch service providers is configured in the < provider > node. The specific configuration is as follows:

    <provider class="com.supermap.services.providers.ElasticsearchDataProvider" enabled="true" name="data-es">
      <config class="com.supermap.services.providers.ElasticsearchDataProviderSetting"> 
        <maxfeatures>1000</maxfeatures>  
        <connInfo>
            <serverAdresses>
               <string>https://127.0.0.1:9200</string>
            </serverAdresses>
            <clusterName>my-application</clusterName>
            <indexName>i-1VLKvgQhmAYdIwI7tfkg</indexName>
            <username>node</username>
            <password>123456</password>
        </connInfo>
      </config>
    </provider> 

The class in < provider > identifies the implementation class of the Elasticsearch service providers, and the class in <config> identifies the configuration class corresponding to the Elasticsearch service provider, that is, the ElasticsearchDataProviderSetting, and the content in < config > corresponds to configuration item corresponding to ElasticsearchDataProviderSetting: