Source Code Cross Referenced for CoverageConfig.java in  » GIS » GeoServer » org » vfny » geoserver » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.vfny.geoserver.config 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org.  All rights reserved.
0002:         * This code is licensed under the GPL 2.0 license, availible at the root
0003:         * application directory.
0004:         */
0005:        package org.vfny.geoserver.config;
0006:
0007:        import org.geotools.coverage.Category;
0008:        import org.geotools.coverage.GridSampleDimension;
0009:        import org.geotools.coverage.grid.GridCoverage2D;
0010:        import org.geotools.coverage.grid.GridGeometry2D;
0011:        import org.geotools.coverage.grid.io.AbstractGridCoverage2DReader;
0012:        import org.geotools.coverage.grid.io.AbstractGridFormat;
0013:        import org.geotools.geometry.GeneralEnvelope;
0014:        import org.opengis.coverage.grid.Format;
0015:        import org.opengis.coverage.grid.GridGeometry;
0016:        import org.opengis.metadata.Identifier;
0017:        import org.opengis.parameter.ParameterValueGroup;
0018:        import org.opengis.referencing.FactoryException;
0019:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
0020:        import org.opengis.referencing.operation.TransformException;
0021:        import org.opengis.util.InternationalString;
0022:        import org.vfny.geoserver.global.ConfigurationException;
0023:        import org.vfny.geoserver.global.CoverageDimension;
0024:        import org.vfny.geoserver.global.MetaDataLink;
0025:        import org.vfny.geoserver.global.dto.CoverageInfoDTO;
0026:        import org.vfny.geoserver.util.CoverageStoreUtils;
0027:        import org.vfny.geoserver.util.CoverageUtils;
0028:        import java.io.IOException;
0029:        import java.io.UnsupportedEncodingException;
0030:        import java.util.ArrayList;
0031:        import java.util.Iterator;
0032:        import java.util.List;
0033:        import java.util.Locale;
0034:        import java.util.Map;
0035:        import java.util.Set;
0036:        import javax.servlet.http.HttpServletRequest;
0037:        import javax.units.Unit;
0038:
0039:        /**
0040:         * User interface Coverage staging area.
0041:         *
0042:         * @author dzwiers, Refractions Research, Inc.
0043:         * @author $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last
0044:         *         modification)
0045:         * @author $Author: Simone Giannecchini (simboss1@gmail.com) $ (last
0046:         *         modification)
0047:         * @version $Id: CoverageConfig.java 7937 2007-12-05 15:06:07Z aaime $
0048:         */
0049:        public class CoverageConfig {
0050:            /**
0051:             *
0052:             */
0053:            private String formatId;
0054:
0055:            /**
0056:             *
0057:             */
0058:            private String name;
0059:
0060:            /**
0061:             *
0062:             */
0063:            private String wmsPath;
0064:
0065:            /**
0066:             *
0067:             */
0068:            private String label;
0069:
0070:            /**
0071:             *
0072:             */
0073:            private String description;
0074:
0075:            /**
0076:             *
0077:             */
0078:            private MetaDataLink metadataLink;
0079:
0080:            /**
0081:             *
0082:             */
0083:            private String dirName;
0084:
0085:            /**
0086:             *
0087:             */
0088:            private List keywords;
0089:
0090:            /**
0091:             *
0092:             */
0093:            private GeneralEnvelope envelope;
0094:
0095:            /**
0096:             *
0097:             */
0098:            private GeneralEnvelope lonLatWGS84Envelope;
0099:
0100:            /**
0101:             *
0102:             */
0103:            private GridGeometry grid;
0104:
0105:            /**
0106:             *
0107:             */
0108:            private CoverageDimension[] dimensions;
0109:
0110:            /**
0111:             *
0112:             */
0113:            private InternationalString[] dimentionNames;
0114:
0115:            /**
0116:             *
0117:             */
0118:            private List requestCRSs;
0119:
0120:            /**
0121:             *
0122:             */
0123:            private List responseCRSs;
0124:
0125:            /**
0126:             *
0127:             */
0128:            private String nativeFormat;
0129:
0130:            /**
0131:             *
0132:             */
0133:            private List supportedFormats;
0134:
0135:            /**
0136:             *
0137:             */
0138:            private String defaultInterpolationMethod;
0139:
0140:            /**
0141:             *
0142:             */
0143:            private List interpolationMethods;
0144:
0145:            /**
0146:             *
0147:             */
0148:            private String srsName;
0149:
0150:            /**
0151:             *
0152:             */
0153:            private String srsWKT;
0154:
0155:            /**
0156:             *
0157:             */
0158:            private CoordinateReferenceSystem crs;
0159:
0160:            /**
0161:             * The default style name.
0162:             */
0163:            private String defaultStyle;
0164:
0165:            /**
0166:             * Other WMS Styles
0167:             */
0168:            private ArrayList styles;
0169:
0170:            /**
0171:             * String representation of connection parameter values
0172:             */
0173:            private Map parameters;
0174:
0175:            /**
0176:             * Package visible constructor for test cases
0177:             */
0178:            CoverageConfig() {
0179:            }
0180:
0181:            /**
0182:             * Creating a coverage config from gridcoverages information
0183:             *
0184:             * @param formatId
0185:             * @param format
0186:             * @param gc
0187:             * @throws ConfigurationException
0188:             */
0189:            public CoverageConfig(String formatId, Format format,
0190:                    AbstractGridCoverage2DReader reader,
0191:                    HttpServletRequest request) throws ConfigurationException {
0192:                if ((formatId == null) || (formatId.length() == 0)) {
0193:                    throw new IllegalArgumentException(
0194:                            "formatId is required for CoverageConfig");
0195:                }
0196:
0197:                if (format == null) {
0198:                    throw new ConfigurationException(new StringBuffer(
0199:                            "Cannot handle format: ").append(formatId)
0200:                            .toString());
0201:                }
0202:
0203:                this .formatId = formatId;
0204:
0205:                final DataConfig dataConfig = getDataConfig(request);
0206:                final CoverageStoreConfig cvConfig = dataConfig
0207:                        .getDataFormat(formatId);
0208:
0209:                if (cvConfig == null) {
0210:                    // something is horribly wrong no FormatID selected!
0211:                    // The JSP needs to not include us if there is no
0212:                    // selected Format
0213:                    //
0214:                    throw new RuntimeException(
0215:                            "selectedCoverageSetId required in Session");
0216:                }
0217:
0218:                crs = reader.getCrs();
0219:                srsName = (((crs != null) && !crs.getIdentifiers().isEmpty()) ? crs
0220:                        .getIdentifiers().toArray()[0].toString()
0221:                        : "UNKNOWN");
0222:                srsWKT = ((crs != null) ? crs.toWKT() : "UNKNOWN");
0223:                envelope = reader.getOriginalEnvelope();
0224:
0225:                try {
0226:                    lonLatWGS84Envelope = CoverageStoreUtils
0227:                            .getWGS84LonLatEnvelope(envelope);
0228:                } catch (IndexOutOfBoundsException e) {
0229:                    final ConfigurationException newEx = new ConfigurationException(
0230:                            new StringBuffer(
0231:                                    "Converting Envelope to Lat-Lon WGS84: ")
0232:                                    .append(e.toString()).toString());
0233:                    newEx.initCause(e);
0234:                    throw newEx;
0235:                } catch (FactoryException e) {
0236:                    final ConfigurationException newEx = new ConfigurationException(
0237:                            new StringBuffer(
0238:                                    "Converting Envelope to Lat-Lon WGS84: ")
0239:                                    .append(e.toString()).toString());
0240:                    newEx.initCause(e);
0241:                    throw newEx;
0242:                } catch (TransformException e) {
0243:                    final ConfigurationException newEx = new ConfigurationException(
0244:                            new StringBuffer(
0245:                                    "Converting Envelope to Lat-Lon WGS84: ")
0246:                                    .append(e.toString()).toString());
0247:                    newEx.initCause(e);
0248:                    throw newEx;
0249:                }
0250:
0251:                /**
0252:                 * Now reading a fake small GridCoverage just to retrieve meta information:
0253:                 * - calculating a new envelope which is 1/20 of the original one
0254:                 * - reading the GridCoverage subset
0255:                 */
0256:                final GridCoverage2D gc;
0257:
0258:                try {
0259:                    final ParameterValueGroup readParams = format
0260:                            .getReadParameters();
0261:                    final Map parameters = CoverageUtils
0262:                            .getParametersKVP(readParams);
0263:
0264:                    double[] minCP = envelope.getLowerCorner().getCoordinates();
0265:                    double[] maxCP = new double[] {
0266:                            minCP[0] + (envelope.getLength(0) / 20.0),
0267:                            minCP[1] + (envelope.getLength(1) / 20.0) };
0268:                    final GeneralEnvelope subEnvelope = new GeneralEnvelope(
0269:                            minCP, maxCP);
0270:                    subEnvelope.setCoordinateReferenceSystem(reader.getCrs());
0271:
0272:                    parameters.put(AbstractGridFormat.READ_GRIDGEOMETRY2D
0273:                            .getName().toString(), new GridGeometry2D(reader
0274:                            .getOriginalGridRange(), subEnvelope));
0275:                    gc = (GridCoverage2D) reader.read(CoverageUtils
0276:                            .getParameters(readParams, parameters, true));
0277:                    // //
0278:                    // AlFa: Getting the original coverage GridGeometry
0279:                    // //
0280:                    grid = gc.getGridGeometry();
0281:                    dimensions = parseCoverageDimesions(gc
0282:                            .getSampleDimensions());
0283:                } catch (UnsupportedEncodingException e) {
0284:                    final ConfigurationException newEx = new ConfigurationException(
0285:                            new StringBuffer("Coverage dimensions: ").append(
0286:                                    e.toString()).toString());
0287:                    newEx.initCause(e);
0288:                    throw newEx;
0289:                } catch (IllegalArgumentException e) {
0290:                    final ConfigurationException newEx = new ConfigurationException(
0291:                            new StringBuffer("Coverage dimensions: ").append(
0292:                                    e.toString()).toString());
0293:                    newEx.initCause(e);
0294:                    throw newEx;
0295:                } catch (IOException e) {
0296:                    final ConfigurationException newEx = new ConfigurationException(
0297:                            new StringBuffer("Coverage dimensions: ").append(
0298:                                    e.toString()).toString());
0299:                    newEx.initCause(e);
0300:                    throw newEx;
0301:                }
0302:
0303:                dimentionNames = gc.getDimensionNames();
0304:
0305:                final DataConfig config = ConfigRequests.getDataConfig(request);
0306:                StringBuffer cvName = new StringBuffer(gc.getName().toString());
0307:                int count = 0;
0308:                StringBuffer key;
0309:                Map coverages;
0310:                Set cvKeySet;
0311:                boolean key_exists;
0312:                String cvKey;
0313:                Iterator it;
0314:
0315:                while (true) {
0316:                    key = new StringBuffer(gc.getName().toString());
0317:
0318:                    if (count > 0) {
0319:                        key.append("_").append(count) /*.append("]")*/;
0320:                    }
0321:
0322:                    coverages = config.getCoverages();
0323:                    cvKeySet = coverages.keySet();
0324:                    key_exists = false;
0325:
0326:                    for (it = cvKeySet.iterator(); it.hasNext();) {
0327:                        cvKey = ((String) it.next()).toLowerCase();
0328:
0329:                        if (cvKey.endsWith(key.toString().toLowerCase())) {
0330:                            key_exists = true;
0331:                        }
0332:                    }
0333:
0334:                    if (!key_exists) {
0335:                        cvName = key;
0336:
0337:                        break;
0338:                    } else {
0339:                        count++;
0340:                    }
0341:                }
0342:
0343:                name = cvName.toString();
0344:                wmsPath = "/";
0345:                label = new StringBuffer(name).append(" is a ").append(
0346:                        format.getDescription()).toString();
0347:                description = new StringBuffer("Generated from ").append(
0348:                        formatId).toString();
0349:                metadataLink = new MetaDataLink();
0350:                metadataLink.setAbout(format.getDocURL());
0351:                metadataLink.setMetadataType("other");
0352:                keywords = new ArrayList(10);
0353:                keywords.add("WCS");
0354:                keywords.add(formatId);
0355:                keywords.add(name);
0356:                nativeFormat = format.getName();
0357:                dirName = new StringBuffer(formatId).append("_").append(name)
0358:                        .toString();
0359:                requestCRSs = new ArrayList(10);
0360:
0361:                if ((gc.getCoordinateReferenceSystem2D().getIdentifiers() != null)
0362:                        && !gc.getCoordinateReferenceSystem2D()
0363:                                .getIdentifiers().isEmpty()) {
0364:                    requestCRSs.add(((Identifier) gc
0365:                            .getCoordinateReferenceSystem2D().getIdentifiers()
0366:                            .toArray()[0]).toString());
0367:                }
0368:
0369:                responseCRSs = new ArrayList(10);
0370:
0371:                if ((gc.getCoordinateReferenceSystem2D().getIdentifiers() != null)
0372:                        && !gc.getCoordinateReferenceSystem2D()
0373:                                .getIdentifiers().isEmpty()) {
0374:                    responseCRSs.add(((Identifier) gc
0375:                            .getCoordinateReferenceSystem2D().getIdentifiers()
0376:                            .toArray()[0]).toString());
0377:                }
0378:
0379:                supportedFormats = new ArrayList(10);
0380:
0381:                final List formats = CoverageStoreUtils.listDataFormats();
0382:                String fName;
0383:                Format fTmp;
0384:
0385:                for (Iterator i = formats.iterator(); i.hasNext();) {
0386:                    fTmp = (Format) i.next();
0387:                    fName = fTmp.getName();
0388:
0389:                    if (fName.equalsIgnoreCase("WorldImage")) {
0390:                        /*
0391:                         * final String[] formatNames = ImageIO.getReaderFormatNames();
0392:                         * final int length = formatNames.length; for (int f=0; f<length;
0393:                         * f++) { // TODO check if coverage can encode Format
0394:                         * supportedFormats.add(formatNames[f]); }
0395:                         */
0396:
0397:                        // TODO check if coverage can encode Format
0398:                        supportedFormats.add("GIF");
0399:                        supportedFormats.add("PNG");
0400:                        supportedFormats.add("JPEG");
0401:                        supportedFormats.add("TIFF");
0402:                    } else if (fName.toLowerCase().startsWith("geotiff")) {
0403:                        // TODO check if coverage can encode Format
0404:                        supportedFormats.add("GeoTIFF");
0405:                    } else {
0406:                        // TODO check if coverage can encode Format
0407:                        supportedFormats.add(fName);
0408:                    }
0409:                }
0410:
0411:                defaultInterpolationMethod = "nearest neighbor"; // TODO make me
0412:                // parametric
0413:
0414:                interpolationMethods = new ArrayList(10);
0415:                interpolationMethods.add("nearest neighbor");
0416:                interpolationMethods.add("bilinear");
0417:                interpolationMethods.add("bicubic");
0418:                //interpolationMethods.add("bicubic_2");
0419:                defaultStyle = "raster";
0420:                styles = new ArrayList();
0421:
0422:                /**
0423:                 * ReadParameters ...
0424:                 */
0425:                parameters = CoverageUtils.getParametersKVP(format
0426:                        .getReadParameters());
0427:            }
0428:
0429:            /**
0430:             * @param sampleDimensions
0431:             * @return
0432:             * @throws UnsupportedEncodingException
0433:             */
0434:            private CoverageDimension[] parseCoverageDimesions(
0435:                    GridSampleDimension[] sampleDimensions)
0436:                    throws UnsupportedEncodingException {
0437:                final int length = sampleDimensions.length;
0438:                CoverageDimension[] dims = new CoverageDimension[length];
0439:
0440:                for (int i = 0; i < length; i++) {
0441:                    dims[i] = new CoverageDimension();
0442:                    dims[i].setName(sampleDimensions[i].getDescription()
0443:                            .toString(Locale.getDefault()));
0444:
0445:                    StringBuffer label = new StringBuffer("GridSampleDimension"
0446:                            .intern());
0447:                    final Unit uom = sampleDimensions[i].getUnits();
0448:
0449:                    if (uom != null) {
0450:                        label.append("(".intern());
0451:                        parseUom(label, uom);
0452:                        label.append(")".intern());
0453:                    }
0454:
0455:                    label.append("[".intern());
0456:                    label.append(sampleDimensions[i].getMinimumValue());
0457:                    label.append(",".intern());
0458:                    label.append(sampleDimensions[i].getMaximumValue());
0459:                    label.append("]".intern());
0460:                    dims[i].setDescription(label.toString());
0461:                    dims[i].setRange(sampleDimensions[i].getRange());
0462:
0463:                    final List categories = sampleDimensions[i].getCategories();
0464:
0465:                    Category cat = null;
0466:
0467:                    for (Iterator c_iT = categories.iterator(); c_iT.hasNext();) {
0468:                        cat = (Category) c_iT.next();
0469:
0470:                        if ((cat != null)
0471:                                && cat.getName().toString().equalsIgnoreCase(
0472:                                        "no data")) {
0473:                            double min = cat.getRange().getMinimum();
0474:                            double max = cat.getRange().getMaximum();
0475:
0476:                            dims[i]
0477:                                    .setNullValues(((min == max) ? new Double[] { new Double(
0478:                                            min) }
0479:                                            : new Double[] { new Double(min),
0480:                                                    new Double(max) }));
0481:                        }
0482:                    }
0483:
0484:                    /*double[] nTemp = sampleDimensions[i].getNoDataValues();
0485:                    if (nTemp != null) {
0486:                            final int ntLength = nTemp.length;
0487:                            Double[] nulls = new Double[ntLength];
0488:                            for (int nd = 0; nd < ntLength; nd++) {
0489:                                    nulls[nd] = new Double(nTemp[nd]);
0490:                            }
0491:                            dims[i].setNullValues(nulls);
0492:                    }*/
0493:                }
0494:
0495:                return dims;
0496:            }
0497:
0498:            /**
0499:             * This method tries to put in order problems with 16 bits characters.
0500:             *
0501:             * @param label2
0502:             * @param uom
0503:             */
0504:            private void parseUom(StringBuffer label2, Unit uom) {
0505:                String uomString = uom.toString();
0506:                uomString = uomString.replaceAll("�", "^2");
0507:                uomString = uomString.replaceAll("�", "^3");
0508:                uomString = uomString.replaceAll("�", "A");
0509:                uomString = uomString.replaceAll("�", "");
0510:                label2.append(uomString);
0511:            }
0512:
0513:            public CoverageConfig(CoverageInfoDTO dto) {
0514:                if (dto == null) {
0515:                    throw new NullPointerException(
0516:                            "Non null CoverageInfoDTO required");
0517:                }
0518:
0519:                formatId = dto.getFormatId();
0520:                name = dto.getName();
0521:                wmsPath = dto.getWmsPath();
0522:                label = dto.getLabel();
0523:                description = dto.getDescription();
0524:                metadataLink = dto.getMetadataLink();
0525:                keywords = dto.getKeywords();
0526:                crs = dto.getCrs();
0527:                srsName = dto.getSrsName();
0528:                srsWKT = dto.getSrsWKT();
0529:                envelope = dto.getEnvelope();
0530:                lonLatWGS84Envelope = dto.getLonLatWGS84Envelope();
0531:                grid = dto.getGrid();
0532:                dimensions = dto.getDimensions();
0533:                dimentionNames = dto.getDimensionNames();
0534:                nativeFormat = dto.getNativeFormat();
0535:                dirName = dto.getDirName();
0536:                requestCRSs = dto.getRequestCRSs();
0537:                responseCRSs = dto.getResponseCRSs();
0538:                supportedFormats = dto.getSupportedFormats();
0539:                defaultInterpolationMethod = dto
0540:                        .getDefaultInterpolationMethod();
0541:                interpolationMethods = dto.getInterpolationMethods();
0542:                defaultStyle = dto.getDefaultStyle();
0543:                styles = dto.getStyles();
0544:                parameters = dto.getParameters();
0545:            }
0546:
0547:            public CoverageInfoDTO toDTO() {
0548:                CoverageInfoDTO c = new CoverageInfoDTO();
0549:                c.setFormatId(formatId);
0550:                c.setName(name);
0551:                c.setWmsPath(wmsPath);
0552:                c.setLabel(label);
0553:                c.setDescription(description);
0554:                c.setMetadataLink(metadataLink);
0555:                c.setKeywords(keywords);
0556:                c.setCrs(crs);
0557:                c.setSrsName(srsName);
0558:                c.setSrsWKT(srsWKT);
0559:                c.setEnvelope(envelope);
0560:                c.setLonLatWGS84Envelope(lonLatWGS84Envelope);
0561:                c.setGrid(grid);
0562:                c.setDimensions(dimensions);
0563:                c.setDimensionNames(dimentionNames);
0564:                c.setNativeFormat(nativeFormat);
0565:                c.setDirName(dirName);
0566:                c.setRequestCRSs(requestCRSs);
0567:                c.setResponseCRSs(responseCRSs);
0568:                c.setSupportedFormats(supportedFormats);
0569:                c.setDefaultInterpolationMethod(defaultInterpolationMethod);
0570:                c.setInterpolationMethods(interpolationMethods);
0571:                c.setDefaultStyle(defaultStyle);
0572:                c.setStyles(styles);
0573:                c.setParameters(parameters);
0574:
0575:                return c;
0576:            }
0577:
0578:            /**
0579:             * Access Catalog Configuration Model from the WebContainer.
0580:             *
0581:             * @param request
0582:             *
0583:             * @return Configuration model for Catalog information.
0584:             */
0585:            protected DataConfig getDataConfig(HttpServletRequest request) {
0586:                return (DataConfig) request.getSession().getServletContext()
0587:                        .getAttribute(DataConfig.CONFIG_KEY);
0588:            }
0589:
0590:            public String getKey() {
0591:                return getFormatId() + DataConfig.SEPARATOR + getName();
0592:            }
0593:
0594:            public String toString() {
0595:                return "CoverageConfig[name: " + name + " dewcription: "
0596:                        + description + " srsName: " + srsName + "]";
0597:            }
0598:
0599:            /**
0600:             * @return Returns the defaultInterpolationMethod.
0601:             *
0602:             * @uml.property name="defaultInterpolationMethod"
0603:             */
0604:            public String getDefaultInterpolationMethod() {
0605:                return defaultInterpolationMethod;
0606:            }
0607:
0608:            /**
0609:             * @param defaultInterpolationMethod
0610:             *            The defaultInterpolationMethod to set.
0611:             *
0612:             * @uml.property name="defaultInterpolationMethod"
0613:             */
0614:            public void setDefaultInterpolationMethod(
0615:                    String defaultInterpolationMethod) {
0616:                this .defaultInterpolationMethod = defaultInterpolationMethod;
0617:            }
0618:
0619:            /**
0620:             * @return Returns the description.
0621:             *
0622:             * @uml.property name="description"
0623:             */
0624:            public String getDescription() {
0625:                return description;
0626:            }
0627:
0628:            /**
0629:             * @param description
0630:             *            The description to set.
0631:             *
0632:             * @uml.property name="description"
0633:             */
0634:            public void setDescription(String description) {
0635:                this .description = description;
0636:            }
0637:
0638:            /**
0639:             * @return Returns the dirName.
0640:             *
0641:             * @uml.property name="dirName"
0642:             */
0643:            public String getDirName() {
0644:                return dirName;
0645:            }
0646:
0647:            /**
0648:             * @param dirName
0649:             *            The dirName to set.
0650:             *
0651:             * @uml.property name="dirName"
0652:             */
0653:            public void setDirName(String dirName) {
0654:                this .dirName = dirName;
0655:            }
0656:
0657:            /**
0658:             * @return Returns the envelope.
0659:             *
0660:             * @uml.property name="envelope"
0661:             */
0662:            public GeneralEnvelope getEnvelope() {
0663:                return envelope;
0664:            }
0665:
0666:            /**
0667:             * @param envelope
0668:             *            The envelope to set.
0669:             *
0670:             * @uml.property name="envelope"
0671:             */
0672:            public void setEnvelope(GeneralEnvelope envelope) {
0673:                this .envelope = envelope;
0674:            }
0675:
0676:            /**
0677:             * @return Returns the formatId.
0678:             *
0679:             * @uml.property name="formatId"
0680:             */
0681:            public String getFormatId() {
0682:                return formatId;
0683:            }
0684:
0685:            /**
0686:             * @param formatId
0687:             *            The formatId to set.
0688:             *
0689:             * @uml.property name="formatId"
0690:             */
0691:            public void setFormatId(String formatId) {
0692:                this .formatId = formatId;
0693:            }
0694:
0695:            /**
0696:             * @return Returns the interpolationMethods.
0697:             *
0698:             * @uml.property name="interpolationMethods"
0699:             */
0700:            public List getInterpolationMethods() {
0701:                return interpolationMethods;
0702:            }
0703:
0704:            /**
0705:             * @param interpolationMethods
0706:             *            The interpolationMethods to set.
0707:             *
0708:             * @uml.property name="interpolationMethods"
0709:             */
0710:            public void setInterpolationMethods(List interpolationMethods) {
0711:                this .interpolationMethods = interpolationMethods;
0712:            }
0713:
0714:            /**
0715:             * @return Returns the keywords.
0716:             *
0717:             * @uml.property name="keywords"
0718:             */
0719:            public List getKeywords() {
0720:                return keywords;
0721:            }
0722:
0723:            /**
0724:             * @param keywords
0725:             *            The keywords to set.
0726:             *
0727:             * @uml.property name="keywords"
0728:             */
0729:            public void setKeywords(List keywords) {
0730:                this .keywords = keywords;
0731:            }
0732:
0733:            /**
0734:             * @return Returns the label.
0735:             *
0736:             * @uml.property name="label"
0737:             */
0738:            public String getLabel() {
0739:                return label;
0740:            }
0741:
0742:            /**
0743:             * @param label
0744:             *            The label to set.
0745:             *
0746:             * @uml.property name="label"
0747:             */
0748:            public void setLabel(String label) {
0749:                this .label = label;
0750:            }
0751:
0752:            /**
0753:             * @return Returns the metadataLink.
0754:             *
0755:             * @uml.property name="metadataLink"
0756:             */
0757:            public MetaDataLink getMetadataLink() {
0758:                return metadataLink;
0759:            }
0760:
0761:            /**
0762:             * @param metadataLink
0763:             *            The metadataLink to set.
0764:             *
0765:             * @uml.property name="metadataLink"
0766:             */
0767:            public void setMetadataLink(MetaDataLink metadataLink) {
0768:                this .metadataLink = metadataLink;
0769:            }
0770:
0771:            /**
0772:             * @return Returns the name.
0773:             *
0774:             * @uml.property name="name"
0775:             */
0776:            public String getName() {
0777:                return name;
0778:            }
0779:
0780:            /**
0781:             * @param name
0782:             *            The name to set.
0783:             *
0784:             * @uml.property name="name"
0785:             */
0786:            public void setName(String name) {
0787:                this .name = name;
0788:            }
0789:
0790:            /**
0791:             * @return Returns the nativeFormat.
0792:             *
0793:             * @uml.property name="nativeFormat"
0794:             */
0795:            public String getNativeFormat() {
0796:                return nativeFormat;
0797:            }
0798:
0799:            /**
0800:             * @param nativeFormat
0801:             *            The nativeFormat to set.
0802:             *
0803:             * @uml.property name="nativeFormat"
0804:             */
0805:            public void setNativeFormat(String nativeFormat) {
0806:                this .nativeFormat = nativeFormat;
0807:            }
0808:
0809:            /**
0810:             * @return Returns the requestCRSs.
0811:             *
0812:             * @uml.property name="requestCRSs"
0813:             */
0814:            public List getRequestCRSs() {
0815:                return requestCRSs;
0816:            }
0817:
0818:            /**
0819:             * @param requestCRSs
0820:             *            The requestCRSs to set.
0821:             *
0822:             * @uml.property name="requestCRSs"
0823:             */
0824:            public void setRequestCRSs(List requestCRSs) {
0825:                this .requestCRSs = requestCRSs;
0826:            }
0827:
0828:            /**
0829:             * @return Returns the responseCRSs.
0830:             *
0831:             * @uml.property name="responseCRSs"
0832:             */
0833:            public List getResponseCRSs() {
0834:                return responseCRSs;
0835:            }
0836:
0837:            /**
0838:             * @param responseCRSs
0839:             *            The responseCRSs to set.
0840:             *
0841:             * @uml.property name="responseCRSs"
0842:             */
0843:            public void setResponseCRSs(List responseCRSs) {
0844:                this .responseCRSs = responseCRSs;
0845:            }
0846:
0847:            /**
0848:             * @return Returns the srsName.
0849:             *
0850:             * @uml.property name="srsName"
0851:             */
0852:            public String getSrsName() {
0853:                return srsName;
0854:            }
0855:
0856:            /**
0857:             * @param srsName
0858:             *            The srsName to set.
0859:             *
0860:             * @uml.property name="srsName"
0861:             */
0862:            public void setSrsName(String srsName) {
0863:                this .srsName = srsName;
0864:            }
0865:
0866:            /**
0867:             * @return Returns the supportedFormats.
0868:             *
0869:             * @uml.property name="supportedFormats"
0870:             */
0871:            public List getSupportedFormats() {
0872:                return supportedFormats;
0873:            }
0874:
0875:            /**
0876:             * @param supportedFormats
0877:             *            The supportedFormats to set.
0878:             *
0879:             * @uml.property name="supportedFormats"
0880:             */
0881:            public void setSupportedFormats(List supportedFormats) {
0882:                this .supportedFormats = supportedFormats;
0883:            }
0884:
0885:            /**
0886:             *
0887:             * @uml.property name="crs"
0888:             */
0889:            public CoordinateReferenceSystem getCrs() {
0890:                return crs;
0891:            }
0892:
0893:            /**
0894:             *
0895:             * @uml.property name="crs"
0896:             */
0897:            public void setCrs(CoordinateReferenceSystem crs) {
0898:                this .crs = crs;
0899:            }
0900:
0901:            /**
0902:             *
0903:             * @uml.property name="grid"
0904:             */
0905:            public GridGeometry getGrid() {
0906:                return grid;
0907:            }
0908:
0909:            /**
0910:             *
0911:             * @uml.property name="grid"
0912:             */
0913:            public void setGrid(GridGeometry grid) {
0914:                this .grid = grid;
0915:            }
0916:
0917:            /**
0918:             *
0919:             * @uml.property name="dimentionNames"
0920:             */
0921:            public InternationalString[] getDimentionNames() {
0922:                return dimentionNames;
0923:            }
0924:
0925:            /**
0926:             *
0927:             * @uml.property name="dimentionNames"
0928:             */
0929:            public void setDimentionNames(InternationalString[] dimentionNames) {
0930:                this .dimentionNames = dimentionNames;
0931:            }
0932:
0933:            /**
0934:             * @return Returns the dimensions.
0935:             *
0936:             * @uml.property name="dimensions"
0937:             */
0938:            public CoverageDimension[] getDimensions() {
0939:                return dimensions;
0940:            }
0941:
0942:            /**
0943:             * @param dimensions
0944:             *            The dimensions to set.
0945:             *
0946:             * @uml.property name="dimensions"
0947:             */
0948:            public void setDimensions(CoverageDimension[] dimensions) {
0949:                this .dimensions = dimensions;
0950:            }
0951:
0952:            public String getDefaultStyle() {
0953:                return defaultStyle;
0954:            }
0955:
0956:            public void setDefaultStyle(String defaultStyle) {
0957:                this .defaultStyle = defaultStyle;
0958:            }
0959:
0960:            public ArrayList getStyles() {
0961:                return styles;
0962:            }
0963:
0964:            public void setStyles(ArrayList styles) {
0965:                this .styles = styles;
0966:            }
0967:
0968:            public void addStyle(String style) {
0969:                if (!this .styles.contains(style)) {
0970:                    this .styles.add(style);
0971:                }
0972:            }
0973:
0974:            public String getSrsWKT() {
0975:                return srsWKT;
0976:            }
0977:
0978:            public void setSrsWKT(String srsWKT) {
0979:                this .srsWKT = srsWKT;
0980:            }
0981:
0982:            public GeneralEnvelope getLonLatWGS84Envelope() {
0983:                return lonLatWGS84Envelope;
0984:            }
0985:
0986:            public String getWmsPath() {
0987:                return wmsPath;
0988:            }
0989:
0990:            public void setWmsPath(String wmsPath) {
0991:                this .wmsPath = wmsPath;
0992:            }
0993:
0994:            public Map getParameters() {
0995:                return parameters;
0996:            }
0997:
0998:            public synchronized void setParameters(Map parameters) {
0999:                this.parameters = parameters;
1000:            }
1001:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.