public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { StyleImpl style = new StyleImpl(); List legendURLS = new ArrayList(); for (int i = 0; i < value.length; i++) { if (sameName(elems[0], value[i])) { String name = (String) value[i].getValue(); style.setName(name); } if (sameName(elems[1], value[i])) { String title = (String) value[i].getValue(); style.setTitle(new SimpleInternationalString(title)); } if (sameName(elems[2], value[i])) { String _abstract = (String) value[i].getValue(); style.setAbstract(new SimpleInternationalString(_abstract)); } if (sameName(elems[3], value[i])) { legendURLS.add((String) value[i].getValue()); } if (sameName(elems[4], value[i])) { // TODO Implement StyleSheet URL } if (sameName(elems[5], value[i])) { // TODO implement StyleURL } } style.setLegendURLs(legendURLS); return style; }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { StyleImpl ret = new StyleImpl(); // Currently un-implemented //ret.setStyleURL((StyleURL)node.getChildValue("StyleURL")); //ret.setStyleSheetURL((StyleSheetURL)node.getChildValue("StyleSheetURL")); //ret.setLegendURLs(node.getChildValues("LegendURL")); if (node.getChildValue("Abstract")!= null) ret.setAbstract(new SimpleInternationalString((String)node.getChildValue("Abstract"))); if (node.getChildValue("Title") != null) ret.setTitle(new SimpleInternationalString((String)node.getChildValue("Title"))); ret.setName((String)node.getChildValue("Name")); return ret; }
style.setAbstract(new SimpleInternationalString(_abstract));