Revision 298

View differences:

org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86_64/buildNumber.properties
1
#Sun Oct 26 18:02:13 EDT 2014
2
buildNumber=2070
0 3

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86_64/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${gvsig.package.info.code}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/package.info</source>
36
    </file>
37
  </files>
38

  
39
  <fileSets>
40
    <fileSet>
41
      <directory>target/org.gvsig.projection.app.jcrs.common</directory>
42
      <outputDirectory>.</outputDirectory>
43
      <excludes>
44
      	<exclude>package.info</exclude>
45
      </excludes>
46
    </fileSet>
47
    <fileSet>
48
      <directory>target/native/lib</directory>
49
      <outputDirectory>native</outputDirectory>
50
    </fileSet>
51
    <fileSet>
52
      <directory>src/main/resources-plugin</directory>
53
      <outputDirectory>.</outputDirectory>
54
    </fileSet>
55
  </fileSets>
56

  
57

  
58
  <dependencySets>
59
    <dependencySet>
60
      <useProjectArtifact>false</useProjectArtifact>
61
      <useTransitiveDependencies>false</useTransitiveDependencies>
62
      <outputDirectory>lib</outputDirectory>
63
		<includes>
64
            <include>org.gvsig:org.gvsig.jproj:jar</include>
65
		</includes>
66
    </dependencySet>
67
  </dependencySets>
68

  
69
</assembly>
70

  
71

  
72

  
0 73

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86_64/src/main/resources-plugin/autorun.sh
1
#!/bin/sh
2
#
3
# gvSIG. Desktop Geographic Information System.
4
#
5
# Copyright (C) 2007-2013 gvSIG Association.
6
#
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU General Public License
9
# as published by the Free Software Foundation; either version 3
10
# of the License, or (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
# MA  02110-1301, USA.
21
#
22
# For any additional information, do not hesitate to contact us
23
# at info AT gvsig.com, or visit our website www.gvsig.com.
24
#
25

  
26

  
27
#
28
# Plugin autorun
29
# 
30

  
31
PLUGIN_NAME=$(basename "$PLUGIN_FOLDER")
32

  
33
# Proj4 data files
34
export PROJ_LIB="${GVSIG_HOME_FOLDER}/plugins/$PLUGIN_NAME/projlib"
35

  
36
# Temporary fix for number locale related formatting error with proj4.
37
export LC_NUMERIC=C
38

  
39
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PLUGIN_FOLDER/native"
40
GVSIG_NATIVE_LIBS="$GVSIG_NATIVE_LIBS:$PLUGIN_FOLDER/native"
41

  
42

  
43

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86_64/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
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.projection.app.jcrs.lin.x86_64</artifactId>
5
  <packaging>jar</packaging>
6
   
7
 	<parent>
8
		<groupId>org.gvsig</groupId>
9
		<artifactId>org.gvsig.projection.app.jcrs</artifactId>
10
		<version>2.1.10</version>
11
	</parent>
12

  
13
  <properties>
14
    <gvsig.package.info.operatingSystem>lin</gvsig.package.info.operatingSystem>
15
    <gvsig.package.info.architecture>x86_64</gvsig.package.info.architecture>
16
  </properties>
17

  
18
  <dependencyManagement>
19
      <dependencies>
20
        <dependency>
21
            <groupId>org.gvsig</groupId>
22
            <artifactId>org.gvsig.jproj</artifactId>
23
            <version>2.0.1</version>
24
        </dependency>                  
25
        <dependency>
26
            <groupId>org.gvsig</groupId>
27
            <artifactId>org.gvsig.jproj</artifactId>
28
            <version>2.0.1</version>
29
            <classifier>linux-all-gcc4-X86_64-dynamic</classifier>
30
            <type>tar.gz</type>
31
        </dependency>                  
32
      </dependencies>
33
  </dependencyManagement>
34
 	 
35

  
36
  <dependencies>
37
      <dependency>
38
          <groupId>org.gvsig</groupId>
39
          <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
40
          <type>zip</type>
41
        </dependency>
42
      <dependency>
43
          <groupId>org.gvsig</groupId>
44
          <artifactId>org.gvsig.jproj</artifactId>
45
      </dependency>                  
46
      <dependency>
47
          <groupId>org.gvsig</groupId>
48
          <artifactId>org.gvsig.jproj</artifactId>
49
          <classifier>linux-all-gcc4-X86_64-dynamic</classifier>
50
          <type>tar.gz</type>
51
      </dependency> 
52
  </dependencies>
53

  
54
  <build>
55
    <plugins>
56
  
57
      <plugin>
58
        <groupId>org.apache.maven.plugins</groupId>
59
        <artifactId>maven-dependency-plugin</artifactId>
60
        <executions>
61
          <execution>
62
          	<id>unpack</id>
63
	        <phase>process-sources</phase>
64
	        <goals>
65
	          <goal>unpack</goal>
66
	        </goals>
67
	        <configuration>
68
	          <artifactItems>
69
	            <artifactItem>
70
		            <groupId>org.gvsig</groupId>
71
		            <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
72
		            <type>zip</type>
73
					      <overWrite>true</overWrite>
