001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
005: * (C) 2002, Centre for Computational Geography
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation;
010: * version 2.1 of the License.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: */
017: package org.geotools.styling;
018:
019: import org.geotools.event.GTComponent;
020: import org.geotools.event.GTListener;
021:
022: /**
023: * Holds styling information (from a StyleLayerDescriptor document).
024: *
025: * <p>
026: * This interface is bound to version 1.0 of the SLD specification.
027: * </p>
028: *
029: * <p>
030: * For many of us in geotools this is the reason we came along for the ride - a
031: * pretty picture. For documentation on the use of this class please consult
032: * the SLD 1.0 specification.
033: * </p>
034: *
035: * <p>
036: * We may experiment with our own (or SLD 1.1) ideas but will mark such
037: * experiments for you. This is only an issue of you are considering writing
038: * out these objects for interoptability with other systems.
039: * </p>
040: *
041: * <p>
042: * General stratagy for supporting multiple SLD versions (and experiments):
043: *
044: * <ul>
045: * <li>
046: * These interfaces will reflect the current published specification
047: * </li>
048: * <li>
049: * Our implementations will be <b>BIGGER</b> and more capabile then any one
050: * specification
051: * </li>
052: * <li>
053: * We cannot defined explicit interfaces tracking each version until we move to
054: * Java 5 (perferably GeoAPI would hold these anyways)
055: * </li>
056: * <li>
057: * We can provided javadocs indicating extentions, and isolate these using the
058: * normal java convention: TextSymbolizer and TextSymbolizer2 (In short you
059: * will have to go out of your way to work with a hack or experiment, you
060: * won't depend on one by accident)
061: * </li>
062: * <li>
063: * We can use Factories (aka SLD1Factory and SLD1_1Factory and SEFactory) to
064: * support the creation of conformant datastructures. Code (such as user
065: * interfaces) can be parameratized with these factories when they need to
066: * confirm to an exact version supported by an individual service. We hope
067: * that specifications are always adative, and will be forced to throw
068: * unsupported exceptions when functionality is removed from a specification.
069: * </li>
070: * </ul>
071: * </p>
072: *
073: * @author Ian Turton, CCG
074: * @author James Macgill, CCG
075: * @author Jody Garnett, Refractions Research
076: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/api/src/main/java/org/geotools/styling/StyledLayerDescriptor.java $
077: * @version SLD 1.0
078: *
079: * @since GeoTools 2.0
080: */
081: public interface StyledLayerDescriptor extends GTComponent {
082: public StyledLayer[] getStyledLayers();
083:
084: public void setStyledLayers(StyledLayer[] layers);
085:
086: public void addStyledLayer(StyledLayer layer);
087:
088: /**
089: * Getter for property name.
090: *
091: * @return Value of property name.
092: */
093: public String getName();
094:
095: /**
096: * Setter for property name.
097: *
098: * @param name New value of property name.
099: */
100: public void setName(String name);
101:
102: /**
103: * Getter for property title.
104: *
105: * @return Value of property title.
106: */
107: public String getTitle();
108:
109: /**
110: * Setter for property title.
111: *
112: * @param title New value of property title.
113: */
114: public void setTitle(String title);
115:
116: /**
117: * Getter for property abstractStr.
118: *
119: * @return Value of property abstractStr.
120: */
121: public java.lang.String getAbstract();
122:
123: /**
124: * Setter for property abstractStr.
125: *
126: * @param abstractStr New value of property abstractStr.
127: */
128: public void setAbstract(java.lang.String abstractStr);
129:
130: /**
131: * Listens to changes in the Style content.
132: *
133: * <p>
134: * Changes are provided:
135: *
136: * <ul>
137: * <li>
138: * Before: deletion
139: * </li>
140: * <li>
141: * After: modification
142: * </li>
143: * </ul>
144: * </p>
145: *
146: * <p>
147: * Since the Style data structure can be vast and complicated a trail of
148: * breadcrumbs (a delta) is provided to help find your way to the change.
149: * </p>
150: *
151: * @param listener
152: */
153: void addListener(GTListener listener);
154:
155: /**
156: * Remove a style listener
157: *
158: * @param listener DOCUMENT ME!
159: */
160: void removeListener(GTListener listener);
161:
162: /**
163: * Used to navigate a Style/SLD.
164: *
165: * @param visitor
166: */
167: void accept(StyleVisitor visitor);
168: }
|