}
return model;
}
private void loadConditionalStyles(ConditionalStyleModel conditionalStyleModel, XMLElement conditionalStylesRoot) {
final ConditionFactory conditionFactory = FilterController.getCurrentFilterController().getConditionFactory();
final Vector<XMLElement> styleElements = conditionalStylesRoot.getChildrenNamed("conditional_style");
for(XMLElement styleElement : styleElements){
final boolean isActive = Boolean.valueOf(styleElement.getAttribute("ACTIVE", "false"));
final boolean isLast = Boolean.valueOf(styleElement.getAttribute("LAST", "false"));
String styleText = styleElement.getAttribute("LOCALIZED_STYLE_REF", null);
final IStyle style;
if(styleText != null){
style = StyleFactory.create(NamedObject.format((String) styleText));
}
else {
style = StyleFactory.create(styleElement.getAttribute("STYLE_REF", null));
}
final ASelectableCondition condition;
if(styleElement.getChildrenCount() == 1){
final XMLElement conditionElement = styleElement.getChildAtIndex(0);
try {
condition = conditionFactory.loadCondition(conditionElement);
}
catch (Exception e) {
e.printStackTrace();
continue;
}