74
					      <outputDirectory>target</outputDirectory>
75
	            </artifactItem>
76
	            <artifactItem>
77
		            <groupId>org.gvsig</groupId>
78
		            <artifactId>org.gvsig.jproj</artifactId>
79
                <classifier>linux-all-gcc4-X86_64-dynamic</classifier>
80
		            <type>tar.gz</type>
81
					      <overWrite>true</overWrite>
82
					      <outputDirectory>target/native</outputDirectory>
83
	            </artifactItem>
84
	          </artifactItems>
85
	        </configuration>
86
          </execution>
87
        </executions>
88
	  </plugin>
89
  
90
  
91
    </plugins>
92
  </build>
93

  
94
  <profiles>
95
  
96
    <profile>
97
      <id>gvsig-plugin-install-jcrs-linux-x86_64</id>
98
      <activation>
99
         <os>
100
             <family>unix</family>
101
             <name>linux</name>
102
             <!-- <arch>x86_64</arch> -->
103
             <arch>amd64</arch>
104
         </os>
105
      </activation>
106
	      <properties>
107
	        <gvsig.install.plugin>true</gvsig.install.plugin>
108
	      </properties>
109
    </profile>
110
  </profiles>
111
  
112
</project>
113

  
0 114

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.win.x86/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
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.projection.app.jcrs.win.x86</artifactId>
5
  <packaging>jar</packaging>
6
   
7
 	<parent>
8
		<groupId>org.gvsig</groupId>
9
		<artifactId>org.gvsig.projection.app.jcrs</artifactId>
10
		<version>2.1.10</version>
11
	</parent>
12

  
13
  <properties>
14
<!--     <gvsig.package.info.code>org.gvsig.crs.extension</gvsig.package.info.code> -->
15
    <gvsig.package.info.operatingSystem>win</gvsig.package.info.operatingSystem>
16
    <gvsig.package.info.architecture>x86</gvsig.package.info.architecture>
17
  </properties>
18

  
19
  <dependencyManagement>
20
      <dependencies>
21
        <dependency>
22
            <groupId>org.gvsig</groupId>
23
            <artifactId>org.gvsig.jproj</artifactId>
24
            <version>2.0.1</version>
25
        </dependency>                  
26
        <dependency>
27
            <groupId>org.gvsig</groupId>
28
            <artifactId>org.gvsig.jproj</artifactId>
29
            <version>2.0.1</version>
30
            <classifier>win-nt-vs8-i386-dynamic</classifier>
31
            <type>tar.gz</type>
32
        </dependency>                  
33
        <dependency>
34
            <groupId>org.gvsig</groupId>
35
            <artifactId>org.gvsig.jproj</artifactId>
36
            <version>2.0.1</version>
37
            <classifier>win-nt-vs8-i386-dynamic-runtime</classifier>
38
            <type>tar.gz</type>
39
        </dependency>                  
40
      </dependencies>
41
  </dependencyManagement>
42
 	 
43

  
44
  <dependencies>
45
      <dependency>
46
          <groupId>org.gvsig</groupId>
47
          <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
48
          <type>zip</type>
49
        </dependency>
50
      <dependency>
51
          <groupId>org.gvsig</groupId>
52
          <artifactId>org.gvsig.jproj</artifactId>
53
      </dependency>                  
54
      <dependency>
55
          <groupId>org.gvsig</groupId>
56
          <artifactId>org.gvsig.jproj</artifactId>
57
          <classifier>win-nt-vs8-i386-dynamic</classifier>
58
          <type>tar.gz</type>
59
      </dependency> 
60
      <dependency>
61
          <groupId>org.gvsig</groupId>
62
          <artifactId>org.gvsig.jproj</artifactId>
63
          <classifier>win-nt-vs8-i386-dynamic-runtime</classifier>
64
          <type>tar.gz</type>
65
      </dependency>   
66
    </dependencies>
67

  
68
  <build>
69
    <plugins>
70
  
71
      <plugin>
72
        <groupId>org.apache.maven.plugins</groupId>
73
        <artifactId>maven-dependency-plugin</artifactId>
74
        <executions>
75
          <execution>
76
          	<id>unpack</id>
77
	        <phase>process-sources</phase>
78
	        <goals>
79
	          <goal>unpack</goal>
80
	        </goals>
81
	        <configuration>
82
	          <artifactItems>
83
	            <artifactItem>
84
		            <groupId>org.gvsig</groupId>
85
		            <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
86
		            <type>zip</type>
87
					<overWrite>true</overWrite>
88
					<outputDirectory>target</outputDirectory>
89
	            </artifactItem>
90
	            <artifactItem>
91
		            <groupId>org.gvsig</groupId>
92
		            <artifactId>org.gvsig.jproj</artifactId>
93
		            <classifier>win-nt-vs8-i386-dynamic</classifier>
94
		            <type>tar.gz</type>
95
					<overWrite>true</overWrite>
96
					<outputDirectory>target/native</outputDirectory>
97
	            </artifactItem>
98
	            <artifactItem>
99
		            <groupId>org.gvsig</groupId>
