*
* @generated modifiable
*/
public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
Symbolizer sym = (Symbolizer) value;
// <xsd:sequence>
// <xsd:element minOccurs="0" ref="se:Name"/>
// <xsd:element minOccurs="0" ref="se:Description"/>
// <xsd:element minOccurs="0" ref="se:BaseSymbolizer"/>
// </xsd:sequence>
// <xsd:attribute name="version" type="se:VersionType"/>
// <xsd:attribute name="uom" type="xsd:anyURI"/>
if (node.hasChild("Name")) {
sym.setName((String)node.getChildValue("Name"));
}
if (node.hasChild("Description")) {
sym.setDescription((Description) node.getChildValue("Description"));
}
if (node.hasChild("BaseSymbolizer")) {
//throw new IllegalArgumentException("BaseSymbolizer not supported");
}
if (node.hasAttribute("version")) {
//throw new IllegalArgumentException("version not supported");
}
if (node.hasAttribute("uom")) {
String uom = ((URI) node.getAttributeValue("uom")).toString();
if (UomOgcMapping.get(uom) == null) {
throw new IllegalArgumentException("uom " + uom + " not supported");
}
sym.setUnitOfMeasure(UomOgcMapping.get(uom).getUnit());
}
return sym;
}