Revision 38300

View differences:

tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/prepare-workspace.xml
1
<project name="org.gvsig.initial.build" default="prepare-workspace">
2

  
3
	<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}" />
4

  
5
	<property name="workspace.basedir" value="${org.gvsig.initial.build.basedir}/.." />
6
	<property name="build.basedir" value="${workspace.basedir}/org.gvsig.maven.base.build" description="Eclipse workspace location" />
7
	<property name="build.jar.version" value="1.0.8-SNAPSHOT" />
8
	<property name="build.jar.file" value="org.gvsig.maven.base.build-${build.jar.version}.jar" />
9

  
10
	<property name="ant.libs.dir" location="${build.basedir}" description="Additional ant tasks libs folder" />
11

  
12
	<target name="check-maven-base-build-available">
13
		<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" property="maven-base-build-available" />
14
	</target>
15

  
16
	<target name="get-maven-base-build-local" depends="check-maven-base-build-available" if="maven-base-build-available">
17
		<!-- Unzip de build jar file from the maven repository into the workspace root folder -->
18
		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
19
			<zipfileset src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}">
20
				<patternset>
21
					<exclude name="META-INF/**" />
22
				</patternset>
23
			</zipfileset>
24
		</copy>
25
	</target>
26

  
27
	<target name="get-maven-base-build-remote" depends="check-maven-base-build-available" unless="maven-base-build-available">
28
		<mkdir dir="target" />
29

  
30
		<!-- Download the build jar file -->
31
		<get src="http://devel.gvsig.org/m2repo/j2se/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" dest="target/${build.jar.file}" verbose="true" />
32

  
33
		<!-- Unzip de build jar file into the workspace root folder -->
34
		<copy todir="${workspace.basedir}" preservelastmodified="false" filtering="false">
35
			<zipfileset src="target/${build.jar.file}">
36
				<patternset>
37
					<exclude name="META-INF/**" />
38
				</patternset>
39
			</zipfileset>
40
		</copy>
41

  
42
	</target>
43
	
44
	<target name="find.depends.natives.file">
45
	    <condition property="depends.natives.file.exists">
46
            <available file="${org.gvsig.initial.build.basedir}/DEPENDS_ON_NATIVE_LIBRARIES"/>
47
	    </condition>	
48
	</target>
49
	
50
	<target name="find.gvsig.platform.properties.file" 
51
			depends="find.depends.natives.file"
52
			if="depends.natives.file.exists">
53
	    <condition property="gvsig.platform.exists">
54
            <available file="${user.home}/.gvsig.platform.properties"/>
55
	    </condition>	
56
	</target>
57
	
58
	<target name="check.gvsig.platform.properties" 
59
			depends="find.gvsig.platform.properties.file">
60
		<fail if="depends.natives.file.exists" unless="gvsig.platform.exists">
61
ERROR!!
62
	
63
You have to define your gvSIG platform properties, 
64
by creating the file: ${user.home}/.gvsig.platform.properties
65
with the following content:
66

  
67
native_platform=linux
68
native_distribution=all
69
native_compiler=gcc4
70
native_arch=i386
71
native_libraryType=dynamic
72
export native_classifier=${native_platform}-${native_distribution}-${native_compiler}-${native_arch}-${native_libraryType}
73

  
74
Replace the fifth initial variables values with the ones appropiate 
75
to your platform.
76
	
77
If you use maven in the command line, you can use the previous file also
78
to define the MAVEN_OPTS environment variable, by adding to your 
79
.bash_rc file something like this:
80

  
81
if [ -f "${HOME}/.gvsig.platform.properties" ]
82
then
83
    . ${HOME}/.gvsig.platform.properties
84
    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m -Dnative-classifier=${native_classifier}"
85
else
86
    export MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=64m"
87
fi
88

  
89
It will work if you use the bash shell. In any other case or platform, you'll
90
have to define your MAVEN_OPTS environment variable and set the 
91
"native-classifier" parameter directly.
92
		</fail>			
93
	
94
	</target>
95

  
96
	<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote,check.gvsig.platform.properties">
97

  
98
		<mkdir dir="target" />
99

  
100
		<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug" />
101

  
102
		<!-- Copy the maven launchers to the workspace metadata folder -->
103
		<copy todir="${workspace.basedir}/.metadata">
104
			<fileset dir="${build.basedir}/eclipse-launchers">
105
				<exclude name="**/org.eclipse.jdt.core.prefs" />
106
				<exclude name="**/org.eclipse.core.variables.prefs" />
107
			</fileset>
108
		</copy>
109

  
110
		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" append="true">
111
			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.jdt.core.prefs" />
112
		</concat>
113
		<concat destfile="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" append="true">
114
			<filelist dir="${build.basedir}/eclipse-launchers/.plugins/org.eclipse.core.runtime/.settings" files="org.eclipse.core.variables.prefs" />
115
		</concat>
116

  
117
		<!-- Configure the eclipse workspace -->
118
		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace" />
119

  
120
		<!-- Configure the gvSIG profile -->
121
		<ant antfile="${build.basedir}/check-gvsig-profile.xml" />
122

  
123
		<property name="user-settings-file-location" value="${user.home}/.m2/settings.xml" />
124

  
125
		<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask">
126
			<classpath>