100
		            <artifactId>org.gvsig.jproj</artifactId>
101
		            <classifier>win-nt-vs8-i386-dynamic-runtime</classifier>
102
		            <type>tar.gz</type>
103
					<overWrite>true</overWrite>
104
					<outputDirectory>target/native/bin</outputDirectory>
105
	            </artifactItem>
106
	          </artifactItems>
107
	        </configuration>
108
          </execution>
109
        </executions>
110
	  </plugin>
111
  
112
  
113
    </plugins>
114
  </build>
115

  
116
  <profiles>
117
  
118
    <profile>
119
      <id>gvsig-plugin-install-jcrs-windows-x86</id>
120
      <activation>
121
         <os>
122
             <family>windows</family>
123
             <!-- Uncomment this when have support for amd64 -->
124
             <!-- 
125
             <arch>x86</arch>
126
             -->
127
         </os>
128
      </activation>
129
	  <properties>
130
	    <gvsig.install.plugin>true</gvsig.install.plugin>
131
	  </properties>
132
    </profile>
133
  </profiles>
134
  
135
</project>
136

  
0 137

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.win.x86/buildNumber.properties
1
#Sun Oct 26 18:02:13 EDT 2014
2
buildNumber=2070
0 3

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.win.x86/src/main/resources-plugin/install/install.xml
1
<project name="org.gvsig.plugin1" default="main" basedir=".">
2
	<!--
3
		Predefined properties:
4
		gvsig_dir = gvSIG application root installation directory
5
		extensions_dir = gvSIG extensions directory
6
	-->
7
	<taskdef resource="net/sf/antcontrib/antlib.xml">
8
		<classpath>
9
			<pathelement location="${gvsig_dir}/lib/ant-contrib-1.0b3.jar" />
10
		</classpath>
11
	</taskdef>
12
	<target name="main" depends="copy_files"/>
13
    <target name="copy_files">
14
    	<copy todir="${gvsig_dir}">
15
    		<fileset dir="./files" includes="**"/>
16
		</copy>
17
	</target>
18
</project>
0 19

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.win.x86/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${gvsig.package.info.code}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/package.info</source>
36
    </file>
37
  </files>
38

  
39
  <fileSets>
40
    <fileSet>
41
      <directory>target/org.gvsig.projection.app.jcrs.common</directory>
42
      <outputDirectory>.</outputDirectory>
43
      <excludes>
44
      	<exclude>package.info</exclude>
45
      </excludes>
46
    </fileSet>
47
    <fileSet>
48
      <directory>target/native/bin</directory>
49
      <outputDirectory>install/files</outputDirectory>
50
    </fileSet>
51
    <fileSet>
52
      <directory>src/main/resources-plugin</directory>
53
      <outputDirectory>.</outputDirectory>
54
    </fileSet>
55
  </fileSets>
56

  
57

  
58
  <dependencySets>
59
    <dependencySet>
60
      <useProjectArtifact>false</useProjectArtifact>
61
      <useTransitiveDependencies>false</useTransitiveDependencies>
62
      <outputDirectory>lib</outputDirectory>
63
		<includes>
64
            <include>org.gvsig:org.gvsig.jproj:jar</include>
65
		</includes>
66
    </dependencySet>
67
  </dependencySets>
68

  
69
</assembly>
70

  
71

  
72

  
0 73

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86/buildNumber.properties
1
#Sun Oct 26 18:02:12 EDT 2014
2
buildNumber=2070
0 3

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${gvsig.package.info.code}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/package.info</source>
36
    </file>
37
  </files>
38

  
39
  <fileSets>
40
    <fileSet>
41
      <directory>target/org.gvsig.projection.app.jcrs.common</directory>
42
      <outputDirectory>.</outputDirectory>
43
      <excludes>
44
      	<exclude>package.info</exclude>
45
      </excludes>
46
    </fileSet>
47
    <fileSet>
48
      <directory>target/native/lib</directory>
49
      <outputDirectory>native</outputDirectory>
50
    </fileSet>
51
    <fileSet>
52
      <directory>src/main/resources-plugin</directory>
53
      <outputDirectory>.</outputDirectory>
54
    </fileSet>
55
  </fileSets>
56

  
57

  
58
  <dependencySets>
59
    <dependencySet>
60
      <useProjectArtifact>false</useProjectArtifact>
61
      <useTransitiveDependencies>false</useTransitiveDependencies>
62
      <outputDirectory>lib</outputDirectory>
63
		<includes>
64
            <include>org.gvsig:org.gvsig.jproj:jar</include>
65
		</includes>
66
    </dependencySet>
67
  </dependencySets>
