01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2005-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2005, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.referencing.operation;
18:
19: // OpenGIS dependencies
20: import org.opengis.referencing.FactoryException;
21: import org.opengis.referencing.operation.TransformException;
22: import org.opengis.referencing.operation.CoordinateOperation; // For javadoc
23: import org.opengis.referencing.operation.CoordinateOperationFactory; // For javadoc
24: import org.opengis.referencing.operation.OperationNotFoundException; // For javadoc
25:
26: /**
27: * Thrown when a transformation can't be performed because no path from
28: * {@linkplain CoordinateOperation#getSourceCRS source CRS} to
29: * {@linkplain CoordinateOperation#getTargetCRS target CRS} has been found.
30: * This exception usually wraps an {@link OperationNotFoundException} thrown
31: * by an {@linkplain CoordinateOperationFactory coordinate operation factory}.
32: * This exception is sometime used in order to collapse a
33: *
34: * <blockquote><pre>
35: * throws FactoryException, TransformException
36: * </pre></blockquote>
37: *
38: * clause (in method signature) into a single
39: *
40: * <blockquote><pre>
41: * throws TransformException
42: * </pre></blockquote>
43: *
44: * clause, i.e. in order to hide the factory step into a more general transformation processus
45: * from the API point of view.
46: *
47: * @since 2.2
48: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/referencing/src/main/java/org/geotools/referencing/operation/TransformPathNotFoundException.java $
49: * @version $Id: TransformPathNotFoundException.java 20874 2006-08-07 10:00:01Z jgarnett $
50: * @author Martin Desruisseaux
51: */
52: public class TransformPathNotFoundException extends TransformException {
53: /**
54: * Serial number for interoperability with different versions.
55: */
56: private static final long serialVersionUID = 5072333160296464925L;
57:
58: /**
59: * Constructs an exception with no detail message.
60: */
61: public TransformPathNotFoundException() {
62: }
63:
64: /**
65: * Constructs an exception with the specified detail message.
66: *
67: * @param cause The cause for this exception. The cause is saved
68: * for later retrieval by the {@link #getCause()} method.
69: */
70: public TransformPathNotFoundException(FactoryException cause) {
71: super (cause.getLocalizedMessage(), cause);
72: }
73:
74: /**
75: * Constructs an exception with the specified detail message.
76: *
77: * @param message The detail message. The detail message is saved
78: * for later retrieval by the {@link #getMessage()} method.
79: */
80: public TransformPathNotFoundException(String message) {
81: super (message);
82: }
83:
84: /**
85: * Constructs an exception with the specified detail message and cause.
86: *
87: * @param message The detail message. The detail message is saved
88: * for later retrieval by the {@link #getMessage()} method.
89: * @param cause The cause for this exception. The cause is saved
90: * for later retrieval by the {@link #getCause()} method.
91: */
92: public TransformPathNotFoundException(String message,
93: FactoryException cause) {
94: super(message, cause);
95: }
96: }
|