*
* @generated modifiable
*/
public Object parse(ElementInstance instance, Node node, Object value)
throws Exception {
NamedLayer namedLayer = styleFactory.createNamedLayer();
//<xsd:element ref="sld:Name"/>
namedLayer.setName((String) node.getChildValue("Name"));
//<xsd:element ref="sld:LayerFeatureConstraints" minOccurs="0"/>
if (node.hasChild("LayerFeatureConstraints")) {
LayerFeatureConstraints constraints = (LayerFeatureConstraints) node.getChildValue(
"LayerFeatureConstraints");
namedLayer.setLayerFeatureConstraints(constraints.getFeatureTypeConstraints());
}
//<xsd:choice minOccurs="0" maxOccurs="unbounded">
// <xsd:element ref="sld:NamedStyle"/>
// <xsd:element ref="sld:UserStyle"/>
//</xsd:choice>
for (Iterator itr = node.getChildValues(Style.class).iterator(); itr.hasNext();) {
namedLayer.addStyle((Style) itr.next());
}
return namedLayer;
}