Revision 301
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
31 | 31 |
<include>org.gvsig:org.gvsig.dxf.provider.legend</include> |
32 | 32 |
<include>org.gvsig:org.gvsig.dxf.provider</include> |
33 | 33 |
<include>org.gvsig:org.gvsig.dxf.lib</include> |
34 |
<include>org.gvsig:org.gvsig.dxf.exportto</include> |
|
34 | 35 |
</includes> |
35 | 36 |
</dependencySet> |
36 | 37 |
</dependencySets> |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/src/main/resources-plugin/config.xml | ||
---|---|---|
2 | 2 |
<plugin-config> |
3 | 3 |
<libraries library-dir="lib/"/> |
4 | 4 |
<depends plugin-name="org.gvsig.app.mainplugin"/> |
5 |
<depends plugin-name="org.gvsig.exportto.app.mainplugin" optional="true"/> |
|
5 | 6 |
<resourceBundle name="text"/> |
6 | 7 |
<extensions> |
7 | 8 |
<extension class-name="org.gvsig.andami.LibraryExtension" active="false"/> |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.app/org.gvsig.dxf.app.mainplugin/pom.xml | ||
---|---|---|
36 | 36 |
</dependency> |
37 | 37 |
<dependency> |
38 | 38 |
<groupId>org.gvsig</groupId> |
39 |
<artifactId>org.gvsig.dxf.exportto</artifactId> |
|
40 |
<scope>runtime</scope> |
|
41 |
</dependency> |
|
42 |
<dependency> |
|
43 |
<groupId>org.gvsig</groupId> |
|
39 | 44 |
<artifactId>org.gvsig.dxf.provider.legend</artifactId> |
40 | 45 |
<scope>compile</scope> |
41 | 46 |
</dependency> |
42 | 47 |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/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.dxf.exportto</artifactId> |
|
5 |
<packaging>jar</packaging> |
|
6 |
<name>${project.artifactId}</name> |
|
7 |
<parent> |
|
8 |
<groupId>org.gvsig</groupId> |
|
9 |
<artifactId>org.gvsig.dxf</artifactId> |
|
10 |
<version>2.0.70-SNAPSHOT</version> |
|
11 |
</parent> |
|
12 |
|
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.exportto.swing.api</artifactId> |
|
17 |
</dependency> |
|
18 |
<dependency> |
|
19 |
<groupId>org.gvsig</groupId> |
|
20 |
<artifactId>org.gvsig.exportto.swing.spi</artifactId> |
|
21 |
</dependency> |
|
22 |
<dependency> |
|
23 |
<groupId>org.gvsig</groupId> |
|
24 |
<artifactId>org.gvsig.exportto.swing.prov.file</artifactId> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.gvsig</groupId> |
|
28 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
29 |
<scope>compile</scope> |
|
30 |
</dependency> |
|
31 |
<dependency> |
|
32 |
<groupId>org.gvsig</groupId> |
|
33 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
34 |
<scope>compile</scope> |
|
35 |
</dependency> |
|
36 |
<dependency> |
|
37 |
<groupId>org.gvsig</groupId> |
|
38 |
<artifactId>org.gvsig.fmap.dal.api</artifactId> |
|
39 |
<scope>compile</scope> |
|
40 |
</dependency> |
|
41 |
<dependency> |
|
42 |
<groupId>org.gvsig</groupId> |
|
43 |
<artifactId>org.gvsig.fmap.geometry.api</artifactId> |
|
44 |
<scope>compile</scope> |
|
45 |
</dependency> |
|
46 |
<dependency> |
|
47 |
<groupId>org.gvsig</groupId> |
|
48 |
<artifactId>org.gvsig.projection.api</artifactId> |
|
49 |
<scope>compile</scope> |
|
50 |
</dependency> |
|
51 |
<dependency> |
|
52 |
<groupId>org.gvsig</groupId> |
|
53 |
<artifactId>org.gvsig.metadata.lib.basic.api</artifactId> |
|
54 |
<scope>compile</scope> |
|
55 |
</dependency> |
|
56 |
</dependencies> |
|
57 |
</project> |
|
58 |
|
|
59 |
|
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.exportto.swing.prov.dxf.ExporttoDXFProviderLibrary |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/java/org/gvsig/exportto/swing/prov/dxf/ExporttoDXFProviderFactory.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.exportto.swing.prov.dxf; |
|
25 |
|
|
26 |
import org.cresques.cts.IProjection; |
|
27 |
|
|
28 |
import org.gvsig.exportto.swing.ExporttoSwingManager; |
|
29 |
import org.gvsig.exportto.swing.prov.file.AbstractExporttoFileProviderFactory; |
|
30 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
31 |
import org.gvsig.tools.dynobject.DynObject; |
|
32 |
import org.gvsig.tools.service.ServiceException; |
|
33 |
import org.gvsig.tools.service.spi.Provider; |
|
34 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
35 |
|
|
36 |
/** |
|
37 |
* Factory of file {@link ExportoProvider} objects. |
|
38 |
* |
|
39 |
* @author gvSIG Team |
|
40 |
* @version $Id$ |
|
41 |
*/ |
|
42 |
public class ExporttoDXFProviderFactory extends |
|
43 |
AbstractExporttoFileProviderFactory { |
|
44 |
|
|
45 |
private static final String PROVIDER_NAME = "DXF"; |
|
46 |
|
|
47 |
public ExporttoDXFProviderFactory() { |
|
48 |
super(new int[] { ExporttoSwingManager.VECTORIAL_TABLE_WITH_GEOMETRY }); |
|
49 |
} |
|
50 |
|
|
51 |
public Provider create(DynObject parameters, ProviderServices services) |
|
52 |
throws ServiceException { |
|
53 |
return new ExporttoDXFProvider(services, |
|
54 |
(FeatureStore) parameters.getDynValue(PARAMETER_FEATURESTORE), |
|
55 |
(IProjection) parameters.getDynValue(PARAMETER_PROJECTION)); |
|
56 |
} |
|
57 |
|
|
58 |
public String getName() { |
|
59 |
return PROVIDER_NAME; |
|
60 |
} |
|
61 |
} |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/java/org/gvsig/exportto/swing/prov/dxf/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
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 html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
28 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
29 |
<head> |
|
30 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
31 |
<title>org.gvsig.exporto package documentation</title> |
|
32 |
</head> |
|
33 |
<body> |
|
34 |
|
|
35 |
<p>Exporto provider which gets Exporto from a file.</p> |
|
36 |
|
|
37 |
</body> |
|
38 |
</html> |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/java/org/gvsig/exportto/swing/prov/dxf/ExporttoDXFProvider.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.exportto.swing.prov.dxf; |
|
25 |
|
|
26 |
import org.cresques.cts.IProjection; |
|
27 |
|
|
28 |
import org.gvsig.exportto.ExporttoService; |
|
29 |
import org.gvsig.exportto.swing.prov.file.AbstractExporttoFileProvider; |
|
30 |
import org.gvsig.exportto.swing.spi.ExporttoSwingProvider; |
|
31 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
32 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
33 |
|
|
34 |
/** |
|
35 |
* Exporto provider which gets Exporto from a file. |
|
36 |
* |
|
37 |
* @author gvSIG Team |
|
38 |
* @version $Id$ |
|
39 |
*/ |
|
40 |
public class ExporttoDXFProvider extends AbstractExporttoFileProvider implements |
|
41 |
ExporttoSwingProvider { |
|
42 |
|
|
43 |
/** |
|
44 |
* Constructor. |
|
45 |
* |
|
46 |
* @param providerServices |
|
47 |
* the services for the provider |
|
48 |
* @param file |
|
49 |
* to get the Exporto from |
|
50 |
*/ |
|
51 |
public ExporttoDXFProvider(ProviderServices providerServices, |
|
52 |
FeatureStore featureStore, IProjection projection) { |
|
53 |
super(providerServices, featureStore, projection); |
|
54 |
} |
|
55 |
|
|
56 |
public ExporttoService createExporttoService() { |
|
57 |
return new ExporttoDXFService(selectFileOptionPanel.getSelectedFile(), |
|
58 |
featureStore, projection); |
|
59 |
} |
|
60 |
} |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/java/org/gvsig/exportto/swing/prov/dxf/ExporttoDXFProviderLibrary.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.exportto.swing.prov.dxf; |
|
25 |
|
|
26 |
import org.gvsig.exportto.swing.ExporttoSwingLibrary; |
|
27 |
import org.gvsig.exportto.swing.spi.ExporttoSwingProviderLocator; |
|
28 |
import org.gvsig.tools.library.AbstractLibrary; |
|
29 |
import org.gvsig.tools.library.LibraryException; |
|
30 |
import org.gvsig.tools.service.spi.ProviderManager; |
|
31 |
|
|
32 |
/** |
|
33 |
* Library to initialize and register the file Exporto provider |
|
34 |
* implementation. |
|
35 |
* |
|
36 |
* @author gvSIG Team |
|
37 |
* @version $Id$ |
|
38 |
*/ |
|
39 |
public class ExporttoDXFProviderLibrary extends AbstractLibrary { |
|
40 |
|
|
41 |
@Override |
|
42 |
public void doRegistration() { |
|
43 |
registerAsServiceOf(ExporttoSwingLibrary.class); |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
protected void doInitialize() throws LibraryException { |
|
48 |
// Nothing to do |
|
49 |
} |
|
50 |
|
|
51 |
@Override |
|
52 |
protected void doPostInitialize() throws LibraryException { |
|
53 |
ProviderManager providerManager = |
|
54 |
ExporttoSwingProviderLocator.getManager(); |
|
55 |
providerManager.addProviderFactory(new ExporttoDXFProviderFactory()); |
|
56 |
} |
|
57 |
|
|
58 |
} |
org.gvsig.dxf/trunk/org.gvsig.dxf/org.gvsig.dxf.exportto/src/main/java/org/gvsig/exportto/swing/prov/dxf/ExporttoDXFService.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.exportto.swing.prov.dxf; |
|
25 |
|
|
26 |
import java.io.File; |
|
27 |
|
|
28 |
import org.cresques.cts.IProjection; |
|
29 |
|
|
30 |
import org.gvsig.exportto.ExporttoService; |
|
31 |
import org.gvsig.exportto.ExporttoServiceException; |
|
32 |
import org.gvsig.exportto.swing.prov.file.AbstractExporttoFileService; |
|
33 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
34 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
35 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
36 |
import org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters; |
|
37 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
|
38 |
import org.gvsig.tools.task.SimpleTaskStatus; |
|
39 |
|
|
40 |
/** |
|
41 |
* @author gvSIG Team |
|
42 |
* @version $Id$ |
|
43 |
* |
|
44 |
*/ |
|
45 |
public class ExporttoDXFService extends AbstractExporttoFileService implements |
|
46 |
ExporttoService { |
|
47 |
|
|
48 |
private IProjection projection; |
|
49 |
|
|
50 |
private NewFeatureStoreParameters newFeatureStoreParameters; |
|
51 |
|
|
52 |
public ExporttoDXFService(File dxfFile, FeatureStore featureStore, |
|
53 |
IProjection projection) { |
|
54 |
super(dxfFile, featureStore); |
|
55 |
if( !dxfFile.getName().toLowerCase().endsWith(".dxf") ) { |
|
56 |
this.file = new File(dxfFile.getAbsolutePath()+".dxf"); |
|
57 |
} |
|
58 |
this.projection = projection; |
|
59 |
try { |
|
60 |
this.open(); |
|
61 |
} catch (ExporttoServiceException e) { |
|
62 |
((SimpleTaskStatus) getTaskStatus()).message(e.getMessage()); |
|
63 |
} |
|
64 |
} |
|
65 |
|
|
66 |
public NewFeatureStoreParameters getNewFeatureStoreParameters() { |
|
67 |
return newFeatureStoreParameters; |
|
68 |
} |
|
69 |
|
|
70 |
@Override |
|
71 |
public void addParameters( |
|
72 |
NewFeatureStoreParameters newFeatureStoreParameters) { |
|
73 |
newFeatureStoreParameters.setDynValue("CRS", projection); |
|
74 |
((FilesystemStoreParameters)newFeatureStoreParameters).setFile(file); |
|
75 |
} |
|
76 |
|
|
77 |
@Override |
|
78 |
public void addParameters( |
|
79 |
OpenFeatureStoreParameters openFeatureStoreParameters) { |
|
80 |
openFeatureStoreParameters.setDynValue("CRS", projection); |
|
81 |
((FilesystemStoreParameters)openFeatureStoreParameters).setFile(file); |
|
82 |
} |
|
83 |
|
|
84 |
@Override |
|
85 |
public String getFileExtension() { |
|
86 |
return "dxf"; |
|
87 |
} |
|
88 |
} |
|
0 | 89 |
org.gvsig.dxf/trunk/org.gvsig.dxf/pom.xml | ||
---|---|---|
69 | 69 |
</dependency> |
70 | 70 |
<dependency> |
71 | 71 |
<groupId>org.gvsig</groupId> |
72 |
<artifactId>org.gvsig.dxf.exportto</artifactId> |
|
73 |
<version>2.0.70-SNAPSHOT</version> |
|
74 |
</dependency> |
|
75 |
<dependency> |
|
76 |
<groupId>org.gvsig</groupId> |
|
72 | 77 |
<artifactId>org.gvsig.dxf.app.mainplugin</artifactId> |
73 | 78 |
<version>2.0.71-SNAPSHOT</version> |
74 | 79 |
</dependency> |
... | ... | |
88 | 93 |
<module>org.gvsig.dxf.lib</module> |
89 | 94 |
<module>org.gvsig.dxf.provider</module> |
90 | 95 |
<module>org.gvsig.dxf.provider.legend</module> |
96 |
<module>org.gvsig.dxf.exportto</module> |
|
91 | 97 |
</modules> |
92 | 98 |
|
93 | 99 |
|
94 | 100 |
Also available in: Unified diff