001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation;
009: * version 2.1 of the License.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: */
016: package org.geotools.sld.bindings;
017:
018: import org.picocontainer.MutablePicoContainer;
019: import org.w3c.dom.Document;
020: import org.w3c.dom.Element;
021: import javax.xml.namespace.QName;
022: import org.geotools.styling.ImageOutline;
023: import org.geotools.styling.LineSymbolizer;
024: import org.geotools.styling.PolygonSymbolizer;
025: import org.geotools.styling.StyleFactory;
026: import org.geotools.styling.Symbolizer;
027: import org.geotools.xml.*;
028:
029: /**
030: * Binding object for the element http://www.opengis.net/sld:ImageOutline.
031: *
032: * <p>
033: * <pre>
034: * <code>
035: * <xsd:element name="ImageOutline">
036: * <xsd:annotation>
037: * <xsd:documentation> "ImageOutline" specifies
038: * how individual source rasters in a multi-raster set
039: * (such as a set of satellite-image scenes) should be
040: * outlined to make the individual-image locations visible. </xsd:documentation>
041: * </xsd:annotation>
042: * <xsd:complexType>
043: * <xsd:choice>
044: * <xsd:element ref="sld:LineSymbolizer"/>
045: * <xsd:element ref="sld:PolygonSymbolizer"/>
046: * </xsd:choice>
047: * </xsd:complexType>
048: * </xsd:element>
049: *
050: * </code>
051: * </pre>
052: * </p>
053: *
054: * @generated
055: */
056: public class SLDImageOutlineBinding extends AbstractComplexBinding {
057: StyleFactory styleFactory;
058:
059: public SLDImageOutlineBinding(StyleFactory styleFactory) {
060: this .styleFactory = styleFactory;
061: }
062:
063: /**
064: * @generated
065: */
066: public QName getTarget() {
067: return SLD.IMAGEOUTLINE;
068: }
069:
070: /**
071: * <!-- begin-user-doc -->
072: * <!-- end-user-doc -->
073: *
074: * @generated modifiable
075: */
076: public int getExecutionMode() {
077: return AFTER;
078: }
079:
080: /**
081: * <!-- begin-user-doc -->
082: * <!-- end-user-doc -->
083: *
084: * @generated modifiable
085: */
086: public Class getType() {
087: return ImageOutline.class;
088: }
089:
090: /**
091: * <!-- begin-user-doc -->
092: * <!-- end-user-doc -->
093: *
094: * @generated modifiable
095: */
096: public void initialize(ElementInstance instance, Node node,
097: MutablePicoContainer context) {
098: }
099:
100: /**
101: * <!-- begin-user-doc -->
102: * <!-- end-user-doc -->
103: *
104: * @generated modifiable
105: */
106: public Object parse(ElementInstance instance, Node node,
107: Object value) throws Exception {
108: //<xsd:choice>
109: // <xsd:element ref="sld:LineSymbolizer"/>
110: // <xsd:element ref="sld:PolygonSymbolizer"/>
111: //</xsd:choice>
112: return styleFactory.createImageOutline((Symbolizer) node
113: .getChildValue(Symbolizer.class));
114: }
115: }
|