Statistics
| Revision:

gvsig-gdal / trunk / org.gvsig.gdal2 / org.gvsig.gdal2.prov / org.gvsig.gdal2.prov.ogr / src / main / java / org / gvsig / gdal / prov / ogr / OGRUnsupportedFormatException.java @ 368

History | View | Annotate | Download (2.65 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2016 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.gdal.prov.ogr;
25

    
26
import java.util.Map;
27

    
28
import org.gvsig.fmap.dal.exception.DataException;
29

    
30
/**
31
 * 
32
 * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
33
 *
34
 */
35
@SuppressWarnings("unchecked")
36
public class OGRUnsupportedFormatException extends DataException {
37

    
38
    private static final long serialVersionUID = -2670314598211236837L;
39

    
40
    private final static String MESSAGE =
41
        "Unsupported vectorial format. There are not any OGR driver registered to open %(connectionString)";
42

    
43
    private final static String KEY = "_UnsupportedVectorialFormatException";
44

    
45
    /**
46
     * @param messageFormat
47
     *            Message format
48
     * @param cause
49
     *            Cause
50
     * @param messageKey
51
     *            Message key
52
     * @param code
53
     *            code
54
     * @param values
55
     *            Values
56
     */
57
    public OGRUnsupportedFormatException(String messageFormat, Throwable cause, String messageKey,
58
        long code, Map<Object, Object> values) {
59
        super(messageFormat, cause, messageKey, code);
60
        this.values.putAll(values);
61
    }
62

    
63
    /**
64
     * @param messageFormat
65
     *            Message format
66
     * @param cause
67
     *            Cause
68
     * @param values
69
     *            Values
70
     */
71
    public OGRUnsupportedFormatException(String messageFormat, Throwable cause,
72
        Map<Object, Object> values) {
73
        super(messageFormat, cause, KEY, serialVersionUID);
74
        this.values.putAll(values);
75
    }
76

    
77
    /**
78
     * @param connectionString
79
     *            Conenction string
80
     */
81
    public OGRUnsupportedFormatException(String connectionString) {
82
        super(MESSAGE, KEY, serialVersionUID);
83
        this.values.put("connectionString", connectionString);
84
    }
85

    
86
}