68

  
69
</assembly>
70

  
71

  
72

  
0 73

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86/src/main/resources-plugin/autorun.sh
1
#!/bin/sh
2
#
3
# gvSIG. Desktop Geographic Information System.
4
#
5
# Copyright (C) 2007-2013 gvSIG Association.
6
#
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU General Public License
9
# as published by the Free Software Foundation; either version 3
10
# of the License, or (at your option) any later version.
11
#
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
# MA  02110-1301, USA.
21
#
22
# For any additional information, do not hesitate to contact us
23
# at info AT gvsig.com, or visit our website www.gvsig.com.
24
#
25

  
26

  
27
#
28
# Plugin autorun
29
# 
30

  
31
PLUGIN_NAME=$(basename "$PLUGIN_FOLDER")
32

  
33
# Proj4 data files
34
export PROJ_LIB="${GVSIG_HOME_FOLDER}/plugins/$PLUGIN_NAME/projlib"
35

  
36
# Temporary fix for number locale related formatting error with proj4.
37
export LC_NUMERIC=C
38

  
39
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PLUGIN_FOLDER/native"
40
GVSIG_NATIVE_LIBS="$GVSIG_NATIVE_LIBS:$PLUGIN_FOLDER/native"
41

  
42

  
43

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.lin.x86/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
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.projection.app.jcrs.lin.x86</artifactId>
5
  <packaging>jar</packaging>
6
   
7
 	<parent>
8
		<groupId>org.gvsig</groupId>
9
		<artifactId>org.gvsig.projection.app.jcrs</artifactId>
10
		<version>2.1.10</version>
11
	</parent>
12

  
13
  <properties>
14
    <gvsig.package.info.operatingSystem>lin</gvsig.package.info.operatingSystem>
15
    <gvsig.package.info.architecture>x86</gvsig.package.info.architecture>
16
  </properties>
17

  
18
  <dependencyManagement>
19
      <dependencies>
20
        <dependency>
21
            <groupId>org.gvsig</groupId>
22
            <artifactId>org.gvsig.jproj</artifactId>
23
            <version>2.0.1</version>
24
        </dependency>                  
25
        <dependency>
26
            <groupId>org.gvsig</groupId>
27
            <artifactId>org.gvsig.jproj</artifactId>
28
            <version>2.0.1</version>
29
            <classifier>linux-all-gcc4-i386-dynamic</classifier>
30
            <type>tar.gz</type>
31
        </dependency>                  
32
      </dependencies>
33
  </dependencyManagement>
34
 	 
35

  
36
  <dependencies>
37
      <dependency>
38
          <groupId>org.gvsig</groupId>
39
          <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
40
          <type>zip</type>
41
        </dependency>
42
      <dependency>
43
          <groupId>org.gvsig</groupId>
44
          <artifactId>org.gvsig.jproj</artifactId>
45
      </dependency>                  
46
      <dependency>
47
          <groupId>org.gvsig</groupId>
48
          <artifactId>org.gvsig.jproj</artifactId>
49
          <classifier>linux-all-gcc4-i386-dynamic</classifier>
50
          <type>tar.gz</type>
51
      </dependency> 
52
  </dependencies>
53

  
54
  <build>
55
    <plugins>
56
  
57
      <plugin>
58
        <groupId>org.apache.maven.plugins</groupId>
59
        <artifactId>maven-dependency-plugin</artifactId>
60
        <executions>
61
          <execution>
62
          	<id>unpack</id>
63
	        <phase>process-sources</phase>
64
	        <goals>
65
	          <goal>unpack</goal>
66
	        </goals>
67
	        <configuration>
68
	          <artifactItems>
69
	            <artifactItem>
70
		            <groupId>org.gvsig</groupId>
71
		            <artifactId>org.gvsig.projection.app.jcrs.common</artifactId>
72
		            <type>zip</type>
73
					      <overWrite>true</overWrite>
74
					      <outputDirectory>target</outputDirectory>
75
	            </artifactItem>
76
	            <artifactItem>
77
		            <groupId>org.gvsig</groupId>
78
		            <artifactId>org.gvsig.jproj</artifactId>
79
		            <classifier>linux-all-gcc4-i386-dynamic</classifier>
80
		            <type>tar.gz</type>
81
					      <overWrite>true</overWrite>
82
					      <outputDirectory>target/native</outputDirectory>
83
	            </artifactItem>
84
	          </artifactItems>
85
	        </configuration>
86
          </execution>
87
        </executions>
88
	  </plugin>
89
  
90
  
91
    </plugins>
92
  </build>
93

  
94
  <profiles>
95
  
96
    <profile>
97
      <id>gvsig-plugin-install-jcrs-linux-x86</id>
98
      <activation>
99
         <os>
100
             <family>unix</family>
101
             <name>linux</name>
102
             <arch>x86</arch>
103
         </os>
104
      </activation>
105
	    <properties>
106
	      <gvsig.install.plugin>true</gvsig.install.plugin>
107
	    </properties>
108
    </profile>
109
    <profile>
110
      <!-- Some platforms report i386 instead of x86 -->
111
      <id>gvsig-plugin-install-jcrs-linux-i386</id>
112
      <activation>
113
         <os>
114
             <family>unix</family>
115
             <name>linux</name>
116
             <arch>i386</arch>
117
         </os>
118
      </activation>
119
      <properties>
120
         <gvsig.install.plugin>true</gvsig.install.plugin>
121
      </properties>
122
    </profile>
123
  </profiles>
124
  
125
</project>
126

  
0 127

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/buildNumber.properties
1
#Sun Oct 26 18:02:12 EDT 2014
2
buildNumber=2070
0 3

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/assembly/gvsig-plugin-package.xml
1
<!--
2

  
3
    gvSIG. Desktop Geographic Information System.
