Source Code Cross Referenced for OrdinateOutsideCoverageException.java in  » GIS » GeoTools-2.4.1 » org » geotools » coverage » 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 » GeoTools 2.4.1 » org.geotools.coverage 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2005-2006, Geotools Project Management Committee (PMC)
005:         *    (C) 2005, Institut de Recherche pour le Développement
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; either
010:         *    version 2.1 of the License, or (at your option) any later version.
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.coverage;
018:
019:        // J2SE dependencies
020:        import java.util.Date;
021:
022:        // OpenGIS dependencies
023:        import org.opengis.geometry.Envelope;
024:        import org.opengis.coverage.PointOutsideCoverageException;
025:
026:        // Geotools dependencies
027:        import org.geotools.resources.i18n.Errors;
028:        import org.geotools.resources.i18n.ErrorKeys;
029:
030:        /**
031:         * Thrown when an {@code evaluate(...)} method method is invoked with a point outside coverage.
032:         * This subclass of {@code PointOutsideCoverage} exception is used when the dimension of the
033:         * out-of-bounds ordinate is known.
034:         *
035:         * @since 2.1
036:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/coverage/src/main/java/org/geotools/coverage/OrdinateOutsideCoverageException.java $
037:         * @version $Id: OrdinateOutsideCoverageException.java 24925 2007-03-27 20:12:08Z jgarnett $
038:         * @author Martin Desruisseaux
039:         */
040:        public class OrdinateOutsideCoverageException extends
041:                PointOutsideCoverageException {
042:            /**
043:             * Serial number for interoperability with different versions.
044:             */
045:            private static final long serialVersionUID = -4718948524305632185L;
046:
047:            /**
048:             * The dimension of the out-of-bounds ordinate.
049:             */
050:            private final int dimension;
051:
052:            /**
053:             * The coverage envelope, or {@code null} if unknown.
054:             */
055:            private final Envelope envelope;
056:
057:            /**
058:             * Creates an exception with the specified message.
059:             *
060:             * @param  message The detail message. The detail message is saved for 
061:             *         later retrieval by the {@link #getMessage()} method.
062:             * @param  dimension The dimension of the out-of-bounds ordinate.
063:             */
064:            public OrdinateOutsideCoverageException(final String message,
065:                    final int dimension) {
066:                super (message);
067:                this .dimension = dimension;
068:                this .envelope = null;
069:            }
070:
071:            /**
072:             * Creates an exception with the specified message.
073:             *
074:             * @param  message The detail message. The detail message is saved for 
075:             *         later retrieval by the {@link #getMessage()} method.
076:             * @param  dimension The dimension of the out-of-bounds ordinate.
077:             * @param  envelope The coverage envelope, or {@code null} if unknown.
078:             *
079:             * @since 2.3
080:             */
081:            public OrdinateOutsideCoverageException(final String message,
082:                    final int dimension, final Envelope envelope) {
083:                super (message);
084:                this .dimension = dimension;
085:                this .envelope = envelope;
086:            }
087:
088:            /**
089:             * Creates an exception with the specified cause and an automaticaly formatted message. This
090:             * constructor assumes that the out-of-bounds value was the temporal ordinate (i.e. the date).
091:             * This condition should be verified before to invoke this constructor. A localized error
092:             * message including the specified date is then formatted.
093:             * <p>
094:             * This constructor is for internal use by {@code evaluate(Point2D, Date, ...)} methods in
095:             * {@link SpatioTemporalCoverage3D}, in order to replace dates as numerical values by a more
096:             * explicit string. Users can still get the numerical value if they looks at the cause of this
097:             * exception.
098:             */
099:            OrdinateOutsideCoverageException(
100:                    final OrdinateOutsideCoverageException cause,
101:                    final Date date) {
102:                super (Errors.format(ErrorKeys.DATE_OUTSIDE_COVERAGE_$1, date));
103:                dimension = cause.dimension;
104:                envelope = cause.envelope;
105:                initCause(cause);
106:            }
107:
108:            /**
109:             * Returns the dimension of the out-of-bounds ordinate.
110:             */
111:            public int getOutOfBoundsDimension() {
112:                return dimension;
113:            }
114:
115:            /**
116:             * Returns the coverage envelope, or {@code null} if unknown.
117:             *
118:             * @since 2.3
119:             */
120:            public Envelope getCoverageEnvelope() {
121:                return envelope;
122:            }
123:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.