Statistics
| Revision:

gvsig-raster / org.gvsig.raster.wmts / trunk / org.gvsig.raster.wmts / org.gvsig.raster.wmts.ogc / org.gvsig.raster.wmts.ogc.api / src / main / java / org / gvsig / raster / wmts / ogc / exception / DownloadException.java @ 1806

History | View | Annotate | Download (2.3 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
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
*/
22
package org.gvsig.raster.wmts.ogc.exception;
23

    
24
import java.util.Hashtable;
25
import java.util.Map;
26

    
27
/**
28
 * @author Nacho Brodin (nachobrodin@gmail.com)
29
 */
30
public class DownloadException extends Exception {
31
    private static final long serialVersionUID = 1476084093500156070L;
32
    private String            wmtsCode         = null;
33
    protected String          formatString     = null;
34
    protected String          messageKey       = null;
35
    protected long            code             = 0;
36

    
37
    public DownloadException() {                
38
        init();                        
39
    }        
40

    
41
    public DownloadException(Throwable cause) {                
42
        init();        
43
        initCause(cause);
44
    }
45
    
46
    public DownloadException(String msg, Throwable cause) {                
47
        init();        
48
        initCause(cause);
49
        this.formatString = msg;
50
    }
51

    
52
    public DownloadException(String wfsCode,String message) {                
53
        init();        
54
        formatString = message;
55
        this.wmtsCode = wfsCode;
56
    }        
57

    
58
    public DownloadException(String message) {        
59
        init(); 
60
        formatString = message;       
61
    }   
62

    
63
        protected Map values() {                
64
        Hashtable params;
65
        params = new Hashtable();                
66
        return params;
67
    }
68

    
69
    public void init() {
70
        messageKey = "wmts_exception";
71
        formatString = "WMTS Exception";
72
        code = serialVersionUID;
73
    }
74

    
75
    /**
76
     * @return Returns the wfsCode.
77
     */
78
    public String getWfsCode() {
79
        return wmtsCode;
80
    }        
81
}