/** * Build a new <code>AreaSymbolizer</code>, using a JAXB element to fill its properties. * * @param st * @throws org.orbisgis.coremap.renderer.se.SeExceptions.InvalidStyle */ public AreaSymbolizer(JAXBElement<AreaSymbolizerType> st) throws InvalidStyle { super(st); AreaSymbolizerType ast = st.getValue(); if (ast.getGeometry() != null) { this.setGeometryAttribute(new GeometryAttribute(ast.getGeometry())); } if (ast.getUom() != null) { setUom(Uom.fromOgcURN(ast.getUom())); } if (ast.getPerpendicularOffset() != null) { this.setPerpendicularOffset( SeParameterFactory.createRealParameter(ast.getPerpendicularOffset())); } if (ast.getDisplacement() != null) { this.setTranslate(new Translate(ast.getDisplacement())); } if (ast.getFill() != null) { this.setFill(Fill.createFromJAXBElement(ast.getFill())); } if (ast.getStroke() != null) { this.setStroke(Stroke.createFromJAXBElement(ast.getStroke())); } }
/** * Build a new {@code Category} from the given {@code CategoryType}. * * @param c * @throws org.orbisgis.coremap.renderer.se.SeExceptions.InvalidStyle */ public Category(CategoryType c) throws InvalidStyle { if (c.getFill() != null) { setFill(Fill.createFromJAXBElement(c.getFill())); } if (c.getGraphic() != null) { setGraphicCollection(new GraphicCollection(c.getGraphic(), this)); } if (c.getStroke() != null) { setStroke(Stroke.createFromJAXBElement(c.getStroke())); } if (c.getValue() != null) { setMeasure(SeParameterFactory.createRealParameter(c.getValue())); } if (c.getName() != null) { setName(c.getName()); } }