use of com.sldeditor.common.xml.ui.XMLTestSectionField in project sldeditor by robward-scisys.
the class SLDOutputTest method initialise.
/**
* Initialise.
*/
private void initialise() {
String fullPath = "/test/SLDXPath.xml";
SLDXPath xPath = (SLDXPath) ParseXML.parseFile("", fullPath, OUTPUT_SCHEMA_RESOURCE, SLDXPath.class);
Map<SelectedTreeItemEnum, String> initialPrefixMap = new HashMap<SelectedTreeItemEnum, String>();
for (XMLTestSection section : xPath.getSection()) {
initialPrefixMap.put(section.getSldtype(), "/" + section.getPrefix());
Map<FieldIdEnum, String> fieldMap = new HashMap<FieldIdEnum, String>();
for (XMLTestSectionField xmlField : section.getField()) {
fieldMap.put(xmlField.getId(), xmlField.getXpath());
}
xPathMap.put(section.getSldtype(), fieldMap);
}
prefixMap.put(SelectedTreeItemEnum.SLD, initialPrefixMap.get(SelectedTreeItemEnum.SLD));
populatePrefixMap(SelectedTreeItemEnum.LAYER, SelectedTreeItemEnum.SLD, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.STYLE, SelectedTreeItemEnum.LAYER, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.FEATURETYPESTYLE, SelectedTreeItemEnum.STYLE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.RULE, SelectedTreeItemEnum.FEATURETYPESTYLE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.POINT_SYMBOLIZER, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.LINE_SYMBOLIZER, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.POLYGON_SYMBOLIZER, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.TEXT_SYMBOLIZER, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.RASTER_SYMBOLIZER, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.POINT_FILL, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.POLYGON_FILL, SelectedTreeItemEnum.RULE, initialPrefixMap);
populatePrefixMap(SelectedTreeItemEnum.STROKE, SelectedTreeItemEnum.RULE, initialPrefixMap);
}
Aggregations