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; either
009: * version 2.1 of the License, or (at your option) any later version.
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.data.wms.xml;
017:
018: import java.io.IOException;
019: import java.net.URI;
020: import java.net.URISyntaxException;
021: import java.util.Collections;
022: import java.util.Map;
023:
024: import javax.naming.OperationNotSupportedException;
025:
026: import org.geotools.data.wms.xml.WMSComplexTypes.LatitudeType;
027: import org.geotools.data.wms.xml.WMSComplexTypes.LongitudeType;
028: import org.geotools.data.wms.xml.WMSComplexTypes.OperationType;
029: import org.geotools.data.wms.xml.WMSComplexTypes._AttributionType;
030: import org.geotools.data.wms.xml.WMSComplexTypes._AuthorityURLType;
031: import org.geotools.data.wms.xml.WMSComplexTypes._BLANKType;
032: import org.geotools.data.wms.xml.WMSComplexTypes._BMPType;
033: import org.geotools.data.wms.xml.WMSComplexTypes._BoundingBoxType;
034: import org.geotools.data.wms.xml.WMSComplexTypes._CW_WKBType;
035: import org.geotools.data.wms.xml.WMSComplexTypes._CapabilityType;
036: import org.geotools.data.wms.xml.WMSComplexTypes._ContactAddressType;
037: import org.geotools.data.wms.xml.WMSComplexTypes._ContactInformationType;
038: import org.geotools.data.wms.xml.WMSComplexTypes._ContactPersonPrimaryType;
039: import org.geotools.data.wms.xml.WMSComplexTypes._DCPTypeType;
040: import org.geotools.data.wms.xml.WMSComplexTypes._DataURLType;
041: import org.geotools.data.wms.xml.WMSComplexTypes._DimensionType;
042: import org.geotools.data.wms.xml.WMSComplexTypes._EX_GeographicBoundingBoxType;
043: import org.geotools.data.wms.xml.WMSComplexTypes._ExceptionType;
044: import org.geotools.data.wms.xml.WMSComplexTypes._ExtentType;
045: import org.geotools.data.wms.xml.WMSComplexTypes._FeatureListURLType;
046: import org.geotools.data.wms.xml.WMSComplexTypes._FormatType;
047: import org.geotools.data.wms.xml.WMSComplexTypes._GIFType;
048: import org.geotools.data.wms.xml.WMSComplexTypes._GML_1Type;
049: import org.geotools.data.wms.xml.WMSComplexTypes._GML_2Type;
050: import org.geotools.data.wms.xml.WMSComplexTypes._GML_3Type;
051: import org.geotools.data.wms.xml.WMSComplexTypes._GeoTIFFType;
052: import org.geotools.data.wms.xml.WMSComplexTypes._GetType;
053: import org.geotools.data.wms.xml.WMSComplexTypes._HTTPType;
054: import org.geotools.data.wms.xml.WMSComplexTypes._INIMAGEType;
055: import org.geotools.data.wms.xml.WMSComplexTypes._IdentifierType;
056: import org.geotools.data.wms.xml.WMSComplexTypes._JPEGType;
057: import org.geotools.data.wms.xml.WMSComplexTypes._KeywordListType;
058: import org.geotools.data.wms.xml.WMSComplexTypes._KeywordType;
059: import org.geotools.data.wms.xml.WMSComplexTypes._KeywordsType;
060: import org.geotools.data.wms.xml.WMSComplexTypes._LatLonBoundingBoxType;
061: import org.geotools.data.wms.xml.WMSComplexTypes._LayerType;
062: import org.geotools.data.wms.xml.WMSComplexTypes._LegendURLType;
063: import org.geotools.data.wms.xml.WMSComplexTypes._LogoURLType;
064: import org.geotools.data.wms.xml.WMSComplexTypes._MIMEType;
065: import org.geotools.data.wms.xml.WMSComplexTypes._MetadataURLType;
066: import org.geotools.data.wms.xml.WMSComplexTypes._OnlineResourceType;
067: import org.geotools.data.wms.xml.WMSComplexTypes._PNGType;
068: import org.geotools.data.wms.xml.WMSComplexTypes._PPMType;
069: import org.geotools.data.wms.xml.WMSComplexTypes._PostType;
070: import org.geotools.data.wms.xml.WMSComplexTypes._RequestType;
071: import org.geotools.data.wms.xml.WMSComplexTypes._SVGType;
072: import org.geotools.data.wms.xml.WMSComplexTypes._ScaleHintType;
073: import org.geotools.data.wms.xml.WMSComplexTypes._ServiceException;
074: import org.geotools.data.wms.xml.WMSComplexTypes._ServiceExceptionReport;
075: import org.geotools.data.wms.xml.WMSComplexTypes._ServiceType;
076: import org.geotools.data.wms.xml.WMSComplexTypes._StyleSheetURLType;
077: import org.geotools.data.wms.xml.WMSComplexTypes._StyleType;
078: import org.geotools.data.wms.xml.WMSComplexTypes._StyleURLType;
079: import org.geotools.data.wms.xml.WMSComplexTypes._TIFFType;
080: import org.geotools.data.wms.xml.WMSComplexTypes._UserDefinedSymbolizationType;
081: import org.geotools.data.wms.xml.WMSComplexTypes._VendorSpecificCapabilitiesType;
082: import org.geotools.data.wms.xml.WMSComplexTypes._WBMPType;
083: import org.geotools.data.wms.xml.WMSComplexTypes._WMS_CapabilitiesType;
084: import org.geotools.data.wms.xml.WMSComplexTypes._WMS_XMLType;
085: import org.geotools.data.wms.xml.WMSComplexTypes._WMTException;
086: import org.geotools.data.wms.xml.WMSComplexTypes._WMT_MS_CapabilitiesType;
087: import org.geotools.data.wms.xml.WMSComplexTypes._WebCGMType;
088: import org.geotools.data.wms.xml.WMSComplexTypes.__ExtendedCapabilitiesType;
089: import org.geotools.data.wms.xml.WMSDescribeLayerTypes.WMS_DescribeLayerResponse;
090: import org.geotools.data.wms.xml.WMSDescribeLayerTypes._LayerDescription;
091: import org.geotools.data.wms.xml.WMSDescribeLayerTypes._Query;
092: import org.geotools.xml.PrintHandler;
093: import org.geotools.xml.handlers.IgnoreHandler;
094: import org.geotools.xml.schema.Attribute;
095: import org.geotools.xml.schema.AttributeGroup;
096: import org.geotools.xml.schema.AttributeValue;
097: import org.geotools.xml.schema.ComplexType;
098: import org.geotools.xml.schema.Element;
099: import org.geotools.xml.schema.ElementValue;
100: import org.geotools.xml.schema.Facet;
101: import org.geotools.xml.schema.Group;
102: import org.geotools.xml.schema.Schema;
103: import org.geotools.xml.schema.SimpleType;
104: import org.geotools.xml.schema.Type;
105: import org.geotools.xml.schema.impl.AttributeGT;
106: import org.geotools.xml.schema.impl.AttributeValueGT;
107: import org.geotools.xml.schema.impl.FacetGT;
108: import org.geotools.xml.schema.impl.SimpleTypeGT;
109: import org.geotools.xml.xLink.XLinkSchema;
110: import org.geotools.xml.xsi.XSISimpleTypes;
111: import org.xml.sax.Attributes;
112: import org.xml.sax.SAXException;
113:
114: /**
115: * @author Richard Gould
116: *
117: * TODO To change the template for this generated type comment go to
118: * Window - Preferences - Java - Code Style - Code Templates
119: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/plugin/wms/src/main/java/org/geotools/data/wms/xml/WMSSchema.java $
120: */
121: public class WMSSchema implements Schema {
122:
123: private static Schema instance = new WMSSchema();
124: public static URI NAMESPACE = makeURI("http://www.opengis.net/wms");
125:
126: static final Element[] elements = new Element[] {
127: new WMSElement("WMS_Capabilities", _WMS_CapabilitiesType
128: .getInstance()),
129: new WMSElement("WMT_MS_Capabilities",
130: _WMT_MS_CapabilitiesType.getInstance()),
131:
132: new WMSElement("Name", XSISimpleTypes.String.getInstance()),
133: new WMSElement("Title", XSISimpleTypes.String.getInstance()),
134: new WMSElement("Abstract", XSISimpleTypes.String
135: .getInstance()),
136: new WMSElement("KeywordList", _KeywordListType
137: .getInstance()),
138: new WMSElement("Keyword", _KeywordType.getInstance()),
139: new WMSElement("Keywords", _KeywordsType.getInstance()),
140: new WMSElement("OnlineResource", _OnlineResourceType
141: .getInstance()),
142: new WMSElement("Format", _FormatType.getInstance()),
143:
144: new WMSElement("Service", _ServiceType.getInstance()),
145: new WMSElement("ContactInformation",
146: _ContactInformationType.getInstance()),
147: new WMSElement("ContactPersonPrimary",
148: _ContactPersonPrimaryType.getInstance()),
149: new WMSElement("ContactPerson", XSISimpleTypes.String
150: .getInstance()),
151: new WMSElement("ContactOrganization", XSISimpleTypes.String
152: .getInstance()),
153: new WMSElement("ContactPosition", XSISimpleTypes.String
154: .getInstance()),
155: new WMSElement("ContactAddress", _ContactAddressType
156: .getInstance()),
157: new WMSElement("AddressType", XSISimpleTypes.String
158: .getInstance()),
159: new WMSElement("Address", XSISimpleTypes.String
160: .getInstance()),
161: new WMSElement("City", XSISimpleTypes.String.getInstance()),
162: new WMSElement("StateOrProvince", XSISimpleTypes.String
163: .getInstance()),
164: new WMSElement("PostCode", XSISimpleTypes.String
165: .getInstance()),
166: new WMSElement("Country", XSISimpleTypes.String
167: .getInstance()),
168: new WMSElement("ContactVoiceTelephone",
169: XSISimpleTypes.String.getInstance()),
170: new WMSElement("ContactFacsimileTelephone",
171: XSISimpleTypes.String.getInstance()),
172: new WMSElement("ContactElectronicMailAddress",
173: XSISimpleTypes.String.getInstance()),
174:
175: new WMSElement("Fees", XSISimpleTypes.String.getInstance()),
176: new WMSElement("AccessConstraints", XSISimpleTypes.String
177: .getInstance()),
178: new WMSElement("LayerLimit", XSISimpleTypes.PositiveInteger
179: .getInstance()),
180: new WMSElement("MaxWidth", XSISimpleTypes.PositiveInteger
181: .getInstance()),
182: new WMSElement("MaxHeight", XSISimpleTypes.PositiveInteger
183: .getInstance()),
184:
185: new WMSElement("Capability", _CapabilityType.getInstance()),
186: new WMSElement("VendorSpecificCapabilities",
187: _VendorSpecificCapabilitiesType.getInstance()),
188: new WMSElement("UserDefinedSymbolization",
189: _UserDefinedSymbolizationType.getInstance()),
190: new WMSElement("SupportedSLDVersion", XSISimpleTypes.String
191: .getInstance()),
192: new WMSElement("Request", _RequestType.getInstance()),
193:
194: new WMSElement("Capabilities", OperationType.getInstance()),
195: new WMSElement("GetCapabilities", OperationType
196: .getInstance()),
197:
198: new WMSElement("Map", OperationType.getInstance()),
199: new WMSElement("GetMap", OperationType.getInstance()),
200:
201: new WMSElement("FeatureInfo", OperationType.getInstance()),
202: new WMSElement("GetFeatureInfo", OperationType
203: .getInstance()),
204:
205: new WMSElement("DescribeLayer", OperationType.getInstance()),
206: new WMSElement("GetLegendGraphic", OperationType
207: .getInstance()),
208: new WMSElement("GetStyles", OperationType.getInstance()),
209: new WMSElement("PutStyles", OperationType.getInstance()),
210: new WMSElement("_ExtendedOperation", OperationType
211: .getInstance()), //is abstract
212:
213: new WMSElement("DCPType", _DCPTypeType.getInstance()),
214: new WMSElement("HTTP", _HTTPType.getInstance()),
215: new WMSElement("Get", _GetType.getInstance()),
216: new WMSElement("Post", _PostType.getInstance()),
217:
218: new WMSElement("Exception", _ExceptionType.getInstance()),
219: new WMSElement("_ExtendedCapabilities",
220: __ExtendedCapabilitiesType.getInstance()),
221:
222: new WMSElement("Layer", _LayerType.getInstance()),
223: new WMSElement("CRS", XSISimpleTypes.String.getInstance()),
224: new WMSElement("EX_GeographicBoundingBox",
225: _EX_GeographicBoundingBoxType.getInstance()),
226: new WMSElement("westBoundLongitude", LongitudeType
227: .getInstance()),
228: new WMSElement("eastBoundLongitude", LongitudeType
229: .getInstance()),
230: new WMSElement("southBoundLatitude", LatitudeType
231: .getInstance()),
232: new WMSElement("northBoundLatitude", LatitudeType
233: .getInstance()),
234: new WMSElement("LatLonBoundingBox", _LatLonBoundingBoxType
235: .getInstance()),
236: new WMSElement("BoundingBox", _BoundingBoxType
237: .getInstance()),
238: new WMSElement("Dimension", _DimensionType.getInstance()),
239: new WMSElement("Extent", _ExtentType.getInstance()),
240: new WMSElement("Attribution", _AttributionType
241: .getInstance()),
242: new WMSElement("LogoURL", _LogoURLType.getInstance()),
243: new WMSElement("MetadataURL", _MetadataURLType
244: .getInstance()),
245: new WMSElement("AuthorityURL", _AuthorityURLType
246: .getInstance()),
247: new WMSElement("Identifier", _IdentifierType.getInstance()),
248: new WMSElement("DataURL", _DataURLType.getInstance()),
249: new WMSElement("FeatureListURL", _FeatureListURLType
250: .getInstance()),
251: new WMSElement("Style", _StyleType.getInstance()),
252: new WMSElement("LegendURL", _LegendURLType.getInstance()),
253: new WMSElement("StyleSheetURL", _StyleSheetURLType
254: .getInstance()),
255: new WMSElement("StyleURL", _StyleURLType.getInstance()),
256: new WMSElement("MinScaleDenominator", XSISimpleTypes.Double
257: .getInstance()),
258: new WMSElement("MaxScaleDenominator", XSISimpleTypes.Double
259: .getInstance()),
260: new WMSElement("ScaleHint", _ScaleHintType.getInstance()),
261: new WMSElement("SRS", XSISimpleTypes.String.getInstance()),
262:
263: //1.0.0 format elements
264: new WMSElement("GIF", _GIFType.getInstance()),
265: new WMSElement("JPEG", _JPEGType.getInstance()),
266: new WMSElement("PNG", _PNGType.getInstance()),
267: new WMSElement("PPM", _PPMType.getInstance()),
268: new WMSElement("TIFF", _TIFFType.getInstance()),
269: new WMSElement("GeoTIFF", _GeoTIFFType.getInstance()),
270: new WMSElement("WebCGM", _WebCGMType.getInstance()),
271: new WMSElement("SVG", _SVGType.getInstance()),
272: new WMSElement("WMS_XML", _WMS_XMLType.getInstance()),
273: new WMSElement("GML.1", _GML_1Type.getInstance()),
274: new WMSElement("GML.2", _GML_2Type.getInstance()),
275: new WMSElement("GML.3", _GML_3Type.getInstance()),
276: new WMSElement("BMP", _BMPType.getInstance()),
277: new WMSElement("WBMP", _WBMPType.getInstance()),
278: new WMSElement("MIME", _MIMEType.getInstance()),
279: new WMSElement("INIMAGE", _INIMAGEType.getInstance()),
280: new WMSElement("BLANK", _BLANKType.getInstance()),
281: new WMSElement("CW_WKB", _CW_WKBType.getInstance()),
282:
283: new WMSElement("WMS_DescribeLayerResponse",
284: WMS_DescribeLayerResponse.getInstance()),
285: new WMSElement("LayerDescription", _LayerDescription
286: .getInstance()),
287: new WMSElement("Query", _Query.getInstance()),
288:
289: //Service Exception stuff
290: new WMSElement("WMTException", _WMTException.getInstance()),
291: new WMSElement("ServiceExceptionReport",
292: _ServiceExceptionReport.getInstance()),
293: new WMSElement("ServiceException", _ServiceException
294: .getInstance()),
295:
296: new WMSElement(IgnoreHandler.NAME,
297: new WMSSchema.WMSIgnoreType(), 0, Integer.MAX_VALUE) };
298:
299: static final ComplexType[] complexTypes = new ComplexType[] { OperationType
300: .getInstance() };
301:
302: static final SimpleType[] simpleTypes = new SimpleType[] {
303: new SimpleTypeGT(null, "longitudeType", NAMESPACE,
304: SimpleType.RESTRICTION,
305: new SimpleType[] { XSISimpleTypes.String
306: .getInstance() }, new Facet[] {
307: new FacetGT(Facet.MININCLUSIVE, "-180"),
308: new FacetGT(Facet.MAXINCLUSIVE, "180") },
309: SimpleType.NONE),
310:
311: new SimpleTypeGT(null, "latitudeType", NAMESPACE,
312: SimpleType.RESTRICTION,
313: new SimpleType[] { XSISimpleTypes.String
314: .getInstance() }, new Facet[] {
315: new FacetGT(Facet.MININCLUSIVE, "-90"),
316: new FacetGT(Facet.MAXINCLUSIVE, "90") },
317: SimpleType.NONE),
318:
319: };
320:
321: public AttributeGroup[] getAttributeGroups() {
322: return new AttributeGroup[0];
323: }
324:
325: public Attribute[] getAttributes() {
326: return new Attribute[0];
327: }
328:
329: public int getBlockDefault() {
330: return NONE;
331: }
332:
333: public ComplexType[] getComplexTypes() {
334: return complexTypes;
335: }
336:
337: public Element[] getElements() {
338: return elements;
339: }
340:
341: public int getFinalDefault() {
342: return NONE;
343: }
344:
345: public Group[] getGroups() {
346: return new Group[0];
347: }
348:
349: public String getId() {
350: return null;
351: }
352:
353: private static Schema[] imports = new Schema[] { XLinkSchema
354: .getInstance() };
355:
356: public Schema[] getImports() {
357: return imports;
358: }
359:
360: public String getPrefix() {
361: return "wms";
362: }
363:
364: public SimpleType[] getSimpleTypes() {
365: return simpleTypes;
366: }
367:
368: /* (non-Javadoc)
369: * @see org.geotools.xml.schema.Schema#getTargetNamespace()
370: */
371: public URI getTargetNamespace() {
372: return NAMESPACE;
373: }
374:
375: /* (non-Javadoc)
376: * @see org.geotools.xml.schema.Schema#getURI()
377: */
378: public URI getURI() {
379: return NAMESPACE;
380: }
381:
382: public String getVersion() {
383: return "1.3.0";
384: }
385:
386: /* (non-Javadoc)
387: * @see org.geotools.xml.schema.Schema#includesURI(java.net.URI)
388: */
389: public boolean includesURI(URI uri) {
390: //We don't need to read the definition at all
391: //--this is a specification, it shouldn't change.
392: return true;
393: }
394:
395: public boolean isAttributeFormDefault() {
396: return true;
397: }
398:
399: public boolean isElementFormDefault() {
400: return true;
401: }
402:
403: public static Schema getInstance() {
404: return instance;
405: }
406:
407: /**
408: * Returns the implementation hints. The default implementation returns en empty map.
409: */
410: public Map getImplementationHints() {
411: return Collections.EMPTY_MAP;
412: }
413:
414: // convinience method to deal with the URISyntaxException
415: private static URI makeURI(String s) {
416: try {
417: return new URI(s);
418: } catch (URISyntaxException e) {
419: // do nothing
420: return null;
421: }
422: }
423:
424: static class WMSElement implements Element {
425:
426: private int max;
427: private int min;
428: private String name;
429: private Type type;
430:
431: /**
432: * @param name
433: * @param type
434: */
435: public WMSElement(String name, Type type) {
436: super ();
437: this .name = name;
438: this .type = type;
439: this .min = 1;
440: this .max = 1;
441: }
442:
443: /**
444: * @param max
445: * @param min
446: * @param name
447: * @param type
448: */
449: public WMSElement(String name, Type type, int min, int max) {
450: super ();
451: this .max = max;
452: this .min = min;
453: this .name = name;
454: this .type = type;
455: }
456:
457: private WMSElement() {
458:
459: }
460:
461: public boolean isAbstract() {
462: return false;
463: }
464:
465: public int getBlock() {
466: return NONE;
467: }
468:
469: public String getDefault() {
470: //TODO terminate
471: return null;
472: }
473:
474: public int getFinal() {
475: return NONE;
476: }
477:
478: public String getFixed() {
479: // TODO Terminate
480: return null;
481: }
482:
483: public boolean isForm() {
484: // TODO Terminate
485: return false;
486: }
487:
488: public String getId() {
489: return null;
490: }
491:
492: public int getMaxOccurs() {
493: // TODO Terminate
494: return max;
495: }
496:
497: public int getMinOccurs() {
498: // TODO Terminate
499: return min;
500: }
501:
502: public String getName() {
503: // TODO Terminate
504: return name;
505: }
506:
507: public URI getNamespace() {
508: return NAMESPACE;
509: }
510:
511: public boolean isNillable() {
512: // TODO Terminate
513: return false;
514: }
515:
516: public Element getSubstitutionGroup() {
517: // TODO Terminate
518: return null;
519: }
520:
521: public Type getType() {
522: // TODO Terminate
523: return type;
524: }
525:
526: /* (non-Javadoc)
527: * @see org.geotools.xml.schema.ElementGrouping#getGrouping()
528: */
529: public int getGrouping() {
530: // TODO Auto-generated method stub
531: return ELEMENT;
532: }
533:
534: /* (non-Javadoc)
535: * @see org.geotools.xml.schema.ElementGrouping#findChildElement(java.lang.String)
536: */
537: public Element findChildElement(String name) {
538: return (this .name != null && this .name.equals(name)) ? this
539: : null;
540: }
541:
542: public Element findChildElement(String localName,
543: URI namespaceURI) {
544: return (this .name != null && this .name.equals(name) && getNamespace()
545: .equals(namespaceURI)) ? this : null;
546: }
547: }
548:
549: static abstract class WMSComplexType implements ComplexType {
550:
551: public Type getParent() {
552: return null;
553: }
554:
555: public boolean isAbstract() {
556: return false;
557: }
558:
559: public String getAnyAttributeNameSpace() {
560: return null;
561: }
562:
563: public int getBlock() {
564: return NONE;
565: }
566:
567: public int getFinal() {
568: return NONE;
569: }
570:
571: public String getId() {
572: return null;
573: }
574:
575: public boolean isMixed() {
576: return false;
577: }
578:
579: public boolean isDerived() {
580: return false;
581: }
582:
583: public boolean cache(Element element, Map hints) {
584: return true;
585: }
586:
587: public URI getNamespace() {
588: return NAMESPACE;
589: }
590:
591: public Element findChildElement(String name) {
592: return (getChild() == null) ? null : getChild()
593: .findChildElement(name);
594: }
595:
596: protected boolean sameName(Element element, ElementValue value) {
597: return element.getName().equals(
598: value.getElement().getName());
599: }
600: }
601:
602: static abstract class WMSSimpleType implements SimpleType {
603:
604: public int getFinal() {
605: return NONE;
606: }
607:
608: public String getId() {
609: return null;
610: }
611:
612: public boolean canCreateAttributes(Attribute attribute,
613: Object value, Map hints) {
614: return false;
615: }
616:
617: public URI getNamespace() {
618: return NAMESPACE;
619: }
620:
621: public Element findChildElement(String name) {
622: return null;
623: }
624:
625: public AttributeValue toAttribute(Attribute attribute,
626: Object value, Map hints)
627: throws OperationNotSupportedException {
628: return new AttributeValueGT(attribute, value.toString());
629: }
630: }
631:
632: static class WMSIgnoreType implements Type {
633:
634: /* (non-Javadoc)
635: * @see org.geotools.xml.schema.Type#canEncode(org.geotools.xml.schema.Element, java.lang.Object, java.util.Map)
636: */
637: public boolean canEncode(Element element, Object value,
638: Map hints) {
639: // TODO Auto-generated method stub
640: return false;
641: }
642:
643: /* (non-Javadoc)
644: * @see org.geotools.xml.schema.Type#encode(org.geotools.xml.schema.Element, java.lang.Object, org.geotools.xml.PrintHandler, java.util.Map)
645: */
646: public void encode(Element element, Object value,
647: PrintHandler output, Map hints) throws IOException,
648: OperationNotSupportedException {
649: // TODO Auto-generated method stub
650:
651: }
652:
653: /* (non-Javadoc)
654: * @see org.geotools.xml.schema.Type#findChildElement(java.lang.String)
655: */
656: public Element findChildElement(String name) {
657: // TODO Auto-generated method stub
658: return null;
659: }
660:
661: /* (non-Javadoc)
662: * @see org.geotools.xml.schema.Type#getInstanceType()
663: */
664: public Class getInstanceType() {
665: // TODO Auto-generated method stub
666: return null;
667: }
668:
669: /* (non-Javadoc)
670: * @see org.geotools.xml.schema.Type#getName()
671: */
672: public String getName() {
673: // TODO Auto-generated method stub
674: return "Ignore";
675: }
676:
677: /* (non-Javadoc)
678: * @see org.geotools.xml.schema.Type#getNamespace()
679: */
680: public URI getNamespace() {
681: return NAMESPACE;
682: }
683:
684: /* (non-Javadoc)
685: * @see org.geotools.xml.schema.Type#getValue(org.geotools.xml.schema.Element, org.geotools.xml.schema.ElementValue[], org.xml.sax.Attributes, java.util.Map)
686: */
687: public Object getValue(Element element, ElementValue[] value,
688: Attributes attrs, Map hints) throws SAXException,
689: OperationNotSupportedException {
690: // TODO Auto-generated method stub
691: return null;
692: }
693: }
694:
695: static class WMSAttribute extends AttributeGT {
696:
697: public WMSAttribute(String id, String name, URI namespace,
698: SimpleType type, int use, String _default,
699: String fixed, boolean form) {
700: super (id, name, namespace, type, use, _default, fixed, form);
701: }
702:
703: public WMSAttribute(String name, SimpleType simpleType) {
704: super (null, name, WMSSchema.NAMESPACE, simpleType,
705: OPTIONAL, null, null, false);
706: }
707: }
708: }
|