001: /*
002: * GeoTools - OpenSource mapping toolkit
003: * http://geotools.org
004: * (C) 2004-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.xml.styling;
017:
018: /**
019: * This code generated using Refractions SchemaCodeGenerator For more information, view the attached
020: * licensing information. CopyRight 105
021: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/xml/src/main/java/org/geotools/xml/styling/sldSchema.java $
022: */
023:
024: import java.util.Map;
025: import java.util.Collections;
026:
027: import java.net.URI;
028: import java.net.URISyntaxException;
029:
030: import org.geotools.xml.schema.Attribute;
031: import org.geotools.xml.schema.AttributeGroup;
032: import org.geotools.xml.schema.ComplexType;
033: import org.geotools.xml.schema.Element;
034: import org.geotools.xml.schema.Group;
035: import org.geotools.xml.schema.Schema;
036: import org.geotools.xml.schema.SimpleType;
037: import org.geotools.xml.schema.Type;
038:
039: public class sldSchema implements Schema {
040:
041: public static final URI NAMESPACE = loadNS();
042:
043: private static URI loadNS() {
044: try {
045: return new URI("http://www.opengis.net/sld");
046: } catch (URISyntaxException e) {
047: return null;
048: }
049: }
050:
051: public int getBlockDefault() {
052: return 0;
053: }
054:
055: public int getFinalDefault() {
056: return 0;
057: }
058:
059: public String getId() {
060: return "null";
061: }
062:
063: private static Schema[] imports = null;
064:
065: public Schema[] getImports() {
066: if (imports == null) {
067: imports = new Schema[] {
068: // TODO add instance of org.geotools.xml.xLink.XLinkSchema@e94e92,
069: // TODO add instance of org.geotools.xml.ogc.FilterSchema@18020cc
070: };
071: }
072: return imports;
073: }
074:
075: public String getPrefix() {
076: return "sld";
077: }
078:
079: public URI getTargetNamespace() {
080: return NAMESPACE;
081: }
082:
083: public URI getURI() {
084: return NAMESPACE;
085: }
086:
087: public String getVersion() {
088: return "null";
089: }
090:
091: public boolean includesURI(URI uri) {
092: // // TODO fill me in!
093: return false; // // safer
094: }
095:
096: public boolean isAttributeFormDefault() {
097: return false;
098: }
099:
100: public boolean isElementFormDefault() {
101: return true;
102: }
103:
104: public AttributeGroup[] getAttributeGroups() {
105: return null;
106: }
107:
108: public Attribute[] getAttributes() {
109: return null;
110: }
111:
112: /**
113: * TODO comment here
114: */
115: private static ComplexType[] complexTypes = null;
116:
117: public ComplexType[] getComplexTypes() {
118: if (complexTypes == null) {
119: complexTypes = new ComplexType[] {
120: sldComplexTypes2.SelectedChannelType.getInstance(),
121: sldComplexTypes2.ParameterValueType.getInstance(),
122: sldComplexTypes2.SymbolizerType.getInstance() };
123: }
124: return complexTypes;
125: }
126:
127: /**
128: * TODO comment here
129: */
130: private static Element[] elements = null;
131:
132: public Element[] getElements() {
133: if (elements == null) {
134: elements = new Element[] {
135: new sldElement(
136: "Displacement",
137: sldComplexTypes._Displacement.getInstance(),
138: null, 1, 1),
139: new sldElement(
140: "GammaValue",
141: org.geotools.xml.xsi.XSISimpleTypes.Double
142: .getInstance()/* simpleType name is double */,
143: null, 1, 1),
144: new sldElement("MaxScaleDenominator",
145: org.geotools.xml.xsi.XSISimpleTypes.Double
146: .getInstance()/*
147: * simpleType
148: * name is
149: * double
150: */, null, 1, 1),
151: new sldElement(
152: "PolygonSymbolizer",
153: sldComplexTypes2._PolygonSymbolizer
154: .getInstance(),
155: new sldElement("Symbolizer",
156: sldComplexTypes2.SymbolizerType
157: .getInstance(), null, 1, 1),
158: 1, 1),
159: new sldElement("ColorMapEntry",
160: sldComplexTypes._ColorMapEntry
161: .getInstance(), null, 1, 1),
162: new sldElement("GreenChannel",
163: sldComplexTypes2.SelectedChannelType
164: .getInstance(), null, 1, 1),
165: new sldElement("LATEST_ON_TOP",
166: sldComplexTypes._LATEST_ON_TOP
167: .getInstance(), null, 1, 1),
168: new sldElement("LayerFeatureConstraints",
169: sldComplexTypes2._LayerFeatureConstraints
170: .getInstance(), null, 1, 1),
171: new sldElement("Size",
172: sldComplexTypes2.ParameterValueType
173: .getInstance(), null, 1, 1),
174: new sldElement(
175: "LineSymbolizer",
176: sldComplexTypes2._LineSymbolizer
177: .getInstance(),
178: new sldElement("Symbolizer",
179: sldComplexTypes2.SymbolizerType
180: .getInstance(), null, 1, 1),
181: 1, 1),
182: new sldElement(
183: "PointSymbolizer",
184: sldComplexTypes2._PointSymbolizer
185: .getInstance(),
186: new sldElement("Symbolizer",
187: sldComplexTypes2.SymbolizerType
188: .getInstance(), null, 1, 1),
189: 1, 1),
190: new sldElement("ChannelSelection",
191: sldComplexTypes._ChannelSelection
192: .getInstance(), null, 1, 1),
193: new sldElement("Graphic", sldComplexTypes._Graphic
194: .getInstance(), null, 1, 1),
195: new sldElement(
196: "WellKnownName",
197: org.geotools.xml.xsi.XSISimpleTypes.String
198: .getInstance()/* simpleType name is string */,
199: null, 1, 1),
200: new sldElement("Name",
201: org.geotools.xml.xsi.XSISimpleTypes.String
202: .getInstance()/*
203: * simpleType
204: * name is
205: * string
206: */, null, 1, 1),
207: new sldElement("MinScaleDenominator",
208: org.geotools.xml.xsi.XSISimpleTypes.Double
209: .getInstance()/*
210: * simpleType
211: * name is
212: * double
213: */, null, 1, 1),
214: new sldElement("BlueChannel",
215: sldComplexTypes2.SelectedChannelType
216: .getInstance(), null, 1, 1),
217: new sldElement("RANDOM", sldComplexTypes2._RANDOM
218: .getInstance(), null, 1, 1),
219: new sldElement(
220: "FeatureTypeName",
221: org.geotools.xml.xsi.XSISimpleTypes.String
222: .getInstance()/* simpleType name is string */,
223: null, 1, 1),
224: new sldElement("Font", sldComplexTypes._Font
225: .getInstance(), null, 1, 1),
226: new sldElement(
227: "Title",
228: org.geotools.xml.xsi.XSISimpleTypes.String
229: .getInstance()/* simpleType name is string */,
230: null, 1, 1),
231: new sldElement("UserStyle",
232: sldComplexTypes2._UserStyle.getInstance(),
233: null, 1, 1),
234: new sldElement("PointPlacement",
235: sldComplexTypes2._PointPlacement
236: .getInstance(), null, 1, 1),
237: new sldElement("Rotation",
238: sldComplexTypes2.ParameterValueType
239: .getInstance(), null, 1, 1),
240: new sldElement("OnlineResource",
241: sldComplexTypes2._OnlineResource
242: .getInstance(), null, 1, 1),
243: new sldElement("Mark", sldComplexTypes2._Mark
244: .getInstance(), null, 1, 1),
245: new sldElement(
246: "BrightnessOnly",
247: org.geotools.xml.xsi.XSISimpleTypes.Boolean
248: .getInstance()/* simpleType name is boolean */,
249: null, 1, 1),
250: new sldElement("SemanticTypeIdentifier",
251: org.geotools.xml.xsi.XSISimpleTypes.String
252: .getInstance()/*
253: * simpleType
254: * name is
255: * string
256: */, null, 1, 1),
257: new sldElement("EARLIEST_ON_TOP",
258: sldComplexTypes._EARLIEST_ON_TOP
259: .getInstance(), null, 1, 1),
260: new sldElement("Geometry",
261: sldComplexTypes._Geometry.getInstance(),
262: null, 1, 1),
263: new sldElement("ElseFilter",
264: sldComplexTypes._ElseFilter.getInstance(),
265: null, 1, 1),
266: new sldElement("StyledLayerDescriptor",
267: sldComplexTypes2._StyledLayerDescriptor
268: .getInstance(), null, 1, 1),
269: new sldElement(
270: "Abstract",
271: org.geotools.xml.xsi.XSISimpleTypes.String
272: .getInstance()/* simpleType name is string */,
273: null, 1, 1),
274: new sldElement("AnchorPoint",
275: sldComplexTypes._AnchorPoint.getInstance(),
276: null, 1, 1),
277: new sldElement("GraphicStroke",
278: sldComplexTypes._GraphicStroke
279: .getInstance(), null, 1, 1),
280: new sldElement("ContrastEnhancement",
281: sldComplexTypes._ContrastEnhancement
282: .getInstance(), null, 1, 1),
283: new sldElement("FeatureTypeStyle",
284: sldComplexTypes._FeatureTypeStyle
285: .getInstance(), null, 1, 1),
286: new sldElement(
287: "Format",
288: org.geotools.xml.xsi.XSISimpleTypes.String
289: .getInstance()/* simpleType name is string */,
290: null, 1, 1),
291: new sldElement("DisplacementY",
292: sldComplexTypes2.ParameterValueType
293: .getInstance(), null, 1, 1),
294: new sldElement("DisplacementX",
295: sldComplexTypes2.ParameterValueType
296: .getInstance(), null, 1, 1),
297: new sldElement("NamedLayer",
298: sldComplexTypes2._NamedLayer.getInstance(),
299: null, 1, 1),
300: new sldElement(
301: "TextSymbolizer",
302: sldComplexTypes2._TextSymbolizer
303: .getInstance(),
304: new sldElement("Symbolizer",
305: sldComplexTypes2.SymbolizerType
306: .getInstance(), null, 1, 1),
307: 1, 1),
308: new sldElement("LabelPlacement",
309: sldComplexTypes._LabelPlacement
310: .getInstance(), null, 1, 1),
311: new sldElement("Value",
312: org.geotools.xml.xsi.XSISimpleTypes.String
313: .getInstance(), null, 1, 1),
314: new sldElement("Histogram",
315: sldComplexTypes._Histogram.getInstance(),
316: null, 1, 1),
317: new sldElement("ExternalGraphic",
318: sldComplexTypes._ExternalGraphic
319: .getInstance(), null, 1, 1),
320: new sldElement("NamedStyle",
321: sldComplexTypes2._NamedStyle.getInstance(),
322: null, 1, 1),
323: new sldElement("AnchorPointY",
324: sldComplexTypes2.ParameterValueType
325: .getInstance(), null, 1, 1),
326: new sldElement("RemoteOWS",
327: sldComplexTypes2._RemoteOWS.getInstance(),
328: null, 1, 1),
329: new sldElement(
330: "CssParameter",
331: sldComplexTypes._CssParameter.getInstance(),
332: null, 1, 1),
333: new sldElement("PerpendicularOffset",
334: sldComplexTypes2.ParameterValueType
335: .getInstance(), null, 1, 1),
336: new sldElement("Label",
337: sldComplexTypes2.ParameterValueType
338: .getInstance(), null, 1, 1),
339: new sldElement("OverlapBehavior",
340: sldComplexTypes2._OverlapBehavior
341: .getInstance(), null, 1, 1),
342: new sldElement("Halo", sldComplexTypes._Halo
343: .getInstance(), null, 1, 1),
344: new sldElement(
345: "ImageOutline",
346: sldComplexTypes._ImageOutline.getInstance(),
347: null, 1, 1),
348: new sldElement("Fill", sldComplexTypes._Fill
349: .getInstance(), null, 1, 1),
350: new sldElement("ShadedRelief",
351: sldComplexTypes2._ShadedRelief
352: .getInstance(), null, 1, 1),
353: new sldElement(
354: "SourceChannelName",
355: org.geotools.xml.xsi.XSISimpleTypes.String
356: .getInstance()/* simpleType name is string */,
357: null, 1, 1),
358: new sldElement("Service", sldSimpleTypes._Service
359: .getInstance(), null, 1, 1),
360: new sldElement("GrayChannel",
361: sldComplexTypes2.SelectedChannelType
362: .getInstance(), null, 1, 1),
363: new sldElement("Rule", sldComplexTypes2._Rule
364: .getInstance(), null, 1, 1),
365: new sldElement("RedChannel",
366: sldComplexTypes2.SelectedChannelType
367: .getInstance(), null, 1, 1),
368: new sldElement("GraphicFill",
369: sldComplexTypes._GraphicFill.getInstance(),
370: null, 1, 1),
371: new sldElement("LegendGraphic",
372: sldComplexTypes2._LegendGraphic
373: .getInstance(), null, 1, 1),
374: new sldElement("AVERAGE", sldComplexTypes._AVERAGE
375: .getInstance(), null, 1, 1),
376: new sldElement(
377: "IsDefault",
378: org.geotools.xml.xsi.XSISimpleTypes.Boolean
379: .getInstance()/* simpleType name is boolean */,
380: null, 1, 1),
381: new sldElement("LinePlacement",
382: sldComplexTypes2._LinePlacement
383: .getInstance(), null, 1, 1),
384: new sldElement("Normalize",
385: sldComplexTypes2._Normalize.getInstance(),
386: null, 1, 1),
387: new sldElement("Extent", sldComplexTypes._Extent
388: .getInstance(), null, 1, 1),
389: new sldElement(
390: "ReliefFactor",
391: org.geotools.xml.xsi.XSISimpleTypes.Double
392: .getInstance()/* simpleType name is double */,
393: null, 1, 1),
394: new sldElement(
395: "RasterSymbolizer",
396: sldComplexTypes2._RasterSymbolizer
397: .getInstance(),
398: new sldElement("Symbolizer",
399: sldComplexTypes2.SymbolizerType
400: .getInstance(), null, 1, 1),
401: 1, 1),
402: new sldElement("FeatureTypeConstraint",
403: sldComplexTypes._FeatureTypeConstraint
404: .getInstance(), null, 1, 1),
405: new sldElement("Stroke", sldComplexTypes2._Stroke
406: .getInstance(), null, 1, 1),
407: new sldElement("ColorMap",
408: sldComplexTypes._ColorMap.getInstance(),
409: null, 1, 1),
410: new sldElement("UserLayer",
411: sldComplexTypes2._UserLayer.getInstance(),
412: null, 1, 1),
413: new sldElement("Symbolizer",
414: sldComplexTypes2.SymbolizerType
415: .getInstance(), null, 1, 1),
416: new sldElement("Opacity",
417: sldComplexTypes2.ParameterValueType
418: .getInstance(), null, 1, 1),
419: new sldElement("Radius",
420: sldComplexTypes2.ParameterValueType
421: .getInstance(), null, 1, 1),
422: new sldElement("AnchorPointX",
423: sldComplexTypes2.ParameterValueType
424: .getInstance(), null, 1, 1) };
425: }
426: return elements;
427: }
428:
429: public Group[] getGroups() {
430: return null;
431: }
432:
433: public SimpleType[] getSimpleTypes() {
434: return null;
435: }
436:
437: private static final int SLD_ELEMENT = 32;
438:
439: public Type getSLDType() {
440: return getElements()[SLD_ELEMENT].getType();
441: }
442:
443: /**
444: * Returns the implementation hints. The default implementation returns en empty map.
445: */
446: public Map getImplementationHints() {
447: return Collections.EMPTY_MAP;
448: }
449: }
|