4

  
5
    Copyright (C) 2007-2013 gvSIG Association.
6

  
7
    This program is free software; you can redistribute it and/or
8
    modify it under the terms of the GNU General Public License
9
    as published by the Free Software Foundation; either version 3
10
    of the License, or (at your option) any later version.
11

  
12
    This program is distributed in the hope that it will be useful,
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
    GNU General Public License for more details.
16

  
17
    You should have received a copy of the GNU General Public License
18
    along with this program; if not, write to the Free Software
19
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
    MA  02110-1301, USA.
21

  
22
    For any additional information, do not hesitate to contact us
23
    at info AT gvsig.com, or visit our website www.gvsig.com.
24

  
25
-->
26
<assembly>
27
  <id>gvsig-plugin-package</id>
28
  <formats>
29
    <format>zip</format>
30
  </formats>
31
  <baseDirectory>${project.artifactId}</baseDirectory>
32
  <includeBaseDirectory>true</includeBaseDirectory>
33
  <files>
34
    <file>
35
      <source>target/${project.artifactId}-${project.version}.jar</source>
36
      <outputDirectory>lib</outputDirectory>
37
    </file>
38
    <file>
39
      <source>target/package.info</source>
40
    </file>
41
  </files>
42

  
43
  <fileSets>
44
    <fileSet>
45
      <directory>src/main/resources-plugin</directory>
46
      <outputDirectory>.</outputDirectory>
47
    </fileSet>
48
  </fileSets>
49

  
50

  
51
  <dependencySets>
52
    <dependencySet>
53
      <useProjectArtifact>false</useProjectArtifact>
54
      <useTransitiveDependencies>false</useTransitiveDependencies>
55
      <outputDirectory>lib</outputDirectory>
56
		<includes>
57
            <include>org.gvsig:org.gvsig.projection.jcrs.lib</include>
58
            <include>net.sf:jgridshiftapi</include>
59
            <include>org.geotools:gt2-main:jar:unknown</include>
60
            <include>hsqldb:hsqldb</include>
61
            <include>javax.units:jsr108</include>
62
            <include>java3d:vecmath</include>
63
            <include>org.opengis:geoapi</include>
64
            
65
            <include>org.gvsig:org.gvsig.projection.api</include>
66
            <include>org.gvsig:org.gvsig.projection.cresques.ui</include>
67
            <include>org.gvsig:org.gvsig.projection.cresques.impl</include>
68
		</includes>
69
    </dependencySet>
70
  </dependencySets>