127
				<pathelement location="${ant.libs.dir}/com.oopsconsultancy.xmltask-1.16.1.jar" />
128
			</classpath>
129
		</taskdef>
130

  
131
		<xmltask source="${user-settings-file-location}" dest="${user-settings-file-location}">
132
			<copy path="//:settings/:profiles/:profile[:id/text() = 'gvsig-install']/:properties/:gvsig.install.dir/text()" property="current-gvsig-location" />
133
		</xmltask>
134

  
135
		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
136
		<replace file="${workspace.basedir}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.variables.prefs" token="@GVSIG_HOME@" value="${current-gvsig-location}" />
137

  
138
		<!-- Compile, install and generate eclipse projects -->
139
		<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse" />
140

  
141
		<echo>INFORMATION!!!</echo>
142
		<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo>
143

  
144
		<!-- TODO: copiar al proyecto de configuraciĆ³n general -->
145
	</target>
146

  
147
	<target name="clean">
148
		<delete dir="target" />
149
	</target>
150
	
151
</project>
0 152

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/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"
4
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
	<modelVersion>4.0.0</modelVersion>
6
	<artifactId>org.gvsig.exportto</artifactId>
7
	<packaging>pom</packaging>
8
	<version>1.0.0-SNAPSHOT</version>
9
	<name>org.gvsig.exportto</name>
10
	<description>Exportto example project</description>
11
	<parent>
12
		<groupId>org.gvsig</groupId>
13
		<artifactId>org.gvsig.maven.base.pom</artifactId>
14
		<version>1.0.8-SNAPSHOT</version>
15
	</parent>
16

  
17
    <scm>
18
        <connection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.exportto</connection>
19
        <developerConnection>scm:svn:https://devel.gvsig.org/svn/gvsig-desktop/branches/v2_0_0_prep/libraries/org.gvsig.exportto</developerConnection>
20
        <url>https://devel.gvsig.org/redmine/projects/gvsig-desktop/repository/show/branches/v2_0_0_prep/libraries/org.gvsig.exportto</url>
21
    </scm>
22

  
23
	<developers>
24
        <developer>
25
            <id>jpiera</id>
26
            <name>Jorge Piera</name>
27
            <email>jpiera@gvsig.org</email>
28
            <roles>
29
                <role>Architect</role>
30
                <role>Developer</role>
31
            </roles>
32
        </developer>
33
        <developer>
34
            <id>jjdelcerro</id>
35
            <name>Joaqu?n Jos? del Cerro</name>
36
            <email>jjdelcerro@gvsig.org</email>
37
            <roles>
38
                <role>Architect</role>          
39
            </roles>
40
        </developer>        
41
    </developers>
42
	<repositories>
43
		<repository>
44
			<id>gvsig-public-http-repository</id>
45
			<name>gvSIG maven public HTTP repository</name>
46
            <url>http://devel.gvsig.org/m2repo/j2se</url>
47
			<releases>
48
				<enabled>true</enabled>
49
				<updatePolicy>daily</updatePolicy>
50
				<checksumPolicy>warn</checksumPolicy>
51
			</releases>
52
			<snapshots>
53
				<enabled>true</enabled>
54
				<updatePolicy>daily</updatePolicy>
55
				<checksumPolicy>warn</checksumPolicy>
56
			</snapshots>
57
		</repository>
58
	</repositories>
59
	<dependencyManagement>
60
		<dependencies>			
61
            <dependency>
62
                <groupId>org.gvsig</groupId>
63
                <artifactId>org.gvsig.core.maven.dependencies</artifactId>
64
                <version>2.0.1-SNAPSHOT</version>
65
                <type>pom</type>
66
                <scope>import</scope>
67
            </dependency>
68
            <dependency>
69
                <groupId>org.gvsig</groupId>
70
                <artifactId>org.gvsig.geodb</artifactId>
71
                <version>2.0-SNAPSHOT</version>
72
            </dependency>
73
		</dependencies>
74
	</dependencyManagement>
75

  
76
	<dependencies>
77
		<dependency>
78
			<groupId>org.gvsig</groupId>
79
			<artifactId>org.gvsig.tools.lib</artifactId>
80
		</dependency>
81
		<dependency>
82
			<groupId>org.gvsig</groupId>
83
			<artifactId>org.gvsig.tools.lib</artifactId>
84
			<type>test-jar</type>
85
		</dependency>	
86
	</dependencies>
87

  
88
	<modules>
89
		<module>org.gvsig.exportto.lib</module>
90
		<module>org.gvsig.exportto.swing</module>
91
		<module>org.gvsig.exportto.main</module>
92
	</modules>
93

  
94
</project>
0 95

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/README.txt
1
The first time you checkout the current project to a new workspace, 
2
you have to prepare it to be able to work easily with maven from
3
eclipse itself.
4

  
5
Perform the following steps:
6

  
7
1.- Launch the *prepare-workspace.xml* ant build file. 
8
    You can do it by loading the file into the ant view, 
9
    and running the default task, or right-clicking the 
10
    file from the package explorer or the navigator and
11
    select the option: *Run as > Ant build*. 
12
    
13
2.- Restart eclipse.
14

  
15
3.- Import the subprojects of the project you have just checked out.
16

  
17
Those steps are only needed once per workspace.     
18

  
0 19

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.main/src/main/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
3

  
4
<!-- 
5
Log4J configuration file for unit tests execution.
6
 -->
