Revision 37041
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/resources-test/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
3 |
|
|
4 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
5 |
|
|
6 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
7 |
<layout class="org.apache.log4j.PatternLayout"> |
|
8 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
9 |
</layout> |
|
10 |
</appender> |
|
11 |
|
|
12 |
<category name="org.gvsig.tools"> |
|
13 |
<priority value="DEBUG" /> |
|
14 |
</category> |
|
15 |
<category name="org.gvsig.fmap.mapcontext"> |
|
16 |
<priority value="DEBUG" /> |
|
17 |
</category> |
|
18 |
|
|
19 |
<root> |
|
20 |
<priority value="INFO" /> |
|
21 |
<appender-ref ref="CONSOLE" /> |
|
22 |
</root> |
|
23 |
</log4j:configuration> |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextException.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {DiSiD Technologies} {{Task}} |
|
26 |
*/ |
|
27 |
package org.gvsig.fmap.mapcontext; |
|
28 |
|
|
29 |
import org.gvsig.tools.exception.BaseException; |
|
30 |
|
|
31 |
/** |
|
32 |
* Parent class for MapContext exceptions. |
|
33 |
* |
|
34 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a> |
|
35 |
*/ |
|
36 |
public abstract class MapContextException extends BaseException { |
|
37 |
|
|
38 |
private static final long serialVersionUID = 8122532768532097211L; |
|
39 |
|
|
40 |
/** |
|
41 |
* @see BaseException#BaseException(String, String, long) |
|
42 |
*/ |
|
43 |
protected MapContextException(String message, String key, long code) { |
|
44 |
super(message, key, code); |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* @see BaseException#BaseException(String, Throwable, String, long) |
|
49 |
*/ |
|
50 |
protected MapContextException(String message, Throwable cause, String key, |
|
51 |
long code) { |
|
52 |
super(message, cause, key, code); |
|
53 |
} |
|
54 |
|
|
55 |
public MapContextException(Throwable cause) { |
|
56 |
this( |
|
57 |
"MapContext related error", |
|
58 |
cause, |
|
59 |
"_MapContext_related_error", |
|
60 |
serialVersionUID |
|
61 |
); |
|
62 |
} |
|
63 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/FileLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
/** |
|
6 |
* @author Vicente Caballero Navarro |
|
7 |
*/ |
|
8 |
public class FileLayerException extends LoadLayerException { |
|
9 |
|
|
10 |
public FileLayerException(String l,Throwable exception) { |
|
11 |
super(l,exception); |
|
12 |
init(); |
|
13 |
} |
|
14 |
/** |
|
15 |
* |
|
16 |
*/ |
|
17 |
private void init() { |
|
18 |
messageKey = "error_file_layer"; |
|
19 |
formatString = "Can?t found the file of the layer: %(layer) "; |
|
20 |
} |
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/LoadLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class LoadLayerException extends MapContextException { |
|
8 |
/** |
|
9 |
* |
|
10 |
*/ |
|
11 |
private static final long serialVersionUID = -7500729722899605739L; |
|
12 |
|
|
13 |
protected LoadLayerException(String message, Throwable cause, String key, |
|
14 |
long code) { |
|
15 |
super(message, cause, key, code); |
|
16 |
} |
|
17 |
|
|
18 |
|
|
19 |
public LoadLayerException(String layer,Throwable cause) { |
|
20 |
super( |
|
21 |
"Can?t load the layer %(layer).", |
|
22 |
cause, |
|
23 |
"Cant_load_the_layer_XlayerX", |
|
24 |
serialVersionUID |
|
25 |
); |
|
26 |
setValue("layer", layer); |
|
27 |
} |
|
28 |
|
|
29 |
|
|
30 |
public LoadLayerException(String layer) { |
|
31 |
super( |
|
32 |
"Can?t load the layer %(layer).", |
|
33 |
"Cant_load_the_layer_XlayerX", |
|
34 |
serialVersionUID |
|
35 |
); |
|
36 |
setValue("layer", layer); |
|
37 |
} |
|
38 |
|
|
39 |
|
|
40 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/NameLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class NameLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public NameLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_name_layer"; |
|
18 |
formatString = "Can?t named the layer: %(layer) "; |
|
19 |
} |
|
20 |
|
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/TypeLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class TypeLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public TypeLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_type_layer"; |
|
18 |
formatString = "Can?t use type of the layer: %(layer) "; |
|
19 |
} |
|
20 |
|
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/CancelEditingLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.tools.exception.BaseException; |
|
7 |
/** |
|
8 |
* @author Vicente Caballero Navarro |
|
9 |
*/ |
|
10 |
public class CancelEditingLayerException extends BaseException { |
|
11 |
|
|
12 |
private String layer = null; |
|
13 |
|
|
14 |
public CancelEditingLayerException(String layer,Throwable exception) { |
|
15 |
this.layer = layer; |
|
16 |
init(); |
|
17 |
initCause(exception); |
|
18 |
} |
|
19 |
|
|
20 |
private void init() { |
|
21 |
messageKey = "error_cancel_editing_layer"; |
|
22 |
formatString = "Can?t cancel editing the layer: %(layer) "; |
|
23 |
} |
|
24 |
|
|
25 |
protected Map values() { |
|
26 |
Hashtable params = new Hashtable(); |
|
27 |
params.put("layer",layer); |
|
28 |
return params; |
|
29 |
} |
|
30 |
|
|
31 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/DriverLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class DriverLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public DriverLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_driver_layer"; |
|
18 |
formatString = "Can?t load driver of the layer: %(layer) "; |
|
19 |
} |
|
20 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/ReprojectLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
/** |
|
4 |
* @author Vicente Caballero Navarro |
|
5 |
*/ |
|
6 |
public class ReprojectLayerException extends LoadLayerException { |
|
7 |
|
|
8 |
public ReprojectLayerException(String l,Throwable exception) { |
|
9 |
super(l,exception); |
|
10 |
init(); |
|
11 |
} |
|
12 |
/** |
|
13 |
* |
|
14 |
*/ |
|
15 |
private void init() { |
|
16 |
messageKey = "error_projection_layer"; |
|
17 |
formatString = "Can?t reproject the layer: %(layer) "; |
|
18 |
} |
|
19 |
|
|
20 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/LegendLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class LegendLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
/** |
|
10 |
* |
|
11 |
*/ |
|
12 |
private static final long serialVersionUID = -4033030636689365030L; |
|
13 |
|
|
14 |
protected LegendLayerException(String message, Throwable cause, String key, |
|
15 |
long code) { |
|
16 |
super(message, cause, key, code); |
|
17 |
} |
|
18 |
|
|
19 |
public LegendLayerException(String layer,Throwable cause) { |
|
20 |
super( |
|
21 |
"Can?t load the legend for layer %(layer).", |
|
22 |
cause, |
|
23 |
"Cant_load_the_legend_for_layer_XlayerX", |
|
24 |
serialVersionUID |
|
25 |
); |
|
26 |
setValue("layer", layer); |
|
27 |
} |
|
28 |
|
|
29 |
public LegendLayerException(String layer) { |
|
30 |
this(layer,null); |
|
31 |
} |
|
32 |
|
|
33 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/UnsupportedVersionLayerException.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
/** |
|
46 |
* Excepci?n provocada por el WMS. |
|
47 |
* |
|
48 |
* @author Vicente Caballero Navarro |
|
49 |
*/ |
|
50 |
public class UnsupportedVersionLayerException extends LoadLayerException { |
|
51 |
public UnsupportedVersionLayerException(String l,Throwable exception) { |
|
52 |
super(l,exception); |
|
53 |
init(); |
|
54 |
} |
|
55 |
/** |
|
56 |
* |
|
57 |
*/ |
|
58 |
private void init() { |
|
59 |
messageKey = "error_version_layer"; |
|
60 |
formatString = "Can?t use this version of the layer: %(layer) "; |
|
61 |
} |
|
62 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/StopEditionLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.tools.exception.BaseException; |
|
7 |
/** |
|
8 |
* @author Vicente Caballero Navarro |
|
9 |
*/ |
|
10 |
public class StopEditionLayerException extends BaseException{ |
|
11 |
|
|
12 |
private String layer; |
|
13 |
public StopEditionLayerException(String l,Throwable exception) { |
|
14 |
this.layer=l; |
|
15 |
init(); |
|
16 |
initCause(exception); |
|
17 |
} |
|
18 |
/** |
|
19 |
* |
|
20 |
*/ |
|
21 |
private void init() { |
|
22 |
messageKey = "error_stop_editing_layer"; |
|
23 |
formatString = "Can?t stop editing the layer: %(tag) "; |
|
24 |
} |
|
25 |
|
|
26 |
|
|
27 |
protected Map values() { |
|
28 |
Hashtable params = new Hashtable(); |
|
29 |
params.put("layer",layer); |
|
30 |
return params; |
|
31 |
} |
|
32 |
|
|
33 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/URLLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class URLLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public URLLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_url_layer"; |
|
18 |
formatString = "Can?t create the url of the layer: %(layer) "; |
|
19 |
} |
|
20 |
|
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/CreateLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
import org.gvsig.fmap.mapcontext.MapContextException; |
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class CreateLayerException extends MapContextException { |
|
8 |
/** |
|
9 |
* |
|
10 |
*/ |
|
11 |
private static final long serialVersionUID = 7923597739786110983L; |
|
12 |
|
|
13 |
|
|
14 |
protected CreateLayerException(String message, Throwable cause, String key, |
|
15 |
long code) { |
|
16 |
super(message, cause, key, code); |
|
17 |
} |
|
18 |
|
|
19 |
|
|
20 |
public CreateLayerException(String layer,Throwable cause) { |
|
21 |
super( |
|
22 |
"Can?t create the layer %(layer).", |
|
23 |
cause, |
|
24 |
"Cant_create_the_layer_XlayerX", |
|
25 |
serialVersionUID |
|
26 |
); |
|
27 |
setValue("layer", layer); |
|
28 |
} |
|
29 |
|
|
30 |
|
|
31 |
public CreateLayerException(String layer) { |
|
32 |
super( |
|
33 |
"Can?t create the layer %(layer).", |
|
34 |
"Cant_create_the_layer_XlayerX", |
|
35 |
serialVersionUID |
|
36 |
); |
|
37 |
setValue("layer", layer); |
|
38 |
} |
|
39 |
|
|
40 |
|
|
41 |
} |
|
0 | 42 |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/ReloadLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class ReloadLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public ReloadLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_reload_layer"; |
|
18 |
formatString = "Can?t reload the layer: %(layer) "; |
|
19 |
} |
|
20 |
|
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/ConnectionErrorLayerException.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
/** |
|
46 |
* @author Vicente Caballero Navarro |
|
47 |
*/ |
|
48 |
public class ConnectionErrorLayerException extends LoadLayerException { |
|
49 |
|
|
50 |
public ConnectionErrorLayerException(String l,Throwable exception) { |
|
51 |
super(l,exception); |
|
52 |
init(); |
|
53 |
} |
|
54 |
/** |
|
55 |
* |
|
56 |
*/ |
|
57 |
private void init() { |
|
58 |
messageKey = "error_connection_layer"; |
|
59 |
formatString = "Can?t connet the layer: %(layer) "; |
|
60 |
} |
|
61 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/StartEditionLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
import java.util.Hashtable; |
|
4 |
import java.util.Map; |
|
5 |
|
|
6 |
import org.gvsig.tools.exception.BaseException; |
|
7 |
/** |
|
8 |
* @author Vicente Caballero Navarro |
|
9 |
*/ |
|
10 |
public class StartEditionLayerException extends BaseException { |
|
11 |
private String layer; |
|
12 |
public StartEditionLayerException(String l,Throwable exception) { |
|
13 |
this.layer=l; |
|
14 |
init(); |
|
15 |
initCause(exception); |
|
16 |
} |
|
17 |
/** |
|
18 |
* |
|
19 |
*/ |
|
20 |
private void init() { |
|
21 |
messageKey = "error_start_editing_layer"; |
|
22 |
formatString = "Can?t start editing the layer: %(tag) "; |
|
23 |
} |
|
24 |
|
|
25 |
|
|
26 |
protected Map values() { |
|
27 |
Hashtable params = new Hashtable(); |
|
28 |
params.put("layer",layer); |
|
29 |
return params; |
|
30 |
} |
|
31 |
|
|
32 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/exceptions/ProjectionLayerException.java | ||
---|---|---|
1 |
package org.gvsig.fmap.mapcontext.exceptions; |
|
2 |
|
|
3 |
|
|
4 |
/** |
|
5 |
* @author Vicente Caballero Navarro |
|
6 |
*/ |
|
7 |
public class ProjectionLayerException extends LoadLayerException { |
|
8 |
|
|
9 |
public ProjectionLayerException(String l,Throwable exception) { |
|
10 |
super(l,exception); |
|
11 |
init(); |
|
12 |
} |
|
13 |
/** |
|
14 |
* |
|
15 |
*/ |
|
16 |
private void init() { |
|
17 |
messageKey = "error_projection_layer"; |
|
18 |
formatString = "Can?t project the layer: %(layer) "; |
|
19 |
} |
|
20 |
|
|
21 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextRuntimeException.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {DiSiD Technologies} {{Task}} |
|
26 |
*/ |
|
27 |
package org.gvsig.fmap.mapcontext; |
|
28 |
|
|
29 |
import org.gvsig.tools.exception.BaseException; |
|
30 |
import org.gvsig.tools.exception.BaseRuntimeException; |
|
31 |
|
|
32 |
/** |
|
33 |
* Parent class for MapContext runtime exceptions. |
|
34 |
* |
|
35 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a> |
|
36 |
*/ |
|
37 |
public class MapContextRuntimeException extends BaseRuntimeException { |
|
38 |
|
|
39 |
private static final long serialVersionUID = 3993964182701795153L; |
|
40 |
|
|
41 |
/** |
|
42 |
* @see BaseException#BaseException(String, String, long) |
|
43 |
*/ |
|
44 |
protected MapContextRuntimeException(String message, String key, long code) { |
|
45 |
super(message, null, key, code); |
|
46 |
} |
|
47 |
|
|
48 |
/** |
|
49 |
* @see BaseException#BaseException(String, Throwable, String, long) |
|
50 |
*/ |
|
51 |
protected MapContextRuntimeException(String message, Throwable cause, String key, |
|
52 |
long code) { |
|
53 |
super(message, cause, key, code); |
|
54 |
} |
|
55 |
|
|
56 |
public MapContextRuntimeException(Throwable cause) { |
|
57 |
this( |
|
58 |
"MapContext related error", |
|
59 |
cause, |
|
60 |
"_MapContext_related_error", |
|
61 |
serialVersionUID |
|
62 |
); |
|
63 |
} |
|
64 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextLocator.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {DiSiD Technologies} {{Task}} |
|
26 |
*/ |
|
27 |
package org.gvsig.fmap.mapcontext; |
|
28 |
|
|
29 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
|
30 |
import org.gvsig.tools.locator.BaseLocator; |
|
31 |
import org.gvsig.tools.locator.Locator; |
|
32 |
import org.gvsig.tools.locator.LocatorException; |
|
33 |
|
|
34 |
/** |
|
35 |
* Locator for the MapContext library. |
|
36 |
* |
|
37 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a> |
|
38 |
*/ |
|
39 |
public class MapContextLocator extends BaseLocator { |
|
40 |
|
|
41 |
public static final String MAPCONTEXT_MANAGER_NAME = "mapcontextlocator.manager"; |
|
42 |
|
|
43 |
private static final String MAPCONTEXT_MANAGER_DESCRIPTION = "MapContext Library manager"; |
|
44 |
|
|
45 |
public static final String SYMBOL_MANAGER_NAME = "symbol.manager"; |
|
46 |
|
|
47 |
private static final String SYMBOL_MANAGER_DESCRIPTION = "Symbols manager"; |
|
48 |
|
|
49 |
private static final MapContextLocator instance = new MapContextLocator(); |
|
50 |
|
|
51 |
/** |
|
52 |
* Private constructor, we don't want it to be able to be instantiated |
|
53 |
* outside this class. |
|
54 |
*/ |
|
55 |
private MapContextLocator() { |
|
56 |
// Nothing to do |
|
57 |
} |
|
58 |
|
|
59 |
public static MapContextLocator getInstance() { |
|
60 |
return instance; |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* Return a reference to MapContextManager. |
|
65 |
* |
|
66 |
* @return a reference to MapContextManager |
|
67 |
* @throws LocatorException |
|
68 |
* if there is no access to the class or the class cannot be |
|
69 |
* instantiated |
|
70 |
* @see Locator#get(String) |
|
71 |
*/ |
|
72 |
public static MapContextManager getMapContextManager() |
|
73 |
throws LocatorException { |
|
74 |
return (MapContextManager) getInstance().get(MAPCONTEXT_MANAGER_NAME); |
|
75 |
} |
|
76 |
|
|
77 |
/** |
|
78 |
* Registers the Class implementing the MapContextManager interface. |
|
79 |
* |
|
80 |
* @param clazz |
|
81 |
* implementing the MapContextManager interface |
|
82 |
*/ |
|
83 |
public static void registerMapContextManager(Class clazz) { |
|
84 |
getInstance().register(MAPCONTEXT_MANAGER_NAME, |
|
85 |
MAPCONTEXT_MANAGER_DESCRIPTION, clazz); |
|
86 |
} |
|
87 |
|
|
88 |
/** |
|
89 |
* Return a reference to the {@link SymbolManager}. |
|
90 |
* |
|
91 |
* @return a reference to the SymbolManager. |
|
92 |
* @throws LocatorException |
|
93 |
* if there is no access to the class or the class cannot be |
|
94 |
* instantiated |
|
95 |
* @see Locator#get(String) |
|
96 |
*/ |
|
97 |
public static SymbolManager getSymbolManager() throws LocatorException { |
|
98 |
return (SymbolManager) getInstance().get(SYMBOL_MANAGER_NAME); |
|
99 |
} |
|
100 |
|
|
101 |
/** |
|
102 |
* Registers the Class implementing the SymbolManager interface. |
|
103 |
* |
|
104 |
* @param clazz |
|
105 |
* implementing the SymbolManager interface |
|
106 |
*/ |
|
107 |
public static void registerSymbolManager(Class clazz) { |
|
108 |
getInstance().register(SYMBOL_MANAGER_NAME, SYMBOL_MANAGER_DESCRIPTION, |
|
109 |
clazz); |
|
110 |
} |
|
111 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextLibrary.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2008 IVER T.I. S.A. {{Task}} |
|
26 |
*/ |
|
27 |
package org.gvsig.fmap.mapcontext; |
|
28 |
|
|
29 |
import org.slf4j.Logger; |
|
30 |
import org.slf4j.LoggerFactory; |
|
31 |
|
|
32 |
import org.gvsig.compat.CompatLibrary; |
|
33 |
import org.gvsig.fmap.dal.DALLibrary; |
|
34 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
35 |
import org.gvsig.fmap.mapcontext.impl.DefaultMapContextDrawer; |
|
36 |
import org.gvsig.fmap.mapcontext.layers.FLayerStatus; |
|
37 |
import org.gvsig.fmap.mapcontext.layers.FLayers; |
|
38 |
import org.gvsig.fmap.mapcontext.layers.FLyrDefault; |
|
39 |
import org.gvsig.fmap.mapcontext.layers.LayerFactory; |
|
40 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
|
41 |
import org.gvsig.fmap.mapcontext.layers.vectorial.ReprojectDefaultGeometry; |
|
42 |
import org.gvsig.fmap.mapcontext.tools.persistence.ColorPersistenceFactory; |
|
43 |
import org.gvsig.fmap.mapcontext.tools.persistence.DimensionPersistenceFactory; |
|
44 |
import org.gvsig.fmap.mapcontext.tools.persistence.FontPersistenceFactory; |
|
45 |
import org.gvsig.fmap.mapcontext.tools.persistence.Point2DPersistenceFactory; |
|
46 |
import org.gvsig.fmap.mapcontext.tools.persistence.Rectangle2DPersistenceFactory; |
|
47 |
import org.gvsig.tools.ToolsLocator; |
|
48 |
import org.gvsig.tools.library.AbstractLibrary; |
|
49 |
import org.gvsig.tools.library.LibraryException; |
|
50 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
51 |
import org.gvsig.tools.persistence.PersistenceManager; |
|
52 |
import org.gvsig.tools.util.Caller; |
|
53 |
import org.gvsig.tools.util.impl.DefaultCaller; |
|
54 |
|
|
55 |
/** |
|
56 |
* Library for the MapContext library API. |
|
57 |
* @author jmvivo |
|
58 |
*/ |
|
59 |
public class MapContextLibrary extends AbstractLibrary { |
|
60 |
final static private Logger LOG = LoggerFactory.getLogger(FLyrDefault.class); |
|
61 |
|
|
62 |
public void doRegistration() { |
|
63 |
registerAsAPI(MapContextLibrary.class); |
|
64 |
require(DALLibrary.class); |
|
65 |
require(CompatLibrary.class); |
|
66 |
} |
|
67 |
|
|
68 |
protected void doInitialize() throws LibraryException { |
|
69 |
LayerFactory.getInstance().registerLayerToUseForStore( |
|
70 |
FeatureStore.class, FLyrVect.class); |
|
71 |
} |
|
72 |
|
|
73 |
protected void doPostInitialize() throws LibraryException { |
|
74 |
Caller caller = new DefaultCaller(); |
|
75 |
|
|
76 |
FLyrDefault.registerMetadata(); |
|
77 |
|
|
78 |
MapContextManager manager = MapContextLocator.getMapContextManager(); |
|
79 |
|
|
80 |
if (manager == null) { |
|
81 |
throw new ReferenceNotRegisteredException( |
|
82 |
MapContextLocator.MAPCONTEXT_MANAGER_NAME, |
|
83 |
MapContextLocator.getInstance()); |
|
84 |
} |
|
85 |
|
|
86 |
try { |
|
87 |
manager.setDefaultMapContextDrawer(DefaultMapContextDrawer.class); |
|
88 |
} catch (MapContextException ex) { |
|
89 |
throw new LibraryException(getClass().getName(), ex); |
|
90 |
} |
|
91 |
|
|
92 |
caller.add( new ViewPort.RegisterPersistence() ); |
|
93 |
|
|
94 |
/* |
|
95 |
* Do register of all |
|
96 |
*/ |
|
97 |
if( !caller.call() ) { |
|
98 |
throw new LibraryException(MapContextLibrary.class, caller.getExceptions()); |
|
99 |
} |
|
100 |
|
|
101 |
// persistent classes |
|
102 |
MapContext.registerPersistent(); |
|
103 |
|
|
104 |
ExtentHistory.registerPersistent(); |
|
105 |
|
|
106 |
// MappingAnnotation.registerPersistent(); |
|
107 |
ReprojectDefaultGeometry.registerPersistent(); |
|
108 |
|
|
109 |
// FLayerVectorialDB.registerPersistent(); |
|
110 |
// FLayerFileVectorial.registerPersistent(); |
|
111 |
|
|
112 |
FLayerStatus.registerPersistent(); |
|
113 |
FLyrDefault.registerPersistent(); |
|
114 |
FLyrVect.registerPersistent(); |
|
115 |
FLayers.registerPersistent(); |
|
116 |
|
|
117 |
//////////////////////////////////////// |
|
118 |
// Register the persistence factories // |
|
119 |
//////////////////////////////////////// |
|
120 |
PersistenceManager persistenceManager = |
|
121 |
ToolsLocator.getPersistenceManager(); |
|
122 |
// Color |
|
123 |
persistenceManager.registerFactory(new ColorPersistenceFactory()); |
|
124 |
// Point2D |
|
125 |
persistenceManager.registerFactory(new Point2DPersistenceFactory()); |
|
126 |
// Font |
|
127 |
persistenceManager.registerFactory(new FontPersistenceFactory()); |
|
128 |
// Rectangle2D |
|
129 |
persistenceManager.registerFactory(new Rectangle2DPersistenceFactory()); |
|
130 |
// awt Dimension |
|
131 |
persistenceManager.registerFactory(new DimensionPersistenceFactory()); |
|
132 |
} |
|
133 |
|
|
134 |
} |
|
0 | 135 |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/Messages.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
|
22 |
* Conselleria d'Infraestructures i Transport |
|
23 |
* Av. Blasco Ib??ez, 50 |
|
24 |
* 46010 VALENCIA |
|
25 |
* SPAIN |
|
26 |
* |
|
27 |
* +34 963862235 |
|
28 |
* gvsig@gva.es |
|
29 |
* www.gvsig.gva.es |
|
30 |
* |
|
31 |
* or |
|
32 |
* |
|
33 |
* IVER T.I. S.A |
|
34 |
* Salamanca 50 |
|
35 |
* 46005 Valencia |
|
36 |
* Spain |
|
37 |
* |
|
38 |
* +34 963163400 |
|
39 |
* dac@iver.es |
|
40 |
*/ |
|
41 |
package org.gvsig.fmap.mapcontext; |
|
42 |
|
|
43 |
import java.util.Locale; |
|
44 |
import java.util.MissingResourceException; |
|
45 |
import java.util.ResourceBundle; |
|
46 |
|
|
47 |
|
|
48 |
/** |
|
49 |
* Clase que accede a los recursos para la i18n |
|
50 |
*/ |
|
51 |
public class Messages { |
|
52 |
/** DOCUMENT ME! */ |
|
53 |
private static final String BUNDLE_NAME = "com.iver.cit.gvsig.fmap.FMap"; |
|
54 |
|
|
55 |
/** DOCUMENT ME! */ |
|
56 |
private static ResourceBundle RESOURCE_BUNDLE = null; |
|
57 |
|
|
58 |
/** |
|
59 |
* Inicializa la clase con el locale adecuado |
|
60 |
* |
|
61 |
* @param loc Locale de la aplicaci?n |
|
62 |
*/ |
|
63 |
private static void init() { |
|
64 |
Locale loc = Locale.getDefault(); |
|
65 |
RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, loc); |
|
66 |
} |
|
67 |
|
|
68 |
|
|
69 |
/** |
|
70 |
* Obtiene el valor del recurso con clave 'key' |
|
71 |
* |
|
72 |
* @param key clave del recurso que se quiere obtener |
|
73 |
* |
|
74 |
* @return recurso que se quiere obtener o !key! en caso de no encontrarlo. |
|
75 |
* En dicho caso no se notifica al framework ya que estos son los |
|
76 |
* mensajes propios de la aplicaci?n y deben de estar todos |
|
77 |
*/ |
|
78 |
public static String getString(String key) { |
|
79 |
try { |
|
80 |
// La primera vez, cargamos las cadenas. |
|
81 |
if (RESOURCE_BUNDLE == null) |
|
82 |
init(); |
|
83 |
return RESOURCE_BUNDLE.getString(key); |
|
84 |
} catch (MissingResourceException e) { |
|
85 |
return '!' + key + '!'; |
|
86 |
} |
|
87 |
} |
|
88 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/MapContextManager.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 |
|
|
23 |
/* |
|
24 |
* AUTHORS (In addition to CIT): |
|
25 |
* 2009 {DiSiD Technologies} {Create Manager to register MapContextDrawer implementation} |
|
26 |
*/ |
|
27 |
package org.gvsig.fmap.mapcontext; |
|
28 |
|
|
29 |
import java.awt.Color; |
|
30 |
import java.awt.Font; |
|
31 |
|
|
32 |
import org.cresques.cts.IProjection; |
|
33 |
|
|
34 |
import org.gvsig.fmap.dal.DataStore; |
|
35 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
36 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
37 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
38 |
import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer; |
|
39 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
|
40 |
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend; |
|
41 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader; |
|
42 |
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter; |
|
43 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IMultiLayerSymbol; |
|
44 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
45 |
import org.gvsig.fmap.mapcontext.rendering.symbols.IWarningSymbol; |
|
46 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager; |
|
47 |
import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolPreferences; |
|
48 |
|
|
49 |
/** |
|
50 |
* Manager of the MapContext library. |
|
51 |
* |
|
52 |
* Holds the default implementation of the {@link MapContextDrawer}. |
|
53 |
* |
|
54 |
* @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a> |
|
55 |
* @author <a href="mailto:jjdelcerro@gvsig.org">Joaquin Jose del Cerro</a> |
|
56 |
*/ |
|
57 |
public interface MapContextManager { |
|
58 |
|
|
59 |
/** |
|
60 |
* Create a new layer from the data parameters passed as parameter. |
|
61 |
* |
|
62 |
* @param layerName name used in for the new layer. |
|
63 |
* @param parameters used for create the {@link DataStore} of the new layer |
|
64 |
* |
|
65 |
* @return the new FLayer |
|
66 |
* |
|
67 |
* @throws LoadLayerException |
|
68 |
*/ |
|
69 |
public FLayer createLayer(String layerName, |
|
70 |
DataStoreParameters parameters) throws LoadLayerException; |
|
71 |
|
|
72 |
/** |
|
73 |
* Create a layer from a {@link DataStore}. |
|
74 |
* |
|
75 |
* @param layerName name used in for the new layer. |
|
76 |
* @param store used for the new layer |
|
77 |
* |
|
78 |
* @return the new FLayer |
|
79 |
* |
|
80 |
* @throws LoadLayerException |
|
81 |
*/ |
|
82 |
public FLayer createLayer(String layerName, DataStore store) |
|
83 |
throws LoadLayerException; |
|
84 |
|
|
85 |
/** |
|
86 |
* Create a layer to be used as the {@link GraphicLayer}. |
|
87 |
* |
|
88 |
* @param projection used in the layer. |
|
89 |
* |
|
90 |
* @return the new {@link GraphicLayer}. |
|
91 |
*/ |
|
92 |
public GraphicLayer createGraphicsLayer(IProjection projection); |
|
93 |
|
|
94 |
/** |
|
95 |
* Returns the current {@link SymbolManager}. |
|
96 |
* |
|
97 |
* @return the {@link SymbolManager} |
|
98 |
*/ |
|
99 |
SymbolManager getSymbolManager(); |
|
100 |
|
|
101 |
/** |
|
102 |
* Sets the class to use as the default implementation for the |
|
103 |
* {@link MapContextDrawer}. |
|
104 |
* |
|
105 |
* @param drawerClazz |
|
106 |
* the {@link MapContextDrawer} class to use |
|
107 |
* @throws MapContextException |
|
108 |
* if there is any error setting the class |
|
109 |
*/ |
|
110 |
public void setDefaultMapContextDrawer(Class drawerClazz) |
|
111 |
throws MapContextException; |
|
112 |
|
|
113 |
public void validateMapContextDrawer(Class drawerClazz) throws MapContextException; |
|
114 |
|
|
115 |
/** |
|
116 |
* Creates a new instance of the default {@link MapContextDrawer} |
|
117 |
* implementation. |
|
118 |
* |
|
119 |
* @return the new {@link MapContextDrawer} instance |
|
120 |
* @throws MapContextException |
|
121 |
* if there is an error creating the new object instance |
|
122 |
*/ |
|
123 |
public MapContextDrawer createDefaultMapContextDrawerInstance() |
|
124 |
throws MapContextException; |
|
125 |
|
|
126 |
/** |
|
127 |
* Creates a new instance of the provided {@link MapContextDrawer} |
|
128 |
* implementation. |
|
129 |
* |
|
130 |
* @param drawerClazz |
|
131 |
* the {@link MapContextDrawer} implementation class |
|
132 |
* @return the new {@link MapContextDrawer} instance |
|
133 |
* @throws MapContextException |
|
134 |
* if there is an error creating the new object instance |
|
135 |
*/ |
|
136 |
public MapContextDrawer createMapContextDrawerInstance(Class drawerClazz) |
|
137 |
throws MapContextException; |
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
void registerLegend(String legendName, Class legendClass) |
|
142 |
throws MapContextRuntimeException; |
|
143 |
|
|
144 |
ILegend createLegend(String legendName) throws MapContextRuntimeException; |
|
145 |
|
|
146 |
void setDefaultVectorLegend(String legendName); |
|
147 |
|
|
148 |
IVectorLegend createDefaultVectorLegend(int shapeType) |
|
149 |
throws MapContextRuntimeException; |
|
150 |
|
|
151 |
void registerLegendWriter(String legendName, String format, |
|
152 |
Class writerClass) throws MapContextRuntimeException; |
|
153 |
|
|
154 |
void registerLegendReader(String format, Class readerClass) |
|
155 |
throws MapContextRuntimeException; |
|
156 |
|
|
157 |
ILegendWriter createLegendWriter(String legendName, String format) |
|
158 |
throws MapContextException; |
|
159 |
|
|
160 |
ILegendReader createLegendReader(String format) |
|
161 |
throws MapContextRuntimeException; |
|
162 |
|
|
163 |
/** |
|
164 |
* @deprecated to be removed in gvSIG 2.0 |
|
165 |
* @see {@link SymbolPreferences}. |
|
166 |
*/ |
|
167 |
int getDefaultCartographicSupportMeasureUnit(); |
|
168 |
|
|
169 |
/** |
|
170 |
* @deprecated to be removed in gvSIG 2.0 |
|
171 |
* @see {@link SymbolPreferences}. |
|
172 |
*/ |
|
173 |
void setDefaultCartographicSupportMeasureUnit( |
|
174 |
int defaultCartographicSupportMeasureUnit); |
|
175 |
|
|
176 |
/** |
|
177 |
* @deprecated to be removed in gvSIG 2.0 |
|
178 |
* @see {@link SymbolPreferences}. |
|
179 |
*/ |
|
180 |
int getDefaultCartographicSupportReferenceSystem(); |
|
181 |
|
|
182 |
/** |
|
183 |
* @deprecated to be removed in gvSIG 2.0 |
|
184 |
* @see {@link SymbolPreferences}. |
|
185 |
*/ |
|
186 |
void setDefaultCartographicSupportReferenceSystem( |
|
187 |
int defaultCartographicSupportReferenceSystem); |
|
188 |
|
|
189 |
/** |
|
190 |
* @deprecated to be removed in gvSIG 2.0 |
|
191 |
* @see {@link SymbolPreferences}. |
|
192 |
*/ |
|
193 |
Color getDefaultSymbolColor(); |
|
194 |
|
|
195 |
/** |
|
196 |
* @deprecated to be removed in gvSIG 2.0 |
|
197 |
* @see {@link SymbolPreferences}. |
|
198 |
*/ |
|
199 |
void setDefaultSymbolColor(Color defaultSymbolColor); |
|
200 |
|
|
201 |
/** |
|
202 |
* @deprecated to be removed in gvSIG 2.0 |
|
203 |
* @see {@link SymbolPreferences}. |
|
204 |
*/ |
|
205 |
void resetDefaultSymbolColor(); |
|
206 |
|
|
207 |
/** |
|
208 |
* @deprecated to be removed in gvSIG 2.0 |
|
209 |
* @see {@link SymbolPreferences}. |
|
210 |
*/ |
|
211 |
Color getDefaultSymbolFillColor(); |
|
212 |
|
|
213 |
/** |
|
214 |
* @deprecated to be removed in gvSIG 2.0 |
|
215 |
* @see {@link SymbolPreferences}. |
|
216 |
*/ |
|
217 |
void setDefaultSymbolFillColor(Color defaultSymbolFillColor); |
|
218 |
|
|
219 |
/** |
|
220 |
* @deprecated to be removed in gvSIG 2.0 |
|
221 |
* @see {@link SymbolPreferences}. |
|
222 |
*/ |
|
223 |
void resetDefaultSymbolFillColor(); |
|
224 |
|
|
225 |
/** |
|
226 |
* @deprecated to be removed in gvSIG 2.0 |
|
227 |
* @see {@link SymbolPreferences}. |
|
228 |
*/ |
|
229 |
boolean isDefaultSymbolFillColorAleatory(); |
|
230 |
|
|
231 |
/** |
|
232 |
* @deprecated to be removed in gvSIG 2.0 |
|
233 |
* @see {@link SymbolPreferences}. |
|
234 |
*/ |
|
235 |
void setDefaultSymbolFillColorAleatory( |
|
236 |
boolean defaultSymbolFillColorAleatory); |
|
237 |
|
|
238 |
/** |
|
239 |
* @deprecated to be removed in gvSIG 2.0 |
|
240 |
* @see {@link SymbolPreferences}. |
|
241 |
*/ |
|
242 |
void resetDefaultSymbolFillColorAleatory(); |
|
243 |
|
|
244 |
/** |
|
245 |
* @deprecated to be removed in gvSIG 2.0 |
|
246 |
* @see {@link SymbolPreferences}. |
|
247 |
*/ |
|
248 |
Font getDefaultSymbolFont(); |
|
249 |
|
|
250 |
/** |
|
251 |
* @deprecated to be removed in gvSIG 2.0 |
|
252 |
* @see {@link SymbolPreferences}. |
|
253 |
*/ |
|
254 |
void setDefaultSymbolFont(Font defaultSymbolFont); |
|
255 |
|
|
256 |
/** |
|
257 |
* @deprecated to be removed in gvSIG 2.0 |
|
258 |
* @see {@link SymbolPreferences}. |
|
259 |
*/ |
|
260 |
void resetDefaultSymbolFont(); |
|
261 |
|
|
262 |
/** |
|
263 |
* @deprecated to be removed in gvSIG 2.0 |
|
264 |
* @see {@link SymbolPreferences}. |
|
265 |
*/ |
|
266 |
String getSymbolLibraryPath(); |
|
267 |
|
|
268 |
/** |
|
269 |
* @deprecated to be removed in gvSIG 2.0 |
|
270 |
* @see {@link SymbolPreferences}. |
|
271 |
*/ |
|
272 |
void setSymbolLibraryPath(String symbolLibraryPath); |
|
273 |
|
|
274 |
/** |
|
275 |
* @deprecated to be removed in gvSIG 2.0 |
|
276 |
* @see {@link SymbolPreferences}. |
|
277 |
*/ |
|
278 |
void resetSymbolLibraryPath(); |
|
279 |
|
|
280 |
|
|
281 |
/** |
|
282 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
283 |
*/ |
|
284 |
ISymbol createSymbol(String symbolName) throws MapContextRuntimeException; |
|
285 |
|
|
286 |
/** |
|
287 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
288 |
*/ |
|
289 |
ISymbol createSymbol(int shapeType) throws MapContextRuntimeException; |
|
290 |
|
|
291 |
/** |
|
292 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
293 |
*/ |
|
294 |
ISymbol createSymbol(String symbolName, Color color) |
|
295 |
throws MapContextRuntimeException; |
|
296 |
|
|
297 |
/** |
|
298 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
299 |
*/ |
|
300 |
ISymbol createSymbol(int shapeType, Color color) |
|
301 |
throws MapContextRuntimeException; |
|
302 |
|
|
303 |
/** |
|
304 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
305 |
*/ |
|
306 |
IMultiLayerSymbol createMultiLayerSymbol(String symbolName) |
|
307 |
throws MapContextRuntimeException; |
|
308 |
|
|
309 |
/** |
|
310 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
311 |
*/ |
|
312 |
IMultiLayerSymbol createMultiLayerSymbol(int shapeType) |
|
313 |
throws MapContextRuntimeException; |
|
314 |
|
|
315 |
/** |
|
316 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
317 |
*/ |
|
318 |
void registerSymbol(String symbolName, Class symbolClass) |
|
319 |
throws MapContextRuntimeException; |
|
320 |
|
|
321 |
/** |
|
322 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
323 |
*/ |
|
324 |
void registerSymbol(String symbolName, int[] shapeTypes, Class symbolClass) |
|
325 |
throws MapContextException; |
|
326 |
|
|
327 |
/** |
|
328 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
329 |
*/ |
|
330 |
void registerMultiLayerSymbol(String symbolName, Class symbolClass) |
|
331 |
throws MapContextRuntimeException; |
|
332 |
|
|
333 |
/** |
|
334 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
335 |
*/ |
|
336 |
void registerMultiLayerSymbol(String symbolName, int[] shapeTypes, |
|
337 |
Class symbolClass) throws MapContextRuntimeException; |
|
338 |
|
|
339 |
/** |
|
340 |
* @deprecated to be removed in gvSIG 2.0 @see {@link SymbolManager} |
|
341 |
*/ |
|
342 |
IWarningSymbol getWarningSymbol(String message, String symbolDesc, |
|
343 |
int symbolDrawExceptionType) throws MapContextRuntimeException; |
|
344 |
|
|
345 |
/** |
|
346 |
* It returns the legend associated with a {@link DataStore}. |
|
347 |
* If the legend doesn't exist it returns <code>null</code>. |
|
348 |
* @param dataStore |
|
349 |
* the store that could have a legend. |
|
350 |
* @return |
|
351 |
* the legend or <code>null</code>. |
|
352 |
*/ |
|
353 |
ILegend getLegend(DataStore dataStore); |
|
354 |
|
|
355 |
|
|
356 |
// TODO: |
|
357 |
// DynObjectModel getFeatureTypeUIModel(DataStore store, |
|
358 |
// FeatureType featureType); |
|
359 |
} |
tags/v2_0_0_Build_2038/libraries/libFMap_mapcontext/src/org/gvsig/fmap/mapcontext/SelectedZoomVisitor.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
* |
|
19 |
* For more information, contact: |
|
20 |
* |
|
21 |
* Generalitat Valenciana |
Also available in: Unified diff