Search in sources :

Example 1 with XMLTestSectionField

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);
}
Also used : SLDXPath(com.sldeditor.common.xml.ui.SLDXPath) XMLTestSectionField(com.sldeditor.common.xml.ui.XMLTestSectionField) HashMap(java.util.HashMap) XMLTestSection(com.sldeditor.common.xml.ui.XMLTestSection) XMLSetFieldLiteralString(com.sldeditor.common.xml.ui.XMLSetFieldLiteralString) FieldIdEnum(com.sldeditor.common.xml.ui.FieldIdEnum) SelectedTreeItemEnum(com.sldeditor.common.xml.ui.SelectedTreeItemEnum)

Aggregations

FieldIdEnum (com.sldeditor.common.xml.ui.FieldIdEnum)1 SLDXPath (com.sldeditor.common.xml.ui.SLDXPath)1 SelectedTreeItemEnum (com.sldeditor.common.xml.ui.SelectedTreeItemEnum)1 XMLSetFieldLiteralString (com.sldeditor.common.xml.ui.XMLSetFieldLiteralString)1 XMLTestSection (com.sldeditor.common.xml.ui.XMLTestSection)1 XMLTestSectionField (com.sldeditor.common.xml.ui.XMLTestSectionField)1 HashMap (java.util.HashMap)1