7
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
8

  
9
	<!-- Appender configuration to show logging messages through the console -->
10
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
11
		<layout class="org.apache.log4j.PatternLayout">
12
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
13
		</layout>
14
	</appender>
15

  
16
	<!-- 
17
	Activate logging messages of DEBUG level of higher only for the
18
	org.gvsig.tools packages.
19
	You can put full classes names or packages instead, to configure
20
	logging for all the classes and subpackages of the package.
21
	-->
22
	<category name="org.gvsig.tools">
23
		<priority value="DEBUG" />
24
	</category>
25
	<category name="org.gvsig.exportto">
26
		<priority value="DEBUG" />
27
	</category>
28

  
29
	<!-- 
30
	By default, show only logging messages of INFO level or higher, 
31
	through the previously configured CONSOLE appender. 
32
	-->
33
	<root>
34
		<priority value="INFO" />
35
		<appender-ref ref="CONSOLE" />
36
	</root>
37
</log4j:configuration>
0 38

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.main/src/main/resources/README.txt
1
Put into this folder the resources needed by your classes.
2

  
3
This folder is added to the 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 classes.
0 9

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.main/src/main/java/org/gvsig/exportto/main/package.html
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
<title>org.gvsig.exportto package documentation</title>
7
</head>
8
<body>
9

  
10
	<p>Exportto library testing and demo application.</p>
11

  
12
</body>
13
</html>
0 14

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.main/src/main/java/org/gvsig/exportto/main/Main.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto.main;
23

  
24
import java.awt.BorderLayout;
25
import java.awt.Dimension;
26
import java.awt.event.ActionEvent;
27

  
28
import javax.swing.AbstractAction;
29
import javax.swing.Action;
30
import javax.swing.JButton;
31
import javax.swing.JFrame;
32
import javax.swing.JMenu;
33
import javax.swing.JMenuBar;
34
import javax.swing.JMenuItem;
35
import javax.swing.JToolBar;
36
import javax.swing.WindowConstants;
37

  
38
import org.slf4j.Logger;
39
import org.slf4j.LoggerFactory;
40

  
41
import org.gvsig.exportto.ExporttoLocator;
42
import org.gvsig.exportto.ExporttoManager;
43
import org.gvsig.exportto.swing.ExporttoSwingLocator;
44
import org.gvsig.exportto.swing.ExporttoSwingManager;
45
import org.gvsig.exportto.swing.ExporttoWindowManager;
46
import org.gvsig.exportto.swing.JExporttoServicePanel;
47
import org.gvsig.exportto.swing.preferences.ExporttoSwingPreferencesComponent;
48
import org.gvsig.exportto.swing.spi.ExporttoSwingProviderLocator;
49
import org.gvsig.fmap.crs.CRSFactory;
50
import org.gvsig.fmap.dal.DALLocator;
51
import org.gvsig.fmap.dal.DataManager;
52
import org.gvsig.fmap.dal.DataStoreParameters;
53
import org.gvsig.fmap.dal.exception.InitializeException;
54
import org.gvsig.fmap.dal.exception.ProviderNotRegisteredException;
55
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
56
import org.gvsig.fmap.dal.feature.FeatureStore;
57
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
58

  
59
/**
60
 * Main executable class for testing the Exportto library.
61
 * 
62
 * @author gvSIG Team
63
 * @version $Id$
64
 */
