Revision 43

View differences:

org.gvsig.educa.thematicmap.app/trunk/org.gvsig.educa.thematicmap.app/org.gvsig.educa.thematicmap.app.viewer/src/main/resources/text.properties
1 1
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 2

  
3
_problems_loading_thematicmap_file_data = Se han econtrado problema al generar el Mapa tem\u00E1tico: id:%(id) ver:%(version) bn:%(buildNumber)
4

  
5
_thematic_map_not_found_installed = No se encontr\u00F3 el Mapa tem\u00E1tico instalado: id:%(id) ver:%(version) bn:%(buildNumber)
6

  
3 7
comments = Comentarios
4 8

  
5 9
name_is_required = El nombre es obligatorio
org.gvsig.educa.thematicmap.app/trunk/org.gvsig.educa.thematicmap.app/org.gvsig.educa.thematicmap.app.viewer/src/main/resources/text_en.properties
1 1
#Generated by ResourceBundle Editor (http://eclipse-rbe.sourceforge.net)
2 2

  
3
_problems_loading_thematicmap_file_data = Problems loading ThematicMap: id:%(id) ver:%(version) bn:%(buildNumber)
4

  
5
_thematic_map_not_found_installed = Thematic Map not found installed: id:%(id) ver:%(version) bn:%(buildNumber)
6

  
3 7
comments = Comments
4 8

  
5 9
name_is_required = Name is required
org.gvsig.educa.thematicmap.app/trunk/org.gvsig.educa.thematicmap.app/org.gvsig.educa.thematicmap.app.viewer/src/main/java/org/gvsig/educa/thematicmap/app/viewer/exception/ThematicMapNotFoundException.java
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.educa.thematicmap.app.viewer.exception;
23

  
24
import org.gvsig.tools.persistence.exception.PersistenceException;
25

  
26
/**
27
 * Exception occurs when a project is opening and a Thematic map registered on
28
 * it is not installed
29
 * 
30
 * @author gvSIG Team
31
 * @version $Id$
32
 * 
33
 */
34
public class ThematicMapNotFoundException extends PersistenceException {
35

  
36
    /**
37
     *
38
     */
39
    private static final long serialVersionUID = 5394324158268756432L;
40

  
41
    private final static String MESSAGE_FORMAT =
42
        "Thematic Map not found installed: id:%(id) ver:%(version) bn:%(buildNumber)";
43
    private final static String MESSAGE_KEY =
44
        "_thematic_map_not_found_installed";
45

  
46
    private final String id;
47

  
48
    private final String version;
49

  
50
    private final int buildNumber;
51

  
52
    /**
53
     *
54
     */
55
    public ThematicMapNotFoundException(String id, String version,
56
        int buildNumber) {
57
        super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
58
        this.id = id;
59
        this.version = version;
60
        this.buildNumber = buildNumber;
61
        setValue("id", id);
62
        setValue("version", version);
63
        setValue("buildNumber", buildNumber);
64
    }
65

  
66
    protected String getId() {
67
        return id;
68
    }
69

  
70
    protected String getVersion() {
71
        return version;
72
    }
73

  
74
    protected int getBuildNumber() {
75
        return buildNumber;
76
    }
77

  
78
}
org.gvsig.educa.thematicmap.app/trunk/org.gvsig.educa.thematicmap.app/org.gvsig.educa.thematicmap.app.viewer/src/main/java/org/gvsig/educa/thematicmap/app/viewer/ThematicMapDocument.java
30 30
import org.gvsig.educa.thematicmap.ThematicMapLocator;
31 31
import org.gvsig.educa.thematicmap.ThematicMapManager;
32 32
import org.gvsig.educa.thematicmap.app.viewer.exception.ThematicMapLoadingException;
33
import org.gvsig.educa.thematicmap.app.viewer.exception.ThematicMapNotFoundException;
33 34
import org.gvsig.educa.thematicmap.map.ThematicMap;
34 35
import org.gvsig.educa.thematicmap.map.ThematicMapInformation;
35 36
import org.gvsig.fmap.mapcontext.MapContext;
......
162 163
        } catch (Exception ex) {
163 164
            throw new ThematicMapLoadingException(ex, id, version, bn);
164 165
        }
166
        if (map == null) {
167
            throw new ThematicMapNotFoundException(id, version, bn);
168
        }
165 169
        ThematicMapInformation info = map.getInformation();
166 170

  
167 171
        if (!StringUtils.equals(info.getVersion(), version)) {
org.gvsig.educa.thematicmap.app/trunk/org.gvsig.educa.thematicmap.app/org.gvsig.educa.thematicmap.app.viewer/package.info
1 1
#
2
#Sun Dec 18 20:43:12 CET 2011
2
#Mon Dec 19 09:33:39 CET 2011
3 3
state=devel
4 4
name=org.gvsig.educa.thematicmap.app.viewer
5 5
buildNumber=0

Also available in: Unified diff