Class UGCMapProviderSetting
- java.lang.Object
-
- com.supermap.services.components.spi.MapProviderSetting
-
- com.supermap.services.providers.UGCMapProviderSetting
-
- All Implemented Interfaces:
- ConfigValidatable, MultiInstanceSupported, java.io.Serializable
public class UGCMapProviderSetting extends MapProviderSetting implements java.io.Serializable, ConfigValidatable, MultiInstanceSupported
SuperMap map service provider settings class.
It is used to set the information of the SuperMap map sesrvice providers.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.supermap.services.components.spi.MapProviderSetting
dataPrjCoordSysType, watermark
-
-
Constructor Summary
Constructors Constructor and Description UGCMapProviderSetting()The default constructor.UGCMapProviderSetting(UGCMapProviderSetting mapSetting)Constructs a UGCMapProviderSetting object based on the configuration information of a SuperMap map service provider.
-
Method Summary
Methods Modifier and Type Method and Description UGCMapProviderSettingclone()booleanequals(java.lang.Object obj)Determines whether two objects are equal.FilteredDatasourceInfo[]getDatasourceInfos()Sets the datasource information.ExcludedFieldsInMap[]getExcludedFieldsInMaps()StylegetHighlightLineStyle(java.lang.String mapName)Gets the highlight style of the line features of a specified map.StylegetHighlightPointStyle(java.lang.String mapName)Gets the highlight style of the point features of a specified map.StylegetHighlightRegionStyle(java.lang.String mapName)Gets the highlight style of the polygon features of a specified map.intgetLayerCountPerDataType()Returns the maximum number of layers dynamically created for each data type.Point2DgetLeftTopCorner()Gets the start point of map tile.ExcludedFieldsInMapgetMapFieldExcluded(java.lang.String mapName)java.util.List<java.lang.String>getMapNames()Gets the name list of the maps that need to be published.java.lang.StringgetMaps()Gets the names of the published maps.intgetPoolSize()Gets the size of the map object pool.java.lang.StringgetPreferedPNGType()Gets the preferred PNG type when using PNG cache.intgetQueryExpectCount()Gets the expected query records number.java.util.List<UGCMapSetting>getUgcMapSettings()Gets the SuperMap map settings.java.lang.StringgetWorkspacePath()Gets the SuperMap workspace path.inthashCode()Gets hash value of the instance.booleanisCacheDisabled()Returns whether to disable cache.booleanisExtractCacheToFile()Gets whether to generate new image files when extracting caches from the large file.booleanisIgnoreHashcodeWhenUseCache()Whether to ignore Hashcode when using cache.booleanisInflatDisabled()Returns whether to disable the query with expanded bounds.booleanisMapEditable()Returns if the map is editable.booleanisMultiInstance()Returns whether the current service provider is enabledbooleanisMultiThread()Gets the identifier of the multi-thread mode.booleanisUseCompactCache()Gets whether compact cache is in use (i.e., multiple cache images are centralized and saved in several files using the algorithm).voidsetCacheDisabled(boolean cacheDisabled)Sets whether to disable cache.voidsetDatasourceInfos(FilteredDatasourceInfo[] datasourceInfos)Returns the datasource information.voidsetExcludedFieldsInMaps(ExcludedFieldsInMap[] excludedFieldsInMaps)voidsetExtractCacheToFile(boolean extracCacheToFile)Sets whether to extract the cache as images file from big file (it will extract binary contents if set to false).voidsetHighlightLineStyle(java.lang.String mapName, Style lineStyle)Sets the highlight style of the line features of a specified map.voidsetHighlightPointStyle(java.lang.String mapName, Style pointStyle)Sets the highlight style of the point features of a specified map.voidsetHighlightRegionStyle(java.lang.String mapName, Style regionStyle)Sets the highlight style of the polygon features of a specified map.voidsetIgnoreHashcodeWhenUseCache(boolean ignoreHashcodeWhenUseCache)Sets whether to ignore Hashcode when using cache.voidsetInflatDisabled(boolean inflatDisabled)Sets whether to disable the query with expanded bounds.voidsetLayerCountPerDataType(int layerCountPerDataType)Sets the maximum number of layers dynamically created for each data type.voidsetLeftTopCorner(Point2D leftTopCorner)Sets the start point of map tile.voidsetMapEditable(boolean mapEditable)Sets if the map is editable.voidsetMaps(java.lang.String maps)Sets the maps that need to be published.voidsetMultiInstance(boolean isMultiInstance)Sets whether the current service provider is enabledvoidsetMultiThread(boolean multiThread)Enables the multi-thread mode.voidsetPoolSize(int poolSize)Sets the size of the map object pool.voidsetPreferedPNGType(java.lang.String preferedPNGType)Sets the preferred PNG type when using PNG cache.voidsetQueryExpectCount(int queryExpectCount)Sets the expected query records number.voidsetUgcMapSettings(java.util.List<UGCMapSetting> ugcMapSettings)Sets the SuperMap map settings.voidsetUseCompactCache(boolean useCompactCache)Sets whether to use compact cache (i.e., multiple cache images are centralized and saved in several files using the algorithm).voidsetWorkspacePath(java.lang.String workspacePath)Sets the SuperMap workspace path.voidvalidate()Verifies the configuration-
Methods inherited from class com.supermap.services.components.spi.MapProviderSetting
getCacheMode, getCacheVersion, getName, getOutputPath, getOutputSite, getWatermark, setCacheMode, setCacheVersion, setName, setOutputPath, setOutputSite, setWatermark
-
-
-
-
Constructor Detail
-
UGCMapProviderSetting
public UGCMapProviderSetting()
The default constructor.
-
UGCMapProviderSetting
public UGCMapProviderSetting(UGCMapProviderSetting mapSetting)
Constructs a UGCMapProviderSetting object based on the configuration information of a SuperMap map service provider.
- Parameters:
mapSetting- The configuration information of SuperMap map service provider.
-
-
Method Detail
-
getDatasourceInfos
public FilteredDatasourceInfo[] getDatasourceInfos()
Sets the datasource information. This attribute takes effect when workspacePath is null. It will dynamically create map object according to the specified datasource information and publish it.
- Returns:
- Since:
- 9.0.0
-
setDatasourceInfos
public void setDatasourceInfos(FilteredDatasourceInfo[] datasourceInfos)
Returns the datasource information. This attribute takes effect when workspacePath is null. It will dynamically create map object according to the specified datasource information and publish it.
- Parameters:
datasourceInfos-- Since:
- 9.0.0
-
getLayerCountPerDataType
public int getLayerCountPerDataType()
Returns the maximum number of layers dynamically created for each data type. If it is 2, then the dynamically created map contains 2 point layers, 2 line layers, 2 region layers and 2 raster layers.
- Returns:
- Since:
- 9.0.0
-
setLayerCountPerDataType
public void setLayerCountPerDataType(int layerCountPerDataType)
Sets the maximum number of layers dynamically created for each data type. If it is 2, then the dynamically created map contains 2 point layers, 2 line layers, 2 region layers and 2 raster layers.
- Since:
- 9.0.0
-
getLeftTopCorner
public Point2D getLeftTopCorner()
Gets the start point of map tile.
- Returns:
-
setLeftTopCorner
public void setLeftTopCorner(Point2D leftTopCorner)
Sets the start point of map tile.
-
isMapEditable
public boolean isMapEditable()
Returns if the map is editable.
True means it allows to edit the map in the workspace and persist it on disk.- Returns:
- Since:
- 9.1.0
-
setMapEditable
public void setMapEditable(boolean mapEditable)
Sets if the map is editable.
True means it allows to edit the map in the workspace and persist it on disk.- Since:
- 9.1.0
-
isInflatDisabled
public boolean isInflatDisabled()
Returns whether to disable the query with expanded bounds. The default is false, which means enabling the query with expanded bounds.
- Returns:
- Since:
- 8.1.1
-
setInflatDisabled
public void setInflatDisabled(boolean inflatDisabled)
Sets whether to disable the query with expanded bounds. The default is false, which means enabling the query with expanded bounds.
- Parameters:
inflatDisabled-- Since:
- 8.1.1
-
getWorkspacePath
public java.lang.String getWorkspacePath()
Gets the SuperMap workspace path.
- Returns:
- The SuperMap workspace path.
-
setWorkspacePath
public void setWorkspacePath(java.lang.String workspacePath)
Sets the SuperMap workspace path.
- Parameters:
workspacePath- The SuperMap workspace path.
-
getHighlightPointStyle
public Style getHighlightPointStyle(java.lang.String mapName)
Gets the highlight style of the point features of a specified map.
- Parameters:
mapName- The map name.- Returns:
- The highlight style of the point features.
-
setHighlightPointStyle
public void setHighlightPointStyle(java.lang.String mapName, Style pointStyle)Sets the highlight style of the point features of a specified map.
- Parameters:
mapName- The map name.pointStyle- The highlight style of the point features.
-
getHighlightLineStyle
public Style getHighlightLineStyle(java.lang.String mapName)
Gets the highlight style of the line features of a specified map.
- Parameters:
mapName- The map name.- Returns:
- The highlight style of the line features.
-
setHighlightLineStyle
public void setHighlightLineStyle(java.lang.String mapName, Style lineStyle)Sets the highlight style of the line features of a specified map.
- Parameters:
mapName- The map name.lineStyle- The highlight style of the line features.
-
getHighlightRegionStyle
public Style getHighlightRegionStyle(java.lang.String mapName)
Gets the highlight style of the polygon features of a specified map.
- Parameters:
mapName- The map name.- Returns:
- The highlight style of the polygon features.
-
setHighlightRegionStyle
public void setHighlightRegionStyle(java.lang.String mapName, Style regionStyle)Sets the highlight style of the polygon features of a specified map.
- Parameters:
mapName- The map name.regionStyle- The highlight style of the polygon features.
-
getMaps
public java.lang.String getMaps()
Gets the names of the published maps.
- Returns:
- The list of map names.
-
setMaps
public void setMaps(java.lang.String maps)
Sets the maps that need to be published. If it is set to null, all the maps will be published. If there are multiple maps to be published, each of them should be separated by ",".
- Parameters:
maps- The list of map names.
-
getMapNames
public java.util.List<java.lang.String> getMapNames()
Gets the name list of the maps that need to be published.
- Returns:
- The list of map names.
-
getUgcMapSettings
public java.util.List<UGCMapSetting> getUgcMapSettings()
Gets the SuperMap map settings.
- Returns:
- The SuperMap map settings.
-
setUgcMapSettings
public void setUgcMapSettings(java.util.List<UGCMapSetting> ugcMapSettings)
Sets the SuperMap map settings.
- Parameters:
ugcMapSettings- The SuperMap map settings.
-
hashCode
public int hashCode()
Gets hash value of the instance.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash value.
-
equals
public boolean equals(java.lang.Object obj)
Determines whether two objects are equal.
- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare.- Returns:
- True if the two objects are equal.
-
isMultiThread
public boolean isMultiThread()
Gets the identifier of the multi-thread mode.
- Returns:
- The identifier of the multi-thread mode.The default is true.
-
setMultiThread
public void setMultiThread(boolean multiThread)
Enables the multi-thread mode.
- Parameters:
multiThread- The multi-thread mode.
-
getPoolSize
public int getPoolSize()
Gets the size of the map object pool.
- Returns:
- The size of the map object pool.
-
setPoolSize
public void setPoolSize(int poolSize)
Sets the size of the map object pool.
- Parameters:
poolSize- The size of the map object pool.
-
getPreferedPNGType
public java.lang.String getPreferedPNGType()
Gets the preferred PNG type when using PNG cache.
- Returns:
- The preferred PNG type when using PNG cache.
-
setPreferedPNGType
public void setPreferedPNGType(java.lang.String preferedPNGType)
Sets the preferred PNG type when using PNG cache. SuperMap supports PNG and PNG8. Null denotes to use PNG. Now it is valid for 5.0 cache.
- Parameters:
preferedPNGType- The preferred PNG cache image type.
-
getQueryExpectCount
public int getQueryExpectCount()
Gets the expected query records number.
- Returns:
- The expected query records number.
-
setQueryExpectCount
public void setQueryExpectCount(int queryExpectCount)
Sets the expected query records number.
- Parameters:
queryExpectCount-
-
isUseCompactCache
public boolean isUseCompactCache()
Gets whether compact cache is in use (i.e., multiple cache images are centralized and saved in several files using the algorithm). This option needs to enable caching first.
- Returns:
- Whether the compact cache is in use.
-
setUseCompactCache
public void setUseCompactCache(boolean useCompactCache)
Sets whether to use compact cache (i.e., multiple cache images are centralized and saved in several files using the algorithm). This option needs to enable caching first.
- Parameters:
useCompactCache- Whether to use compact cache.
-
isExtractCacheToFile
public boolean isExtractCacheToFile()
Gets whether to generate new image files when extracting caches from the large file. It supports 4.0 cache now. This method requires to enable the compact cache firstly.
- Returns:
- Whether generating new image files when extracting caches from the file.
-
setExtractCacheToFile
public void setExtractCacheToFile(boolean extracCacheToFile)
Sets whether to extract the cache as images file from big file (it will extract binary contents if set to false). It only supports 4.0 caches. This method requires to enable the compact cache firstly.
- Parameters:
extracCacheToFile- Whether generating new image files when extracting caches from the file.
-
isIgnoreHashcodeWhenUseCache
public boolean isIgnoreHashcodeWhenUseCache()
Whether to ignore Hashcode when using cache. It supports 4.0 and 5.0 caches.
- Returns:
- Whether to ignore Hashcode.
- Since:
- 6.1.3
-
setIgnoreHashcodeWhenUseCache
public void setIgnoreHashcodeWhenUseCache(boolean ignoreHashcodeWhenUseCache)
Sets whether to ignore Hashcode when using cache. It supports 4.0 and 5.0 caches.
- Parameters:
ignoreHashcodeWhenUseCache- Whether to ignore Hashcode.- Since:
- 6.1.3
-
isCacheDisabled
public boolean isCacheDisabled()
Returns whether to disable cache. The default is disable.
- Returns:
- Since:
- 6.1.3
-
setCacheDisabled
public void setCacheDisabled(boolean cacheDisabled)
Sets whether to disable cache. The default is disable.
- Since:
- 6.1.3
-
validate
public void validate() throws InvalidConfigExceptionDescription copied from interface:ConfigValidatableVerifies the configuration- Specified by:
validatein interfaceConfigValidatable- Throws:
InvalidConfigException
-
isMultiInstance
public boolean isMultiInstance()
Description copied from interface:MultiInstanceSupportedReturns whether the current service provider is enabled
- Specified by:
isMultiInstancein interfaceMultiInstanceSupported- Returns:
-
setMultiInstance
public void setMultiInstance(boolean isMultiInstance)
Description copied from interface:MultiInstanceSupportedSets whether the current service provider is enabled
- Specified by:
setMultiInstancein interfaceMultiInstanceSupported
-
getMapFieldExcluded
public ExcludedFieldsInMap getMapFieldExcluded(java.lang.String mapName)
-
getExcludedFieldsInMaps
public ExcludedFieldsInMap[] getExcludedFieldsInMaps()
-
setExcludedFieldsInMaps
public void setExcludedFieldsInMaps(ExcludedFieldsInMap[] excludedFieldsInMaps)
-
clone
public UGCMapProviderSetting clone()
- Overrides:
clonein classjava.lang.Object
-
-