Class Theme
- java.lang.Object
-
- com.supermap.mapping.Theme
-
- Direct Known Subclasses:
- ThemeDotDensity, ThemeGraduatedSymbol, ThemeGraph, ThemeGridRange, ThemeLabel, ThemeRange, ThemeUnique
public abstract class Theme extends java.lang.Object
The Theme class. It is the base class of all the specific thematic map classes. All the theme map, such as unique values map,label map, ranges map inherit from this class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description boolean
fromXML(java.lang.String xml)
Imports the information of the thematic map from XML strings.java.util.Map<java.lang.String,java.lang.String>
getMemoryData()
Returns the memory thematic map data.ThemeType
getType()
Returns the type of the thematic map.void
setMemoryData(java.util.Map<java.lang.String,java.lang.String> map)
Sets the memory thematic map data.abstract java.lang.String
toString()
Outputs the formatted string for the thematic map.java.lang.String
toXML()
Exports the thematic map to XML strings.
-
-
-
Method Detail
-
getType
public ThemeType getType()
Returns the type of the thematic map. For more details, please refer to theThemeType
class.- Returns:
- The type of the thematic map.
-
getMemoryData
public java.util.Map<java.lang.String,java.lang.String> getMemoryData()
Returns the memory thematic map data.Using memory data to produce thematic map is different from using the expression to produce thematic map, and the former takes the priority.
The first parameter represents thematic value, which is the field or the expression in the dataset. The second parameter represents the external value. While creating the thematic maps, the system will use the foreign value instead of the thematic value to display the thematic map.
- Returns:
- The memory thematic map data.
-
setMemoryData
public void setMemoryData(java.util.Map<java.lang.String,java.lang.String> map)
Sets the memory thematic map data. Using memory data to produce thematic map is different from using the expression to produce thematic map, and the former takes the priority.The first parameter represents thematic value, which is the field or the expression in the dataset. The second parameter represents the external value. While creating the thematic maps, the system will use the foreign value instead of the thematic value to display the thematic map.
- Parameters:
map
- Sets the memory thematic map data.
-
fromXML
public boolean fromXML(java.lang.String xml)
Imports the information of the thematic map from XML strings.In SuperMap, the settings of any type of thematic map can be export to the XML strings, and these XML strings record all the settings of this thematic map. For example, in the XML strings of a label map, the settings of type of the thematic map, visible scale, styles, whether avoiding overlapping, which field or expression is used as thematic variable and so forth will be recorded. This XML strings can then be imported to set a thematic map.
- Parameters:
xml
- The XML strings that contains the information about a thematic map.- Returns:
- A boolean, return true if it is removed successfully; false otherwise.
-
toXML
public java.lang.String toXML()
Exports the thematic map to XML strings.In SuperMap, the settings of any type of thematic map can be export to the XML strings, and these XML strings record all the settings of this thematic map. For example, in the XML strings of a label map, the settings of type of the thematic map, visible scale, styles, whether avoiding overlapping, which field or expression is used as thematic variable and so forth will be recorded. This XML strings can then be imported to set a thematic map.
- Returns:
- The XML strings that contains the information about a thematic map.
-
toString
public abstract java.lang.String toString()
Outputs the formatted string for the thematic map. The formatted string provides the information about the thematic map settings and it cannot be used for import and display of the thematic map like what the XML string can do.- For raster ranges map, the format is {Caption="china", Start=10 End=20, Visible=true?false, Style={linestyle=,markerstyle=,fillstyle=} };
- For raster unique map, the format is {Caption="china", Unique =20, Visible=true?false, Style={linestyle=,markerstyle=,fillstyle=} };
- For labels map, the format is {Caption="China", Start=10 End=20, Visible=true, Style={name=,width=,height=,color=()} };
- For ranges map, the format is {Caption="china", Start=10 End=20, Visible=true?false, Style={linestyle=,markerstyle=,fillstyle=} };
- For unqiue values map, the format is {Caption="china", Unique =20, Visible=true?false, Style={linestyle=,markerstyle=,fillstyle=} };
- Overrides:
toString
in classjava.lang.Object
- Returns:
- The formatted string for the thematic map.
-
-