71

  
72
</assembly>
73

  
74

  
75

  
0 76

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/InitialWarningExtension.java
1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2005 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ib??ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41

  
42
/* CVS MESSAGES:
43
*
44
* $Id: InitialWarningExtension.java 8765 2006-11-15 00:08:29Z jjdelcerro $
45
* $Log$
46
* Revision 1.3.4.1  2006-11-15 00:08:08  jjdelcerro
47
* *** empty log message ***
48
*
49
* Revision 1.4  2006/10/02 13:52:34  jaume
50
* organize impots
51
*
52
* Revision 1.3  2006/08/29 07:56:27  cesar
53
* Rename the *View* family of classes to *Window* (ie: SingletonView to SingletonWindow, ViewInfo to WindowInfo, etc)
54
*
55
* Revision 1.2  2006/08/29 07:13:53  cesar
56
* Rename class com.iver.andami.ui.mdiManager.View to com.iver.andami.ui.mdiManager.IWindow
57
*
58
* Revision 1.1  2006/05/25 16:27:21  jaume
59
* *** empty log message ***
60
*
61
*
62
*/
63
package org.gvsig.crs;
64

  
65
import java.awt.Color;
66
import java.awt.Window;
67

  
68
import javax.swing.JButton;
69
import javax.swing.JCheckBox;
70
import javax.swing.JLabel;
71
import javax.swing.JPanel;
72
import javax.swing.JWindow;
73
import javax.swing.border.TitledBorder;
74

  
75
import org.gvsig.andami.PluginServices;
76
import org.gvsig.andami.plugins.Extension;
77
import org.gvsig.andami.ui.mdiManager.WindowInfo;
78

  
79

  
80
public class InitialWarningExtension extends Extension {
81
//	public static Preferences fPrefs = Preferences.userRoot().node( "gvsig.initial_warkning" );
82
//	private boolean show = fPrefs.getBoolean( "show_panel", true);
83
	private DlgWaring dlgWarning;
84
    /**
85
	 * @see org.gvsig.andami.plugins.IExtension#isEnabled()
86
	 */
87
	public boolean isEnabled() {
88
		return true;
89
	}
90

  
91
	/**
92
	 * @see com.iver.mdiApp.plugins.IExtension#isVisible()
93
	 */
94
	public boolean isVisible() {
95
		return true;
96
	}
97

  
98
	/**
99
	 * @see org.gvsig.andami.plugins.IExtension#initialize()
100
	 */
101
	public void initialize() {
102
		dlgWarning = new DlgWaring();
103
		dlgWarning.setText(PluginServices.getText(this, "initial_jcrs_warning"));
104
		dlgWarning.setVisible(true);
105
	}
106

  
107
	/**
108
	 * @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
109
	 */
110
	public void execute(String actionCommand) {
111
	}
112
    
113
	private class DlgWaring extends JWindow{
114

  
115
		private JButton btnOk = null;
116
		private JCheckBox chkBoxShowAgain = null;
117
		private JLabel lblText = null;
118
		private JPanel panel=null;
119
		private JPanel panel2;
120
		/**
121
		 * This is the default constructor
122
		 */
123
		public DlgWaring() {
124
			super((Window)PluginServices.getMainFrame());
125
			Window window=(Window)PluginServices.getMainFrame();
126
			setLocation(window.getWidth()/2+window.getX()-150,window.getHeight()/2+window.getY()-150);
127
			initialize();
128
			this.setAlwaysOnTop(true);
129
		}
130

  
131
		public void setText(String string) {
132
			lblText.setText(string);
133
		}
134

  
135
		/**
136
		 * This method initializes this
137
		 *
138
		 * @return void
139
		 */
140
		private void initialize() {
141
			panel=new JPanel();
142
			panel.setBackground(Color.black);
143
			panel.setLayout(null);
144
			panel.setBounds(0,0,300,300);
145
			panel2=new JPanel();
146
			panel2.setLayout(null);
147
			panel2.setBounds(2,2,298,298);
148
			lblText = new JLabel();
149
			lblText.setBounds(15, 15, 271, 200);
150
			lblText.setText("JLabel");
151
			lblText.setBorder(new TitledBorder(PluginServices.getText(this, "warning")));
152
			panel2.add(lblText);
153
			panel2.setSize((int)(panel.getSize().getWidth()-4),(int)(panel.getSize().getHeight()-4));
154
			panel.add(panel2);
155
			this.setLayout(null);
156
			this.setSize(300, 300);
157
			this.add(getBtnOk(), null);
158
//			this.add(getChkBoxShowAgain(), null);
159
			this.add(panel, null);
160
		}
161

  
162
		/**
163
		 * This method initializes btnOk
164
		 *
165
		 * @return javax.swing.JButton
166
		 */
167
		private JButton getBtnOk() {
168
			if (btnOk == null) {
169
				btnOk = new JButton();
170
				btnOk.setBounds(100, 250, 100, 20);
171
				btnOk.setText(PluginServices.getText(this, "aceptar"));
172
				btnOk.addActionListener(new java.awt.event.ActionListener() {
173
					public void actionPerformed(java.awt.event.ActionEvent e) {
174
						dlgWarning.setVisible(false);
175
						dlgWarning.dispose();
176
						//						PluginServices.getMDIManager().closeWindow(dlgWarning);
177
					}
178
				});
179
			}
180
			return btnOk;
181
		}
182

  
183
		/**
184
		 * This method initializes chkBoxShowAgain
185
		 *
186
		 * @return javax.swing.JCheckBox
187
		 */
188
//		private JCheckBox getChkBoxShowAgain() {
189
//			if (chkBoxShowAgain == null) {
190
//				chkBoxShowAgain = new JCheckBox();
191
//				chkBoxShowAgain.setBounds(44, 116, 241, 21);
192
//				chkBoxShowAgain.setSelected(true);
193
//				chkBoxShowAgain.setText(PluginServices.getText(this, "show_this_dialog_next_startup"));
194
//			}
195
//			return chkBoxShowAgain;
196
//		}
197

  
198
		public WindowInfo getWindowInfo() {
199
			WindowInfo vi = new WindowInfo(WindowInfo.MODALDIALOG);
200
			vi.setWidth(300+8);
201
			vi.setHeight(250);
202
			vi.setTitle(PluginServices.getText(this, "warning"));
203
			return vi;
204
		}
205

  
206
	}  //  @jve:decl-index=0:visual-constraint="10,10"
207

  
208
}
0 209

  
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/installer/EPSGDatabaseInstallerFactory.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.crs.installer;
25

  
26
import java.io.File;
27
import java.io.IOException;
28
import org.apache.commons.io.FileUtils;
29
import org.gvsig.andami.PluginServices;
30
import org.gvsig.andami.PluginsLocator;
31
import org.gvsig.andami.PluginsManager;
32
import org.gvsig.crs.CrsFactory;
33
import org.gvsig.crs.JCrsExtension;
34
import org.gvsig.installer.lib.api.InstallerLocator;
35
import org.gvsig.installer.lib.api.InstallerManager;
36
import org.gvsig.installer.lib.spi.InstallerProviderLocator;
37
import org.gvsig.tools.ToolsLocator;
38
import org.gvsig.tools.dynobject.DynClass;
39
import org.gvsig.tools.dynobject.DynObject;
40
import org.gvsig.tools.dynobject.DynObjectManager;
41
import org.gvsig.tools.service.spi.AbstractProviderFactory;
42
import org.gvsig.tools.service.spi.Provider;
43
import org.gvsig.tools.service.spi.ProviderManager;
44
import org.gvsig.tools.service.spi.ProviderServices;
45
import org.slf4j.Logger;
46
import org.slf4j.LoggerFactory;
47

  
48
public class EPSGDatabaseInstallerFactory extends
49
        AbstractProviderFactory {
50

  
51
    private static final Logger logger = LoggerFactory.getLogger(EPSGDatabaseInstallerFactory.class);
52
    
53
    public static final String PROVIDER_NAME = "jCRS_EPSG";
54
    public static final String PROVIDER_DESCRIPTION = "EPSG database installer for jCRS";
55

  
56
    private DynClass dynclass;
57

  
58
    @Override
59
    protected DynClass createParametersDynClass() {
60
        if ( dynclass == null ) {
61
            initialize();
62
        }
63
        return dynclass;
64
    }
65

  
66
    @Override
67
    protected Provider doCreate(DynObject parameters, ProviderServices services) {
68
        return new EPSGDatabaseInstaller(services);
69
    }
70

  
71
    public void initialize() {
72
        if ( dynclass == null ) {
73
            DynObjectManager dynObjectManager = ToolsLocator
74
                    .getDynObjectManager();
75
            dynclass = dynObjectManager.createDynClass(PROVIDER_NAME,
76
                    PROVIDER_DESCRIPTION);
77
            dynObjectManager.add(dynclass);
78
        }
79
    }
80

  
81
    
82
    public static void registerEPSGDatabaseInstaller() {
83

  
84
        InstallerManager installerManager = InstallerLocator.getInstallerManager();
85
        ProviderManager providerManager = InstallerProviderLocator.getProviderManager();
86
        PluginsManager pluginsManager = PluginsLocator.getManager();
87

  
88
        providerManager.addProviderFactory(new EPSGDatabaseInstallerFactory());
89

  
90
        File epsgDatabaseFolder = new File(CrsFactory.getDataBaseFolder(),"EPSG");
91

  
92
        try {
93
            FileUtils.forceMkdir(epsgDatabaseFolder);
94
        } catch (IOException ex) {
95
            logger.warn("Can't create EPSG databases folder in '"+epsgDatabaseFolder.getAbsolutePath()+"'.",ex);
96
        }
97
        installerManager.setDefaultLocalAddonRepository(epsgDatabaseFolder, PROVIDER_NAME);
98
    }
99
}
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/installer/EPSGDatabaseInstaller.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.crs.installer;
25

  
26
import java.io.File;
27
import java.io.FileOutputStream;
28
import java.io.IOException;
29
import java.io.InputStream;
30
import java.net.MalformedURLException;
31
import java.util.zip.ZipEntry;
32
import java.util.zip.ZipException;
33
import java.util.zip.ZipInputStream;
34
import org.apache.commons.io.FileUtils;
35
import org.apache.commons.io.FilenameUtils;
36
import org.gvsig.andami.LocaleManager;
37
import org.gvsig.andami.PluginServices;
38
import org.gvsig.andami.PluginsLocator;
39
import org.gvsig.andami.PluginsManager;
40
import org.gvsig.crs.CrsFactory;
41
import org.gvsig.crs.JCrsExtension;
42
import org.gvsig.installer.lib.api.PackageInfo;
43
import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
44
import org.gvsig.installer.lib.spi.InstallerInfoFileException;
45
import org.gvsig.installer.lib.spi.execution.InstallPackageProvider;
46
import org.gvsig.tools.ToolsLocator;
47
import org.gvsig.tools.dynobject.DynObject;
48
import org.gvsig.tools.service.spi.AbstractProvider;
49
import org.gvsig.tools.service.spi.ProviderServices;
50
import org.gvsig.tools.task.SimpleTaskStatus;
51
import org.gvsig.tools.task.TaskStatusManager;
52
import org.slf4j.Logger;
53
import org.slf4j.LoggerFactory;
54

  
55
public class EPSGDatabaseInstaller extends AbstractProvider implements InstallPackageProvider {
56

  
57
    private static Logger logger = LoggerFactory.getLogger(EPSGDatabaseInstaller.class);
58

  
59
    private int BUFFER = 2048;
60

  
61
    public EPSGDatabaseInstaller(ProviderServices providerServices) {
62
        super(providerServices);
63
    }
64

  
65
    public void install(File applicationFolder, InputStream inputStream, PackageInfo packageInfo) throws InstallPackageServiceException {
66
        PluginsManager pluginsManager = PluginsLocator.getManager();
67
        File i18nFolder = pluginsManager.getApplicationI18nFolder();
68

  
69
        File epsgDatabaseFolder = new File(CrsFactory.getDataBaseFolder(),"EPSG");
70

  
71
        logger.info("Installing package '" + packageInfo.getCode() + "' in '" + epsgDatabaseFolder.getAbsolutePath() + "'.");
72
        try {
73
            FileUtils.forceMkdir(epsgDatabaseFolder);
74
            decompress(inputStream, epsgDatabaseFolder);
75
            activateThisDataBase(packageInfo);
76
        } catch (Exception e) {
77
            try {
78
                logger.warn("Can install package '" + packageInfo.getCode() + "'.", e);
79
                // if there is an exception, installLater is called
80
                installLater(applicationFolder, inputStream, packageInfo);
81
            } catch (IOException e1) {
82
                logger.warn("Can install package '" + packageInfo.getCode() + "'.", e1);
83
                throw new InstallPackageServiceException(e1);
84
            }
85
        }
86

  
87
    }
88

  
89
    private void activateThisDataBase(PackageInfo packageInfo) {
90
        String dbentry = "EPSG/" + packageInfo.getCode() + "/EPSG.sql";
91
        File f = new File(CrsFactory.getDataBaseFolder(),dbentry);
92
        if( !f.exists() ) {
93
            logger.warn("Can't activate EPSG database, problems locating in '"+f.getAbsolutePath()+"'.");
94
            return;
95
        }
96
        PluginsManager pluginManager = PluginsLocator.getManager();
97
        PluginServices plugin = pluginManager.getPlugin(this);
98
        DynObject pluginProperties = plugin.getPluginProperties();
99
        
100
        pluginProperties.setDynValue("epsgDatabase", dbentry);
101
        plugin.savePluginProperties();    
102
    }
103
    
104
    private void decompress(InputStream inputStream, File folder)
105
            throws ZipException, IOException, InstallerInfoFileException {
106

  
107
        ZipInputStream zis = null;
108
        ZipEntry entry = null;
109
        byte data[] = new byte[BUFFER];
110
        int count = 0;
111

  
112
        TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
113
        SimpleTaskStatus taskStatus = manager.createDefaultSimpleTaskStatus("Uncompressing...");
114

  
115
        manager.add(taskStatus);
116
        String entryName = "(header)";
117
        try {
118
            long readed = 0;
119
            zis = new ZipInputStream(inputStream);
120
            while ( (entry = zis.getNextEntry()) != null ) {
121
                entryName = FilenameUtils.separatorsToSystem(entry.getName());
122
                taskStatus.message(entryName);
123

  
124
                File file = new File(folder, entryName);
125
                if ( entry.isDirectory() ) {
126
                    file.mkdirs();
127
                } else {
128
                    if ( file.exists() ) {
129
                        FileUtils.forceDelete(file);
130
                    }
131
                    if ( !file.getParentFile().exists() ) {
132
                        FileUtils.forceMkdir(file.getParentFile());
133
                    }
134
                    logger.debug("extracting " + file.getAbsolutePath());
135
                    FileOutputStream fos = new FileOutputStream(file);
136
                    while ( (count = zis.read(data, 0, BUFFER)) != -1 ) {
137
                        fos.write(data, 0, count);
138
                        readed += count;
139
                        taskStatus.setCurValue(readed);
140
                    }
141
                    fos.flush();
142
                    fos.close();
143
                }
144
            }
145
            zis.close();
146
        } catch (IOException ex) {
147
            logger.warn("Problems uncompresing 'EPSG database' (last entry '" + entryName + "'.", ex);
148
            throw ex;
149

  
150
        } catch (RuntimeException ex) {
151
            logger.warn("Problems uncompresing 'EPSG database' (last entry '" + entryName + "'.", ex);
152
            throw ex;
153

  
154
        } finally {
155
            taskStatus.remove();
156

  
157
        }
158
    }
159

  
160
    public void installLater(File applicationDirectory, InputStream inputStream, PackageInfo packageInfo) throws InstallPackageServiceException, IOException {
161
        logger.warn("installLater is not implementes.");
162
    }
163
}
org.gvsig.projection.jcrs/tags/org.gvsig.projection.jcrs-2.1.10/org.gvsig.projection.app.jcrs/org.gvsig.projection.app.jcrs.common/src/main/java/org/gvsig/crs/JCrsExtension.java
1
/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2006 Instituto de Desarrollo Regional and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *  Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Ibáñez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *      +34 963862235
28
 *   gvsig@gva.es
29
 *      www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   Instituto de Desarrollo Regional (Universidad de Castilla La-Mancha
34
 *   Campus Universitario s/n
35
 *   02071 Alabacete
36
 *   Spain
37
 *
38
 *   +34 967 599 200
39
 */
40

  
41

  
42
package org.gvsig.crs;
43

  
44
import java.io.File;
45
import java.io.IOException;
46

  
47
import org.apache.commons.io.FileUtils;
48
import org.gvsig.andami.IconThemeHelper;
49
import org.gvsig.andami.PluginServices;
50
import org.gvsig.andami.PluginsLocator;
51
import org.gvsig.andami.plugins.Extension;
52
import org.gvsig.app.gui.panels.CRSSelectPanelFactory;
53
import org.gvsig.crs.gui.panels.CrsUIFactory;
54
import org.gvsig.crs.gui.panels.ProjChooserPanel;
55
import org.gvsig.crs.preferences.JCRSPreferencesPage;
56
import org.gvsig.tools.ToolsLocator;
57
import org.gvsig.tools.extensionpoint.ExtensionPoint;
58
import org.gvsig.tools.extensionpoint.ExtensionPointManager;
59
import org.slf4j.Logger;
60
import org.slf4j.LoggerFactory;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff