Revision 43180
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.newlayer</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<description>newlayer project</description> |
|
8 |
<name>${project.artifactId}</name> |
|
9 |
<parent> |
|
10 |
<groupId>org.gvsig</groupId> |
|
11 |
<artifactId>org.gvsig.desktop.library</artifactId> |
|
12 |
<version>2.0.174</version> |
|
13 |
</parent> |
|
14 |
|
|
15 |
<dependencies> |
|
16 |
<dependency> |
|
17 |
<groupId>org.gvsig</groupId> |
|
18 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
19 |
</dependency> |
|
20 |
<dependency> |
|
21 |
<groupId>org.gvsig</groupId> |
|
22 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
23 |
<type>test-jar</type> |
|
24 |
<scope>test</scope> |
|
25 |
</dependency> |
|
26 |
</dependencies> |
|
27 |
|
|
28 |
<modules> |
|
29 |
<module>org.gvsig.newlayer.lib</module> |
|
30 |
<module>org.gvsig.newlayer.prov</module> |
|
31 |
</modules> |
|
32 |
</project> |
|
0 | 33 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.newlayer.NewLayerLibrary |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/resources/filters.txt | ||
---|---|---|
1 |
point_geometries_only= |
|
2 |
curve_geometries_only= |
|
3 |
surface_geometries_only= |
|
0 | 4 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerManager.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
29 |
import org.gvsig.newlayer.preferences.NewLayerPreferencesComponent; |
|
30 |
import org.gvsig.tools.service.ServiceException; |
|
31 |
|
|
32 |
/** |
|
33 |
* This class is responsible of the management of the library's business logic. |
|
34 |
* It is the library's main entry point, and provides all the services to manage |
|
35 |
* {@link NewLayerService}s. |
|
36 |
* |
|
37 |
* @see NewLayerService |
|
38 |
* @author gvSIG team |
|
39 |
* @version $Id$ |
|
40 |
*/ |
|
41 |
public interface NewLayerManager { |
|
42 |
|
|
43 |
public enum STORETYPE{ANY,TABULAR,SPATIAL}; |
|
44 |
|
|
45 |
|
|
46 |
/** |
|
47 |
* Create an instance of a {@link NewLayerService}. |
|
48 |
* @return {@link NewLayerService} |
|
49 |
* @throws ServiceException |
|
50 |
* if there is an error getting the service |
|
51 |
*/ |
|
52 |
public NewLayerService createNewLayerService(MapContext mapContext); |
|
53 |
|
|
54 |
public void registerProvider(NewLayerProviderFactory factory); |
|
55 |
|
|
56 |
public List<NewLayerProviderFactory> getProviders(STORETYPE filter); |
|
57 |
|
|
58 |
public List<NewLayerProviderFactory> getProviders(); |
|
59 |
|
|
60 |
public NewLayerWizard createNewLayerWizard(NewLayerService service); |
|
61 |
|
|
62 |
/** |
|
63 |
* Returns the provider factory with the given name. |
|
64 |
* |
|
65 |
* @param name |
|
66 |
* of the provider |
|
67 |
* @return the provider factory |
|
68 |
* @throws ServiceException |
|
69 |
* if there is an error getting the provider factory |
|
70 |
*/ |
|
71 |
public NewLayerProviderFactory getNewLayerProviderFactory( |
|
72 |
String providerName) throws ServiceException; |
|
73 |
|
|
74 |
/** |
|
75 |
* Enables or disables a new layer provider. |
|
76 |
* |
|
77 |
* @param factory |
|
78 |
* of the provider to enable or disable |
|
79 |
* @param value |
|
80 |
* if the provider must be enabled or disabled |
|
81 |
*/ |
|
82 |
public void enableProvider(NewLayerProviderFactory factory, Boolean false1); |
|
83 |
|
|
84 |
/** |
|
85 |
* Creates a preferences component to manage the export to properties. |
|
86 |
* |
|
87 |
* @return a preferences component |
|
88 |
*/ |
|
89 |
public NewLayerPreferencesComponent createNewLayerProvidersPreferences(); |
|
90 |
|
|
91 |
/** |
|
92 |
* Returns if the provider whose factory is provided is enabled. |
|
93 |
* |
|
94 |
* @param factory |
|
95 |
* of the provider to check |
|
96 |
* @return if the provider whose factory is provided is enabled |
|
97 |
*/ |
|
98 |
public boolean isProviderEnabled(NewLayerProviderFactory factory); |
|
99 |
|
|
100 |
} |
|
0 | 101 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProvider.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
29 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
30 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
31 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
32 |
import org.gvsig.tools.service.spi.Provider; |
|
33 |
|
|
34 |
public interface NewLayerProvider extends Provider{ |
|
35 |
|
|
36 |
public NewLayerService getService(); |
|
37 |
|
|
38 |
public DataServerExplorer getExplorer(); |
|
39 |
|
|
40 |
public String getStoreName(); |
|
41 |
|
|
42 |
public EditableFeatureType getFeatureType(); |
|
43 |
|
|
44 |
public NewFeatureStoreParameters getNewStoreParameters(); |
|
45 |
|
|
46 |
public DataStoreParameters getOpenStoreParameters(); |
|
47 |
|
|
48 |
public List<NewLayerProviderPanel> getPanels(); |
|
49 |
} |
|
0 | 50 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderPanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import javax.swing.JPanel; |
|
27 |
|
|
28 |
|
|
29 |
public abstract class NewLayerProviderPanel extends JPanel{ |
|
30 |
|
|
31 |
|
|
32 |
protected NewLayerProvider provider; |
|
33 |
|
|
34 |
protected NewLayerProviderPanel(NewLayerProvider provider){ |
|
35 |
this.provider = provider; |
|
36 |
} |
|
37 |
|
|
38 |
public abstract String getTitle(); |
|
39 |
|
|
40 |
public abstract boolean isValidPanel() throws NewLayerException; |
|
41 |
|
|
42 |
public abstract void updatePanel(); |
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
} |
|
0 | 47 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/preferences/NewLayerPreferencesComponent.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer.preferences; |
|
25 |
|
|
26 |
import java.util.Set; |
|
27 |
|
|
28 |
import org.gvsig.newlayer.NewLayerProviderFactory; |
|
29 |
import org.gvsig.tools.swing.api.Component; |
|
30 |
|
|
31 |
/** |
|
32 |
* API for the Export to swing preferences component panel. |
|
33 |
* |
|
34 |
* @author gvSIG Team |
|
35 |
* @version $Id$ |
|
36 |
*/ |
|
37 |
public interface NewLayerPreferencesComponent extends Component { |
|
38 |
|
|
39 |
/** |
|
40 |
* Returns the providers disabled by the user. |
|
41 |
* |
|
42 |
* @return the providers disabled by the user |
|
43 |
*/ |
|
44 |
Set<NewLayerProviderFactory> getDisabledProviders(); |
|
45 |
|
|
46 |
/** |
|
47 |
* Undoes all the user changes in the preferences. |
|
48 |
*/ |
|
49 |
void initializeDefaults(); |
|
50 |
|
|
51 |
/** |
|
52 |
* Is the user has made any change in the preferences. |
|
53 |
* |
|
54 |
* @return the user has made any change |
|
55 |
*/ |
|
56 |
boolean isValueChanged(); |
|
57 |
|
|
58 |
/** |
|
59 |
* Tells the component the changes made by the user to the properties |
|
60 |
* had been performed. |
|
61 |
*/ |
|
62 |
void setChangesApplied(); |
|
63 |
} |
|
0 | 64 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import org.gvsig.tools.exception.BaseException; |
|
27 |
|
|
28 |
/** |
|
29 |
* Generic exception thrown in the NewLayer API when the exception or error |
|
30 |
* may be dealt by the program or the user of the program which is a client of |
|
31 |
* the NewLayer API. |
|
32 |
* |
|
33 |
* @see {@link NewLayerService} |
|
34 |
* @see {@link NewLayerManager} |
|
35 |
* @author gvSIG team. |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public class NewLayerException extends BaseException { |
|
39 |
|
|
40 |
/** |
|
41 |
* |
|
42 |
*/ |
|
43 |
private static final long serialVersionUID = -2954242107118688337L; |
|
44 |
|
|
45 |
private static final String MESSAGE = |
|
46 |
"An error has been produced in the NewLayer library"; |
|
47 |
|
|
48 |
private static final String KEY = "_NewLayerException"; |
|
49 |
|
|
50 |
/** |
|
51 |
* Constructor to be used in rare cases, usually you must create a new child |
|
52 |
* exception class for each case. |
|
53 |
* <strong>Don't use this constructor in child classes.</strong> |
|
54 |
*/ |
|
55 |
public NewLayerException() { |
|
56 |
super(MESSAGE, KEY, serialVersionUID); |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* Constructor to be used in rare cases, usually you must create a new child |
|
61 |
* exception class for each case. |
|
62 |
* <p> |
|
63 |
* <strong>Don't use this constructor in child classes.</strong> |
|
64 |
* </p> |
|
65 |
* |
|
66 |
* @param cause |
|
67 |
* the original cause of the exception |
|
68 |
*/ |
|
69 |
public NewLayerException(Exception cause) { |
|
70 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @see BaseException#BaseException(String, String, long). |
|
75 |
* @param message |
|
76 |
* the default messageFormat to describe the exception |
|
77 |
* @param key |
|
78 |
* the key to use to search a localized messageFormnata |
|
79 |
* @param code |
|
80 |
* the unique code to identify the exception |
|
81 |
*/ |
|
82 |
protected NewLayerException(String message, String key, long code) { |
|
83 |
super(message, key, code); |
|
84 |
} |
|
85 |
|
|
86 |
/** |
|
87 |
* @see BaseException#BaseException(String, Throwable, String, long). |
|
88 |
* @param message |
|
89 |
* the default messageFormat to describe the exception |
|
90 |
* @param cause |
|
91 |
* the original cause of the exception |
|
92 |
* @param key |
|
93 |
* the key to use to search a localized messageFormnata |
|
94 |
* @param code |
|
95 |
* the unique code to identify the exception |
|
96 |
*/ |
|
97 |
protected NewLayerException(String message, Throwable cause, |
|
98 |
String key, long code) { |
|
99 |
super(message, cause, key, code); |
|
100 |
} |
|
101 |
} |
|
0 | 102 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerServiceException.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import org.gvsig.tools.exception.BaseException; |
|
27 |
import org.gvsig.tools.service.ServiceException; |
|
28 |
|
|
29 |
/** |
|
30 |
* Exception thrown when there is an error getting a NewLayer message. |
|
31 |
* |
|
32 |
* @author gvSIG team |
|
33 |
* @version $Id$ |
|
34 |
*/ |
|
35 |
public class NewLayerServiceException extends ServiceException { |
|
36 |
/** |
|
37 |
* |
|
38 |
*/ |
|
39 |
private static final long serialVersionUID = -4395786952326742397L; |
|
40 |
|
|
41 |
private static final String MESSAGE = |
|
42 |
"An error has been produced creating a store"; |
|
43 |
|
|
44 |
private static final String KEY = "_NewLayerServiceException"; |
|
45 |
|
|
46 |
/** |
|
47 |
* @see BaseException#BaseException(String, String, long) |
|
48 |
*/ |
|
49 |
protected NewLayerServiceException(String message, String key, long code) { |
|
50 |
super(message, key, code); |
|
51 |
} |
|
52 |
|
|
53 |
/** |
|
54 |
* @see BaseException#BaseException(String, Throwable, String, long) |
|
55 |
*/ |
|
56 |
protected NewLayerServiceException(String message, Throwable cause, String key, |
|
57 |
long code) { |
|
58 |
super(message, cause, key, code); |
|
59 |
} |
|
60 |
|
|
61 |
/** |
|
62 |
* Creates a new {@link NewLayerServiceException}. |
|
63 |
* |
|
64 |
* @param cause |
|
65 |
* the original cause |
|
66 |
*/ |
|
67 |
public NewLayerServiceException(Throwable cause) { |
|
68 |
super(MESSAGE, cause, KEY, serialVersionUID); |
|
69 |
} |
|
70 |
|
|
71 |
} |
|
0 | 72 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerService.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import java.util.List; |
|
27 |
|
|
28 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
29 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
30 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
31 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
32 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
33 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
34 |
|
|
35 |
/** |
|
36 |
* <p> |
|
37 |
* This service is used to create a new {@link FeatureStore}. |
|
38 |
* </p> |
|
39 |
* |
|
40 |
* @author gvSIG team |
|
41 |
* @version $Id$ |
|
42 |
*/ |
|
43 |
public interface NewLayerService { |
|
44 |
|
|
45 |
/** |
|
46 |
* @deprecated use {@link #setProviderFactory(NewLayerProviderFactory)} |
|
47 |
* instead |
|
48 |
*/ |
|
49 |
public void setType(String type); |
|
50 |
|
|
51 |
/** |
|
52 |
* @deprecated use {@link #getProviderFactory()} instead |
|
53 |
*/ |
|
54 |
public String getType(); |
|
55 |
|
|
56 |
/** |
|
57 |
* @deprecated use {@link #getProviderFactories()} instead |
|
58 |
*/ |
|
59 |
public List<String> getTypes(); |
|
60 |
|
|
61 |
public void setProviderFactory(NewLayerProviderFactory type); |
|
62 |
|
|
63 |
public NewLayerProviderFactory getProviderFactory(); |
|
64 |
|
|
65 |
public List<NewLayerProviderFactory> getProviderFactories(); |
|
66 |
|
|
67 |
public void createLayer() throws NewLayerServiceException; |
|
68 |
|
|
69 |
public void loadLayer() throws NewLayerServiceException; |
|
70 |
|
|
71 |
public DataServerExplorer getExplorer(); |
|
72 |
|
|
73 |
public String getStoreName(); |
|
74 |
|
|
75 |
public EditableFeatureType getFeatureType(); |
|
76 |
|
|
77 |
public NewFeatureStoreParameters getNewStoreParameters(); |
|
78 |
|
|
79 |
public DataStoreParameters getOpenStoreParameters(); |
|
80 |
|
|
81 |
public NewLayerProvider getProvider(); |
|
82 |
|
|
83 |
public void addLayerToView(boolean b); |
|
84 |
|
|
85 |
public MapContext getMapContext(); |
|
86 |
|
|
87 |
} |
|
0 | 88 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerWizard.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import javax.swing.ImageIcon; |
|
27 |
|
|
28 |
import org.gvsig.gui.beans.wizard.WizardPanelWithLogo; |
|
29 |
|
|
30 |
|
|
31 |
public abstract class NewLayerWizard extends WizardPanelWithLogo{ |
|
32 |
|
|
33 |
private static final long serialVersionUID = -9070328984844239279L; |
|
34 |
|
|
35 |
public NewLayerWizard(ImageIcon logo) { |
|
36 |
super(logo); |
|
37 |
} |
|
38 |
|
|
39 |
public abstract NewLayerService getService(); |
|
40 |
|
|
41 |
public abstract void setType(NewLayerProviderFactory currentType); |
|
42 |
|
|
43 |
} |
|
0 | 44 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerProviderFactory.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import org.gvsig.tools.service.spi.ProviderFactory; |
|
27 |
|
|
28 |
/** |
|
29 |
* @author gvSIG Team |
|
30 |
* @version $Id$ |
|
31 |
*/ |
|
32 |
public interface NewLayerProviderFactory extends ProviderFactory { |
|
33 |
|
|
34 |
public boolean isSpatial(); |
|
35 |
|
|
36 |
public NewLayerProvider create(NewLayerService service); |
|
37 |
|
|
38 |
/** |
|
39 |
* If the provider this factory creates is enabled. This option might |
|
40 |
* be used as a way to show or not some providers to the user. |
|
41 |
* |
|
42 |
* @return if the provider is enabled |
|
43 |
*/ |
|
44 |
public boolean isEnabled(); |
|
45 |
|
|
46 |
/** |
|
47 |
* Enable or disable this provider factory. |
|
48 |
* |
|
49 |
* @param value |
|
50 |
* if to enable or disable the factory |
|
51 |
*/ |
|
52 |
public void setEnabled(boolean value); |
|
53 |
|
|
54 |
/** |
|
55 |
* Returns a description of the provider. |
|
56 |
* |
|
57 |
* @return a description for the provider |
|
58 |
*/ |
|
59 |
public String getDescription(); |
|
60 |
|
|
61 |
/** |
|
62 |
* Returns a label or short description for the provider. |
|
63 |
* |
|
64 |
* @return a label or short description for the provider |
|
65 |
*/ |
|
66 |
public String getLabel(); |
|
67 |
} |
|
0 | 68 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLocator.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import org.gvsig.tools.locator.BaseLocator; |
|
27 |
import org.gvsig.tools.locator.Locator; |
|
28 |
import org.gvsig.tools.locator.LocatorException; |
|
29 |
|
|
30 |
/** |
|
31 |
* This locator is the entry point for the NewLayer library, providing |
|
32 |
* access to all NewLayer services through the {@link NewLayerManager} |
|
33 |
* . |
|
34 |
* |
|
35 |
* @author gvSIG team |
|
36 |
* @version $Id$ |
|
37 |
*/ |
|
38 |
public class NewLayerLocator extends BaseLocator { |
|
39 |
|
|
40 |
/** |
|
41 |
* NewLayer manager name. |
|
42 |
*/ |
|
43 |
public static final String MANAGER_NAME = "NewLayer.manager"; |
|
44 |
|
|
45 |
/** |
|
46 |
* NewLayer manager description. |
|
47 |
*/ |
|
48 |
public static final String MANAGER_DESCRIPTION = "NewLayer Manager"; |
|
49 |
|
|
50 |
private static final String LOCATOR_NAME = "NewLayer.locator"; |
|
51 |
|
|
52 |
/** |
|
53 |
* Unique instance. |
|
54 |
*/ |
|
55 |
private static final NewLayerLocator INSTANCE = |
|
56 |
new NewLayerLocator(); |
|
57 |
|
|
58 |
/** |
|
59 |
* Return the singleton instance. |
|
60 |
* |
|
61 |
* @return the singleton instance |
|
62 |
*/ |
|
63 |
public static NewLayerLocator getInstance() { |
|
64 |
return INSTANCE; |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* Return the Locator's name. |
|
69 |
* |
|
70 |
* @return a String with the Locator's name |
|
71 |
*/ |
|
72 |
public final String getLocatorName() { |
|
73 |
return LOCATOR_NAME; |
|
74 |
} |
|
75 |
|
|
76 |
/** |
|
77 |
* Return a reference to the NewLayerManager. |
|
78 |
* |
|
79 |
* @return a reference to the NewLayerManager |
|
80 |
* @throws LocatorException |
|
81 |
* if there is no access to the class or the class cannot be |
|
82 |
* instantiated |
|
83 |
* @see Locator#get(String) |
|
84 |
*/ |
|
85 |
public static NewLayerManager getManager() throws LocatorException { |
|
86 |
return (NewLayerManager) getInstance().get(MANAGER_NAME); |
|
87 |
} |
|
88 |
|
|
89 |
/** |
|
90 |
* Registers the Class implementing the NewLayerManager interface. |
|
91 |
* |
|
92 |
* @param clazz |
|
93 |
* implementing the NewLayerManager interface |
|
94 |
*/ |
|
95 |
public static void registerManager( |
|
96 |
Class<? extends NewLayerManager> clazz) { |
|
97 |
getInstance().register(MANAGER_NAME, MANAGER_DESCRIPTION, clazz); |
|
98 |
} |
|
99 |
|
|
100 |
} |
|
0 | 101 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/NewLayerLibrary.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer; |
|
25 |
|
|
26 |
import org.gvsig.tools.library.AbstractLibrary; |
|
27 |
import org.gvsig.tools.library.LibraryException; |
|
28 |
import org.gvsig.tools.locator.ReferenceNotRegisteredException; |
|
29 |
|
|
30 |
/** |
|
31 |
* Library for API initialization and configuration. |
|
32 |
* |
|
33 |
* @author gvSIG team |
|
34 |
* @version $Id$ |
|
35 |
*/ |
|
36 |
public class NewLayerLibrary extends AbstractLibrary { |
|
37 |
|
|
38 |
@Override |
|
39 |
public void doRegistration() { |
|
40 |
registerAsAPI(NewLayerLibrary.class); |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
protected void doInitialize() throws LibraryException { |
|
45 |
// Do nothing |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
protected void doPostInitialize() throws LibraryException { |
|
50 |
// Validate there is any implementation registered. |
|
51 |
NewLayerManager manager = NewLayerLocator.getManager(); |
|
52 |
if (manager == null) { |
|
53 |
throw new ReferenceNotRegisteredException( |
|
54 |
NewLayerLocator.MANAGER_NAME, NewLayerLocator |
|
55 |
.getInstance()); |
|
56 |
} |
|
57 |
} |
|
58 |
|
|
59 |
} |
|
0 | 60 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProviderFactory.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer.spi; |
|
25 |
|
|
26 |
import org.gvsig.newlayer.NewLayerLocator; |
|
27 |
import org.gvsig.newlayer.NewLayerProviderFactory; |
|
28 |
import org.gvsig.tools.dynobject.DynClass; |
|
29 |
import org.gvsig.tools.dynobject.DynObject; |
|
30 |
import org.gvsig.tools.service.ServiceException; |
|
31 |
import org.gvsig.tools.service.spi.Provider; |
|
32 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
33 |
|
|
34 |
public abstract class AbstractNewLayerProviderFactory implements NewLayerProviderFactory{ |
|
35 |
|
|
36 |
public final Provider doCreate(DynObject parameters, ProviderServices services) { |
|
37 |
throw new UnsupportedOperationException(); |
|
38 |
} |
|
39 |
|
|
40 |
public DynObject createParameters() { |
|
41 |
throw new UnsupportedOperationException(); |
|
42 |
} |
|
43 |
|
|
44 |
public void initialize() { |
|
45 |
throw new UnsupportedOperationException(); |
|
46 |
} |
|
47 |
|
|
48 |
protected DynClass createParametersDynClass() { |
|
49 |
throw new UnsupportedOperationException(); |
|
50 |
} |
|
51 |
|
|
52 |
public Provider create(DynObject parameters, ProviderServices services) |
|
53 |
throws ServiceException { |
|
54 |
throw new UnsupportedOperationException(); |
|
55 |
} |
|
56 |
|
|
57 |
public boolean isEnabled() { |
|
58 |
return NewLayerLocator.getManager().isProviderEnabled(this); |
|
59 |
} |
|
60 |
|
|
61 |
public void setEnabled(boolean value) { |
|
62 |
NewLayerLocator.getManager().enableProvider(this, value); |
|
63 |
} |
|
64 |
|
|
65 |
@Override |
|
66 |
public String toString() { |
|
67 |
return getLabel(); |
|
68 |
} |
|
69 |
} |
|
0 | 70 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/src/main/java/org/gvsig/newlayer/spi/AbstractNewLayerProvider.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer.spi; |
|
25 |
|
|
26 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
27 |
import org.gvsig.newlayer.NewLayerProvider; |
|
28 |
import org.gvsig.newlayer.NewLayerService; |
|
29 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
30 |
|
|
31 |
public abstract class AbstractNewLayerProvider implements NewLayerProvider{ |
|
32 |
|
|
33 |
private NewLayerService service; |
|
34 |
protected DataServerExplorer explorer; |
|
35 |
protected String storeName; |
|
36 |
|
|
37 |
protected AbstractNewLayerProvider(NewLayerService service){ |
|
38 |
this.service = service; |
|
39 |
} |
|
40 |
|
|
41 |
public NewLayerService getService() { |
|
42 |
return service; |
|
43 |
} |
|
44 |
|
|
45 |
public DataServerExplorer getExplorer() { |
|
46 |
return explorer; |
|
47 |
} |
|
48 |
|
|
49 |
public String getStoreName() { |
|
50 |
return storeName; |
|
51 |
} |
|
52 |
|
|
53 |
public void setProviderServices(ProviderServices services) { |
|
54 |
throw new UnsupportedOperationException(); |
|
55 |
} |
|
56 |
|
|
57 |
|
|
58 |
|
|
59 |
} |
|
0 | 60 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.api/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.newlayer.lib.api</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>${project.artifactId}</name> |
|
7 |
<parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.newlayer.lib</artifactId> |
|
10 |
<version>2.0.174</version> |
|
11 |
</parent> |
|
12 |
|
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.ui</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>jwizardcomponent</groupId> |
|
41 |
<artifactId>jwizardcomponent</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
</dependencies> |
|
50 |
|
|
51 |
</project> |
|
52 |
|
|
53 |
|
|
0 | 54 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.newlayer.lib</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.newlayer.lib</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.newlayer</artifactId> |
|
11 |
<version>2.0.174</version> |
|
12 |
</parent> |
|
13 |
|
|
14 |
<modules> |
|
15 |
<module>org.gvsig.newlayer.lib.api</module> |
|
16 |
<module>org.gvsig.newlayer.lib.impl</module> |
|
17 |
</modules> |
|
18 |
</project> |
|
19 |
|
|
20 |
|
|
0 | 21 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<modelVersion>4.0.0</modelVersion> |
|
4 |
<artifactId>org.gvsig.newlayer.lib.impl</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>${project.artifactId}</name> |
|
7 |
<parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.newlayer.lib</artifactId> |
|
10 |
<version>2.0.174</version> |
|
11 |
</parent> |
|
12 |
|
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.newlayer.lib.api</artifactId> |
|
17 |
<scope>compile</scope> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
22 |
<scope>compile</scope> |
|
23 |
</dependency> |
|
24 |
<dependency> |
|
25 |
<groupId>org.gvsig</groupId> |
|
26 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
27 |
<scope>compile</scope> |
|
28 |
</dependency> |
|
29 |
<dependency> |
|
30 |
<groupId>org.gvsig</groupId> |
|
31 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
32 |
<scope>compile</scope> |
|
33 |
</dependency> |
|
34 |
<dependency> |
|
35 |
<groupId>org.gvsig</groupId> |
|
36 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
37 |
<scope>compile</scope> |
|
38 |
</dependency> |
|
39 |
<dependency> |
|
40 |
<groupId>org.gvsig</groupId> |
|
41 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
42 |
<scope>compile</scope> |
|
43 |
</dependency> |
|
44 |
<dependency> |
|
45 |
<groupId>org.gvsig</groupId> |
|
46 |
<artifactId>org.gvsig.ui</artifactId> |
|
47 |
<scope>compile</scope> |
|
48 |
</dependency> |
|
49 |
<dependency> |
|
50 |
<groupId>org.gvsig</groupId> |
|
51 |
<artifactId>org.gvsig.utils</artifactId> |
|
52 |
<scope>compile</scope> |
|
53 |
</dependency> |
|
54 |
<dependency> |
|
55 |
<groupId>org.gvsig</groupId> |
|
56 |
<artifactId>org.gvsig.i18n</artifactId> |
|
57 |
<scope>compile</scope> |
|
58 |
</dependency> |
|
59 |
<dependency> |
|
60 |
<groupId>org.gvsig</groupId> |
|
61 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
62 |
<scope>compile</scope> |
|
63 |
</dependency> |
|
64 |
<dependency> |
|
65 |
<groupId>org.gvsig</groupId> |
|
66 |
<artifactId>org.gvsig.fmap.mapcontext.api</artifactId> |
|
67 |
<scope>compile</scope> |
|
68 |
</dependency> |
|
69 |
<dependency> |
|
70 |
<groupId>org.gvsig</groupId> |
|
71 |
<artifactId>org.gvsig.projection.cresques.ui</artifactId> |
|
72 |
<scope>compile</scope> |
|
73 |
</dependency> |
|
74 |
|
|
75 |
<!-- Test Dependencies --> |
|
76 |
|
|
77 |
<!-- |
|
78 |
<dependency> |
|
79 |
<groupId>org.gvsig</groupId> |
|
80 |
<artifactId>org.gvsig.newlayer.lib.api</artifactId> |
|
81 |
<type>test-jar</type> |
|
82 |
<scope>test</scope> |
|
83 |
</dependency> |
|
84 |
--> |
|
85 |
<dependency> |
|
86 |
<groupId>org.gvsig</groupId> |
|
87 |
<artifactId>org.gvsig.fmap.dal.file.lib</artifactId> |
|
88 |
<scope>test</scope> |
|
89 |
</dependency> |
|
90 |
<dependency> |
|
91 |
<groupId>org.gvsig</groupId> |
|
92 |
<artifactId>org.gvsig.fmap.dal.file.dbf</artifactId> |
|
93 |
<scope>test</scope> |
|
94 |
</dependency> |
|
95 |
<dependency> |
|
96 |
<groupId>org.gvsig</groupId> |
|
97 |
<artifactId>org.gvsig.fmap.dal.file.shp</artifactId> |
|
98 |
<scope>test</scope> |
|
99 |
</dependency> |
|
100 |
<dependency> |
|
101 |
<groupId>org.gvsig</groupId> |
|
102 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
103 |
<scope>test</scope> |
|
104 |
</dependency> |
|
105 |
|
|
106 |
|
|
107 |
</dependencies> |
|
108 |
</project> |
|
109 |
|
|
110 |
|
|
0 | 111 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your test classes. |
|
2 |
|
|
3 |
This folder is added to the Tests classpath, so you can load any resources |
|
4 |
through the ClassLoader. |
|
5 |
|
|
6 |
By default, in this folder you can find an example of log4j configuration, |
|
7 |
prepared to log messages through the console, so logging works when you |
|
8 |
run your tests classes. |
|
0 | 9 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/test/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!-- |
|
3 |
|
|
4 |
gvSIG. Desktop Geographic Information System. |
|
5 |
|
|
6 |
Copyright (C) 2007-2013 gvSIG Association. |
|
7 |
|
|
8 |
This program is free software; you can redistribute it and/or |
|
9 |
modify it under the terms of the GNU General Public License |
|
10 |
as published by the Free Software Foundation; either version 3 |
|
11 |
of the License, or (at your option) any later version. |
|
12 |
|
|
13 |
This program is distributed in the hope that it will be useful, |
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
GNU General Public License for more details. |
|
17 |
|
|
18 |
You should have received a copy of the GNU General Public License |
|
19 |
along with this program; if not, write to the Free Software |
|
20 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
21 |
MA 02110-1301, USA. |
|
22 |
|
|
23 |
For any additional information, do not hesitate to contact us |
|
24 |
at info AT gvsig.com, or visit our website www.gvsig.com. |
|
25 |
|
|
26 |
--> |
|
27 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
28 |
|
|
29 |
<!-- |
|
30 |
Log4J configuration file for unit tests execution. |
|
31 |
--> |
|
32 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
33 |
|
|
34 |
<!-- Appender configuration to show logging messages through the console --> |
|
35 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
36 |
<layout class="org.apache.log4j.PatternLayout"> |
|
37 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
38 |
</layout> |
|
39 |
</appender> |
|
40 |
|
|
41 |
<!-- |
|
42 |
Activate logging messages of DEBUG level of higher only for the |
|
43 |
org.gvsig.tools packages. |
|
44 |
You can put full classes names or packages instead, to configure |
|
45 |
logging for all the classes and subpackages of the package. |
|
46 |
--> |
|
47 |
<category name="org.gvsig.tools"> |
|
48 |
<priority value="DEBUG" /> |
|
49 |
</category> |
|
50 |
<category name="org.gvsig.newlayer"> |
|
51 |
<priority value="DEBUG" /> |
|
52 |
</category> |
|
53 |
|
|
54 |
<!-- |
|
55 |
By default, show only logging messages of INFO level or higher, |
|
56 |
through the previously configured CONSOLE appender. |
|
57 |
--> |
|
58 |
<root> |
|
59 |
<priority value="INFO" /> |
|
60 |
<appender-ref ref="CONSOLE" /> |
|
61 |
</root> |
|
62 |
</log4j:configuration> |
|
0 | 63 |
tags/org.gvsig.desktop-2.0.174/org.gvsig.desktop.library/org.gvsig.newlayer/org.gvsig.newlayer.lib/org.gvsig.newlayer.lib.impl/src/main/java/org/gvsig/newlayer/impl/FeatureTypePanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2007-2013 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 3 |
|
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.newlayer.impl; |
|
25 |
|
|
26 |
import java.awt.BorderLayout; |
|
27 |
import java.awt.Component; |
|
28 |
import java.awt.GridBagConstraints; |
|
29 |
import java.awt.GridBagLayout; |
|
30 |
import java.awt.Insets; |
|
31 |
import java.awt.event.ActionEvent; |
|
32 |
import java.awt.event.ActionListener; |
|
33 |
import java.awt.event.ItemEvent; |
|
34 |
import java.awt.event.ItemListener; |
|
35 |
import java.util.ArrayList; |
|
36 |
import java.util.Iterator; |
|
37 |
import java.util.List; |
|
38 |
|
|
39 |
import javax.swing.ComboBoxModel; |
|
40 |
import javax.swing.DefaultCellEditor; |
|
41 |
import javax.swing.JButton; |
|
42 |
import javax.swing.JCheckBox; |
|
43 |
import javax.swing.JComboBox; |
|
44 |
import javax.swing.JLabel; |
|
45 |
import javax.swing.JOptionPane; |
|
46 |
import javax.swing.JPanel; |
|
47 |
import javax.swing.JScrollPane; |
|
48 |
import javax.swing.JTable; |
|
49 |
import javax.swing.JTextField; |
|
50 |
import javax.swing.ListSelectionModel; |
|
51 |
import javax.swing.UIManager; |
Also available in: Unified diff