65
public class Main {
66

  
67
    private static final Logger LOG = LoggerFactory.getLogger(Main.class);
68

  
69
    private ExporttoManager manager;
70
    private ExporttoSwingManager swingManager;
71
    private DataManager dataManager;
72

  
73
    public static void main(String args[]) {
74
        new DefaultLibrariesInitializer().fullInitialize();
75
        Main main = new Main();
76
        main.show();
77
    }
78

  
79
    @SuppressWarnings("serial")
80
    public void show() {
81
        manager = ExporttoLocator.getManager();
82
        swingManager = ExporttoSwingLocator.getSwingManager();
83
        dataManager = DALLocator.getDataManager();
84

  
85
        Action showCookie = new AbstractAction("Get a Exportto") {
86

  
87
            public void actionPerformed(ActionEvent e) {
88
                showExportto(manager);
89
            }
90
        };
91

  
92
        Action preferences = new AbstractAction("Exportto preferences") {
93

  
94
            public void actionPerformed(ActionEvent e) {
95
                showExporttoPreferences();
96
            }
97

  
98
        };
99

  
100
        Action exit = new AbstractAction("Exit") {
101

  
102
            public void actionPerformed(ActionEvent e) {
103
                System.exit(0);
104
            }
105
        };
106

  
107
        JFrame frame = new JFrame("Exportto example app");
108
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
109

  
110
        // Create the menu bar.
111
        JMenuBar menuBar = new JMenuBar();
112

  
113
        // Build the menu.
114
        JMenu menuFile = new JMenu("File");
115
        menuFile.add(new JMenuItem(showCookie));
116
        menuFile.add(new JMenuItem(preferences));
117
        menuFile.add(new JMenuItem(exit));
118

  
119
        menuBar.add(menuFile);
120

  
121
        JToolBar toolBar = new JToolBar();
122
        toolBar.add(new JButton(showCookie));
123
        toolBar.add(new JButton(exit));
124

  
125
        frame.setPreferredSize(new Dimension(200, 100));
126
        frame.setJMenuBar(menuBar);
127
        frame.add(toolBar, BorderLayout.PAGE_START);
128

  
129
        // Display the window.
130
        frame.pack();
131
        frame.setVisible(true);
132
    }
133

  
134
    private void showExporttoPreferences() {
135
        ExporttoSwingPreferencesComponent preferences =
136
            ExporttoSwingProviderLocator.getManager()
137
                .createExporttoSwingProvidersPreferences();
138

  
139
        JFrame preferencesFrame = new JFrame("Export to preferences");
140
        preferencesFrame.add(preferences.asJComponent());
141

  
142
        preferencesFrame.pack();
143
        preferencesFrame.setVisible(true);
144
    }
145

  
146
    public void showExportto(ExporttoManager manager) {
147
        try {
148
            JExporttoServicePanel panel =
149
                swingManager.createExportto(createFeatureStore(),
150
                    CRSFactory.getCRS("EPSG:23030"));
151
            panel.setPreferredSize(new Dimension(800, 400));
152
            swingManager.getWindowManager().showWindow(panel, "Exportto",
153
                ExporttoWindowManager.MODE_WINDOW);
154
        } catch (ValidateDataParametersException e) {
155
            LOG.error("Error showing a Exportto", e);
156
        } catch (InitializeException e) {
157
            LOG.error("Error showing a Exportto", e);
158
        } catch (ProviderNotRegisteredException e) {
159
            LOG.error("Error showing a Exportto", e);
160
        }
161
    }
162

  
163
    private FeatureStore createFeatureStore() throws InitializeException,
164
        ProviderNotRegisteredException, ValidateDataParametersException {
165
        String sourceFileName =
166
            getClass().getClassLoader()
167
                .getResource("org/gvsig/exportto/data/andalucia.shp").getFile();
168
        DataStoreParameters sourceParameters =
169
            dataManager.createStoreParameters("Shape");
170
        sourceParameters.setDynValue("shpfile", sourceFileName);
171
        sourceParameters.setDynValue("crs", CRSFactory.getCRS("EPSG:23030"));
172
        return (FeatureStore) dataManager.openStore("Shape", sourceParameters);
173
    }
174
}
0 175

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.main/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"
3
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
    <modelVersion>4.0.0</modelVersion>
5
    <artifactId>org.gvsig.exportto.main</artifactId>
6
    <packaging>jar</packaging>
7
    <name>org.gvsig.exportto.main</name>
8
    <parent>
9
        <groupId>org.gvsig</groupId>
10
        <artifactId>org.gvsig.exportto</artifactId>
11
        <version>1.0.0-SNAPSHOT</version>
12
    </parent>
13
    <dependencies>
14
        <dependency>
15
            <groupId>org.gvsig</groupId>
16
            <artifactId>org.gvsig.exportto.lib.api</artifactId>
17
            <version>1.0.0-SNAPSHOT</version>
18
        </dependency>
19
        <dependency>
20
            <groupId>org.gvsig</groupId>
21
            <artifactId>org.gvsig.exportto.lib.impl</artifactId>
22
            <version>1.0.0-SNAPSHOT</version>
23
            <scope>runtime</scope>
24
        </dependency>
25
        <dependency>
26
            <groupId>org.gvsig</groupId>
27
            <artifactId>org.gvsig.exportto.swing.api</artifactId>
28
            <version>1.0.0-SNAPSHOT</version>
29
        </dependency>
30
        <dependency>
31
            <groupId>org.gvsig</groupId>
32
            <artifactId>org.gvsig.exportto.swing.spi</artifactId>
33
            <version>1.0.0-SNAPSHOT</version>
34
        </dependency>
35
        <dependency>
36
            <groupId>org.gvsig</groupId>
37
            <artifactId>org.gvsig.exportto.swing.impl</artifactId>
38
            <version>1.0.0-SNAPSHOT</version>
39
            <scope>runtime</scope>
40
        </dependency>
41
        <dependency>
42
            <groupId>org.gvsig</groupId>
43
            <artifactId>org.gvsig.exportto.swing.prov.generic</artifactId>
44
            <version>1.0.0-SNAPSHOT</version>
45
            <scope>runtime</scope>
46
        </dependency>
47
        <dependency>
48
            <groupId>org.gvsig</groupId>
49
            <artifactId>org.gvsig.exportto.swing.prov.shape</artifactId>
50
            <version>1.0.0-SNAPSHOT</version>
51
            <scope>runtime</scope>
52
        </dependency>
53
        <dependency>
54
            <groupId>org.gvsig</groupId>
55
            <artifactId>org.gvsig.exportto.swing.prov.dxf</artifactId>
56
            <version>1.0.0-SNAPSHOT</version>
57
            <scope>runtime</scope>
58
        </dependency>
59
        <dependency>
60
            <groupId>org.gvsig</groupId>
61
            <artifactId>org.gvsig.exportto.swing.prov.dbf</artifactId>
62
            <version>1.0.0-SNAPSHOT</version>
63
            <scope>runtime</scope>
64
        </dependency>
65
        <dependency>
66
            <groupId>org.gvsig</groupId>
