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 @ 1809

History | View | Annotate | Download (2.13 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

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

    
35
    public DownloadException() {                
36
        init();                        
37
    }        
38

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

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

    
56
    public DownloadException(String message) {        
57
        init(); 
58
        formatString = message;       
59
    }   
60

    
61
    public void init() {
62
        messageKey = "wmts_exception";
63
        formatString = "WMTS Exception";
64
        code = serialVersionUID;
65
    }
66

    
67
    /**
68
     * @return Returns the wfsCode.
69
     */
70
    public String getWfsCode() {
71
        return wmtsCode;
72
    }        
73
}