67
            <artifactId>org.gvsig.exportto.swing.prov.postgresql</artifactId>
68
            <version>1.0.0-SNAPSHOT</version>
69
            <scope>runtime</scope>
70
        </dependency>
71
        <dependency>
72
            <groupId>org.gvsig</groupId>
73
            <artifactId>org.gvsig.exportto.swing.prov.mysql</artifactId>
74
            <version>1.0.0-SNAPSHOT</version>
75
            <scope>runtime</scope>
76
        </dependency>
77
        <dependency>
78
            <groupId>org.gvsig</groupId>
79
            <artifactId>org.gvsig.tools.lib</artifactId>
80
            <scope>compile</scope>
81
        </dependency>
82
        <dependency>
83
            <groupId>org.gvsig</groupId>
84
            <artifactId>org.gvsig.projection</artifactId>
85
            <scope>compile</scope>
86
        </dependency>
87
        <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.fmap.dal</artifactId>
90
            <scope>compile</scope>
91
        </dependency>
92
        <dependency>
93
            <groupId>org.gvsig</groupId>
94
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
95
            <classifier>store.shp</classifier>
96
            <scope>runtime</scope>
97
        </dependency>
98
        <dependency>
99
            <groupId>org.gvsig</groupId>
100
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
101
            <classifier>store.dxf</classifier>
102
            <scope>runtime</scope>
103
        </dependency>
104
        <dependency>
105
            <groupId>org.gvsig</groupId>
106
            <artifactId>org.gvsig.fmap.dal.db</artifactId>
107
            <classifier>store.postgresql</classifier>
108
            <scope>runtime</scope>
109
        </dependency>
110
        <dependency>
111
            <groupId>org.gvsig</groupId>
112
            <artifactId>org.gvsig.fmap.mapcontext</artifactId>
113
            <scope>runtime</scope>
114
        </dependency>
115
        <dependency>
116
            <groupId>org.gvsig</groupId>
117
            <artifactId>org.gvsig.fmap.dal.db</artifactId>
118
            <classifier>store.mysql</classifier>
119
            <scope>runtime</scope>
120
        </dependency>
121
        <dependency>
122
            <groupId>org.gvsig</groupId>
123
            <artifactId>org.gvsig.tools.swing.api</artifactId>
124
            <scope>compile</scope>
125
        </dependency>
126
        <dependency>
127
            <groupId>org.gvsig</groupId>
128
            <artifactId>org.gvsig.tools.swing.serv.field</artifactId>
129
            <scope>compile</scope>
130
        </dependency>
131
        <dependency>
132
            <groupId>org.gvsig</groupId>
133
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
134
            <scope>compile</scope>
135
        </dependency>
136
        <dependency>
137
            <groupId>org.gvsig</groupId>
138
            <artifactId>org.gvsig.i18n</artifactId>
139
            <scope>runtime</scope>
140
        </dependency>
141
    </dependencies>
142
</project>
0 143

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.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/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/test/resources/log4j.xml
1
<?xml version="1.0" encoding="ISO-8859-1" ?>
2
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
3

  
4
<!-- 
5
Log4J configuration file for unit tests execution.
6
 -->
7
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
8

  
9
	<!-- Appender configuration to show logging messages through the console -->
10
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
11
		<layout class="org.apache.log4j.PatternLayout">
12
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
13
		</layout>
14
	</appender>
15

  
16
	<!-- 
17
	Activate logging messages of DEBUG level of higher only for the
18
	org.gvsig.tools packages.
19
	You can put full classes names or packages instead, to configure
20
	logging for all the classes and subpackages of the package.
21
	-->
22
	<category name="org.gvsig.tools">
23
		<priority value="DEBUG" />
24
	</category>
25
	<category name="org.gvsig.exportto">
26
		<priority value="DEBUG" />
27
	</category>
28

  
29
	<!-- 
30
	By default, show only logging messages of INFO level or higher, 
31
	through the previously configured CONSOLE appender. 
32
	-->
33
	<root>
34
		<priority value="INFO" />
35
		<appender-ref ref="CONSOLE" />
36
	</root>
37
</log4j:configuration>
0 38

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/test/java/org/gvsig/exportto/impl/DefaultExporttoManagerTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto.impl;
23

  
24
import org.gvsig.exportto.ExporttoManager;
25
import org.gvsig.exportto.ExporttoManagerTest;
26

  
27
/**
28
 * {@link ExporttoManager} API compatibility tests for the
29
 * {@link DefaultExporttoManager} implementation.
30
 * 
31
 * @author gvSIG Team
32
 * @version $Id$
33
 */
34
public class DefaultExporttoManagerTest extends ExporttoManagerTest {
35

  
36
    // Nothing to add
37
}
0 38

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/resources/org/gvsig/exportto/lib/impl/exporttofilters.properties
1
#point_geometries_only=
2
#curve_geometries_only=
3
#surface_geometries_only=
4
prov_demo=PROV < '10'
0 5

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/resources/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.exportto.impl.ExporttoDefaultImplLibrary
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/java/org/gvsig/exportto/impl/DefaultExporttoManager.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto.impl;
23

  
24
import java.io.File;
25
import java.io.FileInputStream;
26
import java.io.FileOutputStream;
27
import java.io.IOException;
28
import java.io.InputStream;
29
import java.io.OutputStream;
30
import java.util.HashMap;
31
import java.util.Iterator;
32
import java.util.Map;
33
import java.util.Properties;
34

  
35
import org.slf4j.Logger;
36
import org.slf4j.LoggerFactory;
37

  
38
import org.gvsig.exportto.ExporttoManager;
39
import org.gvsig.exportto.ExporttoService;
40
import org.gvsig.fmap.dal.DataServerExplorer;
41
import org.gvsig.fmap.dal.NewDataStoreParameters;
42

  
43
/**
44
 * Default {@link ExporttoManager} implementation.
45
 * 
46
 * @author gvSIG Team
47
 * @version $Id$
48
 */
49
public class DefaultExporttoManager implements ExporttoManager {
50

  
51
    private static final Logger LOG = LoggerFactory
52
        .getLogger(DefaultExporttoManager.class);
53

  
54
    @SuppressWarnings("rawtypes")
55
    private Map filters = null;
56
    private static final String EXPORTTOFILTERS_FILENAME =
57
        "exporttofilters.properties";
58
    private static final String GVSIGPREFERENCES_FOLDERNAME = "gvSIG";
59

  
60
    @SuppressWarnings("rawtypes")
61
    public DefaultExporttoManager() {
62
        super();
63
        filters = new HashMap();
64
        try {
65
            initializeFilters();
66
        } catch (IOException e) {
67
            LOG.error("Error reading the exporttofilters.properties file");
68
        }
69
    }
70

  
71
    @SuppressWarnings({ "rawtypes", "unchecked" })
72
    private void initializeFilters() throws IOException {
73
        String path = System.getProperty("user.home");
74
        path = path + File.separatorChar + GVSIGPREFERENCES_FOLDERNAME;
75
        File directory = new File(path);
76
        if (!directory.exists()) {
77
            directory.mkdirs();
78
        }
79
        path = path + File.separatorChar + EXPORTTOFILTERS_FILENAME;
80
        File exporttoFiltersFile = new File(path);
81
        if (!exporttoFiltersFile.exists()) {
82
            File templateFile =
83
                new File(
84
                    getClass()
85
                        .getClassLoader()
86
                        .getResource(
87
                            "org/gvsig/exportto/lib/impl/exporttofilters.properties")
88
                        .getFile());
89
            if (!templateFile.exists()) {
90
                return;
91
            }
92
            copy(templateFile, exporttoFiltersFile);
93
        }
94
        Properties properties = new Properties();
95
        properties.load(new FileInputStream(exporttoFiltersFile));
96
        Iterator it = properties.keySet().iterator();
97
        while (it.hasNext()) {
98
            String key = (String) it.next();
99
            filters.put(key, properties.get(key));
100
        }
101
    }
102

  
103
    private void copy(File sourceLocation, File targetLocation)
104
        throws IOException {
105
        if (sourceLocation.isDirectory()) {
106
            if (!targetLocation.exists()) {
107
                targetLocation.mkdir();
108
            }
109

  
110
            String[] children = sourceLocation.list();
111
            for (int i = 0; i < children.length; i++) {
112
                copy(new File(sourceLocation, children[i]), new File(
113
                    targetLocation, children[i]));
114
            }
115
        } else {
116
            targetLocation.getParentFile().mkdirs();
117

  
118
            InputStream in = new FileInputStream(sourceLocation);
119
            OutputStream out = new FileOutputStream(targetLocation);
120

  
121
            // Copy the bits from instream to outstream
122
            byte[] buf = new byte[1024];
123
            int len;
124
            while ((len = in.read(buf)) > 0) {
125
                out.write(buf, 0, len);
126
            }
127
            in.close();
128
            out.close();
129
        }
130
    }
131

  
132
    public ExporttoService getExporttoService(
133
        DataServerExplorer dataServerExplorer,
134
        NewDataStoreParameters newDataStoreParameters) {
135
        return new DefaultExporttoService(dataServerExplorer,
136
            newDataStoreParameters);
137
    }
138

  
139
    @SuppressWarnings("rawtypes")
140
    public Iterator getPredefinedFilters() {
141
        return filters.keySet().iterator();
142
    }
143

  
144
    public String getFilter(String filterName) {
145
        if (filters.containsKey(filterName)) {
146
            return (String) filters.get(filterName);
147
        }
148
        return null;
149
    }
150

  
151
}
0 152

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/java/org/gvsig/exportto/impl/DefaultExporttoService.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto.impl;
23

  
24
import org.cresques.cts.IProjection;
25

  
26
import org.gvsig.exportto.ExporttoService;
27
import org.gvsig.exportto.ExporttoServiceException;
28
import org.gvsig.exportto.ExporttoServiceFinishAction;
29
import org.gvsig.fmap.dal.DALLocator;
30
import org.gvsig.fmap.dal.DataManager;
31
import org.gvsig.fmap.dal.DataServerExplorer;
32
import org.gvsig.fmap.dal.NewDataStoreParameters;
33
import org.gvsig.fmap.dal.feature.Feature;
34
import org.gvsig.fmap.dal.feature.FeatureSet;
35
import org.gvsig.fmap.dal.feature.FeatureStore;
36
import org.gvsig.fmap.dal.feature.FeatureType;
37
import org.gvsig.tools.dispose.DisposableIterator;
38
import org.gvsig.tools.dispose.DisposeUtils;
39
import org.gvsig.tools.task.AbstractMonitorableTask;
40

  
41
/**
42
 * Default {@link ExporttoService} implementation.
43
 * 
44
 * @author gvSIG Team
45
 * @version $Id$
46
 */
47
public class DefaultExporttoService extends AbstractMonitorableTask implements
48
    ExporttoService {
49

  
50
    private DataServerExplorer dataServerExplorer;
51
    private NewDataStoreParameters newDataStoreParameters;
52

  
53
    private ExporttoServiceFinishAction exporttoServiceFinishAction;
54

  
55
    /**
56
     * {@link DefaultExporttoService} constructor
57
     */
58
    public DefaultExporttoService(DataServerExplorer dataServerExplorer,
59
        NewDataStoreParameters newDataStoreParameters) {
60
        super("Exportto");
61
        this.dataServerExplorer = dataServerExplorer;
62
        this.newDataStoreParameters = newDataStoreParameters;
63
    }
64

  
65
    public void export(FeatureStore featureStore, IProjection projection,
66
        FeatureSet featureSet) throws ExporttoServiceException {
67
        // TODO Auto-generated method stub
68

  
69
    }
70

  
71
    public void export(FeatureSet featureSet) throws ExporttoServiceException {
72

  
73
        String providerName = newDataStoreParameters.getDataStoreName();
74
        String explorerName = dataServerExplorer.getProviderName();
75

  
76
        DisposableIterator it = null;
77
        FeatureStore target = null;
78
        try {
79
            taskStatus.setRangeOfValues(0, featureSet.getSize());
80

  
81
            DataManager dataManager = DALLocator.getDataManager();
82

  
83
            dataManager.newStore(explorerName, providerName,
84
                newDataStoreParameters, true);
85
            target =
86
                (FeatureStore) dataManager.openStore(providerName,
87
                    newDataStoreParameters);
88

  
89
            FeatureType targetType = target.getDefaultFeatureType();
90

  
91
            target.edit(FeatureStore.MODE_APPEND);
92
            it = featureSet.fastIterator();
93

  
94
            long featureCount = 0;
95
            while (it.hasNext()) {
96
                Feature feature = (Feature) it.next();
97
                target.insert(target.createNewFeature(targetType, feature));
98

  
99
                featureCount++;
100
                this.taskStatus.setCurValue(featureCount);
101

  
102
                if (this.taskStatus.isCancellationRequested()) {
103
                    return;
104
                }
105
            }
106
            target.finishEditing();
107

  
108
            this.taskStatus.terminate();
109
            this.taskStatus.remove();
110
        } catch (Exception e) {
111
            throw new ExporttoServiceException(e);
112
        } finally {
113
            if (target != null) {
114
                target.dispose();
115
            }
116
            if (it != null) {
117
                it.dispose();
118
            }
119
            if (featureSet != null) {
120
                featureSet.dispose();
121
            }
122
            DisposeUtils.dispose(it);
123
        }
124

  
125
        if (exporttoServiceFinishAction != null) {
126
            exporttoServiceFinishAction.finished(
127
                newDataStoreParameters.getDataStoreName(),
128
                newDataStoreParameters);
129
        }
130
    }
131

  
132
    public void setFinishAction(
133
        ExporttoServiceFinishAction exporttoServiceFinishAction) {
134
        this.exporttoServiceFinishAction = exporttoServiceFinishAction;
135
    }
136

  
137
}
0 138

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/java/org/gvsig/exportto/impl/package.html
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml">
4
<head>
5
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
<title>org.gvsig.exportto package documentation</title>
7
</head>
8
<body>
9

  
10
	<p>Exportto library API default implementation.</p>
11

  
12
</body>
13
</html>
0 14

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.impl/src/main/java/org/gvsig/exportto/impl/ExporttoDefaultImplLibrary.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto.impl;
23

  
24
import org.gvsig.exportto.ExporttoLibrary;
25
import org.gvsig.exportto.ExporttoLocator;
26
import org.gvsig.tools.library.AbstractLibrary;
27
import org.gvsig.tools.library.LibraryException;
28

  
29
/**
30
 * Library for default implementation initialization and configuration.
31
 * 
32
 * @author gvSIG team
33
 * @version $Id$
34
 */
35
public class ExporttoDefaultImplLibrary extends AbstractLibrary {
36

  
37
    @Override
38
    public void doRegistration() {
39
        registerAsImplementationOf(ExporttoLibrary.class);
40
    }
41

  
42
    @Override
43
    protected void doInitialize() throws LibraryException {
44
        ExporttoLocator.registerManager(DefaultExporttoManager.class);
45
    }
46

  
47
    @Override
48
    protected void doPostInitialize() throws LibraryException {
49
        // Do nothing
50
    }
51

  
52
}
0 53

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.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"
3
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
	<modelVersion>4.0.0</modelVersion>
5
	<artifactId>org.gvsig.exportto.lib.impl</artifactId>
6
	<packaging>jar</packaging>
7
	<name>org.gvsig.exportto.lib.impl</name>
8
	<parent>
9
		<groupId>org.gvsig</groupId>
10
		<artifactId>org.gvsig.exportto.lib</artifactId>
11
		<version>1.0.0-SNAPSHOT</version>
12
	</parent>
13
	<dependencies>
14
		<dependency>
15
			<groupId>org.gvsig</groupId>
16
			<artifactId>org.gvsig.exportto.lib.api</artifactId>
17
			<version>1.0.0-SNAPSHOT</version>
18
		</dependency>
19
		<dependency>
20
			<groupId>org.gvsig</groupId>
21
			<artifactId>org.gvsig.exportto.lib.api</artifactId>
22
			<version>1.0.0-SNAPSHOT</version>
23
			<type>test-jar</type>
24
			<scope>test</scope>
25
		</dependency>
26
		<dependency>
27
            <groupId>org.gvsig</groupId>
28
            <artifactId>org.gvsig.tools.lib</artifactId>
29
            <scope>compile</scope>
30
        </dependency>
31
        <dependency>
32
            <groupId>org.gvsig</groupId>
33
            <artifactId>org.gvsig.metadata.lib.basic.api</artifactId>
34
            <scope>compile</scope>
35
        </dependency>
36
        <dependency>
37
            <groupId>org.gvsig</groupId>
38
            <artifactId>org.gvsig.fmap.dal</artifactId>    
39
            <scope>compile</scope>        
40
        </dependency>
41
        <dependency>
42
            <groupId>org.gvsig</groupId>
43
            <artifactId>org.gvsig.projection</artifactId>
44
            <scope>compile</scope>
45
        </dependency>
46
        <dependency>
47
            <groupId>org.gvsig</groupId>
48
            <artifactId>org.gvsig.projection</artifactId>  
49
            <classifier>cresques-impl</classifier>
50
            <scope>runtime</scope>      
51
        </dependency>   
52
        <dependency>
53
            <groupId>org.gvsig</groupId>
54
            <artifactId>org.gvsig.fmap.geometry</artifactId>            
55
            <classifier>impl</classifier>
56
            <scope>runtime</scope>      
57
        </dependency>
58
        <dependency>
59
            <groupId>org.gvsig</groupId>
60
            <artifactId>org.gvsig.fmap.geometry</artifactId>
61
            <classifier>operation</classifier>      
62
            <scope>runtime</scope>
63
        </dependency>  
64
        <dependency>
65
            <groupId>org.gvsig</groupId>
66
            <artifactId>org.gvsig.fmap.dal</artifactId>         
67
            <classifier>impl</classifier>
68
            <scope>runtime</scope>
69
        </dependency> 
70
         <dependency>
71
            <groupId>org.gvsig</groupId>
72
            <artifactId>org.gvsig.fmap.dal.file</artifactId>           
73
            <scope>test</scope>
74
        </dependency>  
75
         <dependency>
76
            <groupId>org.gvsig</groupId>
77
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
78
            <classifier>store.dbf</classifier>
79
            <scope>test</scope>
80
        </dependency>  
81
        <dependency>
82
            <groupId>org.gvsig</groupId>
83
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
84
            <classifier>store.dbf</classifier>
85
            <scope>test</scope>
86
        </dependency>  
87
         <dependency>
88
            <groupId>org.gvsig</groupId>
89
            <artifactId>org.gvsig.fmap.dal.file</artifactId>
90
            <classifier>store.shp</classifier>
91
            <scope>test</scope>
92
        </dependency>  
93
         <dependency>
94
            <groupId>org.gvsig</groupId>
95
            <artifactId>org.gvsig.symbology.lib.impl</artifactId>           
96
            <scope>test</scope>
97
        </dependency>           
98
        <dependency>
99
            <groupId>org.gvsig</groupId>
100
            <artifactId>org.gvsig.fmap.dal</artifactId>
101
            <classifier>spi</classifier>
102
            <scope>runtime</scope>      
103
        </dependency> 
104
        <dependency>
105
            <groupId>org.gvsig</groupId>
106
            <artifactId>org.gvsig.compat</artifactId>           
107
            <classifier>se</classifier>     
108
            <scope>runtime</scope>      
109
        </dependency>   
110
	</dependencies>
111
	<build>
112
		<plugins>
113
			<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
114
			<plugin>
115
				<groupId>org.apache.maven.plugins</groupId>
116
				<artifactId>maven-surefire-plugin</artifactId>
117
				<configuration>
118
                    <excludes>
119
                        <exclude>**/**</exclude>
120
                    </excludes>
121
				</configuration>
122
			</plugin>		
123
		</plugins>
124
	</build>
125
</project>
0 126

  
tags/v2_0_0_Build_2047/libraries/org.gvsig.exportto/org.gvsig.exportto.lib/org.gvsig.exportto.lib.api/src/test/java/org/gvsig/exportto/ExporttoServiceTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.exportto;
23

  
24
import org.gvsig.fmap.dal.DALLocator;
25
import org.gvsig.fmap.dal.DataManager;
26
import org.gvsig.fmap.dal.DataServerExplorer;
27
import org.gvsig.fmap.dal.DataServerExplorerParameters;
28
import org.gvsig.fmap.dal.DataStoreParameters;
29
import org.gvsig.fmap.dal.NewDataStoreParameters;
30
import org.gvsig.fmap.dal.exception.DataException;
31
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
32
import org.gvsig.fmap.dal.feature.FeatureStore;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34

  
35
/**
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff