Revision 33778

View differences:

tags/v2_0_0_Build_2020/libraries/libCompat/pom.xml
1
<?xml version="1.0" encoding="UTF-8"?>
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
5
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
6

  
7
	<modelVersion>4.0.0</modelVersion>
8

  
9
	<!-- The Basics -->
10
	<groupId>org.gvsig</groupId>
11
	<artifactId>org.gvsig.compat</artifactId>
12
	<version>2.0-SNAPSHOT</version>
13

  
14
	<name>libCompat</name>
15
	<url>http://gvsig.org</url>
16
	<parent>
17
		<groupId>org.gvsig</groupId>
18
		<artifactId>gvsig-base-library-pom</artifactId>
19
		<version>2.0-SNAPSHOT</version>
20
	</parent>
21
	<distributionManagement>
22
		<site>
23
			<id>gvsig-repository</id>
24
			<url>${site-repository}/</url>
25
		</site>
26
	</distributionManagement>
27

  
28
	<properties>
29
		<build-dir>${basedir}/../build</build-dir>
30
	</properties>
31

  
32
	<dependencies>
33
		<dependency>
34
			<groupId>org.gvsig</groupId>
35
			<artifactId>org.gvsig.tools.lib</artifactId>
36
		</dependency>
37
	</dependencies>
38

  
39
	<!-- Build Settings -->
40
	<build>
41
		<sourceDirectory>src</sourceDirectory>
42
		<testSourceDirectory>src-test</testSourceDirectory>
43
		<testResources>
44
			<testResource>
45
				<directory>${basedir}/resources-test</directory>
46
			</testResource>
47
		</testResources>
48
	</build>
49

  
50
	<profiles>
51
		<profile>
52
			<id>se</id>
53
			<activation>
54
				<activeByDefault>true</activeByDefault>
55
			</activation>
56

  
57
			<build>
58
				<plugins>
59
					<plugin>
60
						<groupId>org.apache.maven.plugins</groupId>
61
						<artifactId>maven-compiler-plugin</artifactId>
62
						<configuration>
63
							<source>1.4</source>
64
							<target>1.4</target>
65
							<!-- put your configurations here -->
66
							<encoding>ISO-8859-1</encoding>
67
						</configuration>
68
					</plugin>
69
					<plugin>
70
						<groupId>org.apache.maven.plugins</groupId>
71
						<artifactId>maven-jar-plugin</artifactId>
72
						<configuration>
73
							<excludes>
74
								<exclude>**/se/**</exclude>
75
							</excludes>
76
						</configuration>
77

  
78
						<executions>
79
							<!-- Generates a jar file only with the libCompat SE implementation. -->
80
							<execution>
81
								<id>se</id>
82
								<phase>package</phase>
83
								<goals>
84
									<goal>jar</goal>
85
								</goals>
86
								<configuration>
87
									<classifier>se</classifier>
88
									<excludes>
89
										<exclude>NONE</exclude>
90
									</excludes>
91
									<includes>
92
										<include>**/se/**</include>
93
									</includes>
94
								</configuration>
95
							</execution>
96
							<!--
97
								Generates a jar file with the test, to be reused by other library
98
								implementations.
99
							-->
100
							<execution>
101
								<goals>
102
									<goal>test-jar</goal>
103
								</goals>
104
							</execution>
105
						</executions>
106
					</plugin>
107
					<plugin>
108
						<artifactId>maven-antrun-plugin</artifactId>
109
						<executions>
110
							<execution>
111
								<id>services</id>
112
								<phase>package</phase>
113
								<goals>
114
									<goal>run</goal>
115
								</goals>
116
								<configuration>
117
									<tasks>
118
										<jar destfile="${project.build.directory}/${project.build.finalName}.jar"
119
											update="true">
120
											<fileset dir="${basedir}/resources/api" />
121
										</jar>
122
										<jar destfile="${project.build.directory}/${project.build.finalName}-se.jar"
123
											update="true">
124
											<fileset dir="${basedir}/resources/se" />
125
										</jar>
126
									</tasks>
127
								</configuration>
128
							</execution>
129
						</executions>
130
					</plugin>
131
					<plugin>
132
						<groupId>org.apache.maven.plugins</groupId>
133
						<artifactId>maven-surefire-plugin</artifactId>
134
						<configuration>
135
							<additionalClasspathElements>
136
								<additionalClasspathElement>${basedir}/resources/api</additionalClasspathElement>
137
								<additionalClasspathElement>${basedir}/resources/se</additionalClasspathElement>
138
							</additionalClasspathElements>
139
						</configuration>
140
					</plugin>
141
				</plugins>
142
			</build>
143
		</profile>
144

  
145
		<profile>
146
			<id>cdc</id>
147
			<activation>
148
				<activeByDefault>false</activeByDefault>
149
			</activation>
150
			<build>
151
				<plugins>
152
					<plugin>
153
						<groupId>org.apache.maven.plugins</groupId>
154
						<artifactId>maven-compiler-plugin</artifactId>
155
						<configuration>
156
							<excludes>
157
								<exclude>**/se/**</exclude>
158
							</excludes>
159
							<testExcludes>
160
								<exclude>**/se/**</exclude>
161
							</testExcludes>
162
						</configuration>
163
					</plugin>
164

  
165
					<plugin>
166
						<groupId>org.apache.maven.plugins</groupId>
167
						<artifactId>maven-jar-plugin</artifactId>
168
						<configuration>
169
							<excludes>
170
								<exclude>**/se/**</exclude>
171
							</excludes>
172
						</configuration>
173
						<executions>
174
							<!--
175
								Generates a jar file only with the libCompat API. <execution>
176
								<id>api</id> <phase>package</phase> <goals><goal>jar</goal></goals>
177
								<configuration> <classifier>api</classifier> <excludes>
178
								<exclude>**/se/**</exclude> </excludes> </configuration> </execution>
179
							-->
180
							<!--
181
								Generates a jar file with the test, to be reused by other library
182
								implementations.
183
							-->
184
							<execution>
185
								<goals>
186
									<goal>test-jar</goal>
187
								</goals>
188
							</execution>
189
						</executions>
190
					</plugin>
191
					<plugin>
192
						<artifactId>maven-antrun-plugin</artifactId>
193
						<executions>
194
							<execution>
195
								<id>services</id>
196
								<phase>package</phase>
197
								<goals>
198
									<goal>run</goal>
199
								</goals>
200
								<configuration>
201
									<tasks>
202
										<jar destfile="${project.build.directory}/${project.build.finalName}.jar"
203
											update="true">
204
											<fileset dir="${basedir}/resources/api" />
205
										</jar>
206
									</tasks>
207
								</configuration>
208
							</execution>
209
						</executions>
210
					</plugin>
211

  
212
				</plugins>
213
			</build>
214

  
215
		</profile>
216
		<profile>
217
			<id>eclipse-project</id>
218
			<build>
219
				<plugins>
220
					<plugin>
221
						<artifactId>maven-antrun-plugin</artifactId>
222
						<configuration>
223
							<tasks>
224
								<ant antfile="${build-dir}/ant-tasks/eclipse-tasks.xml" target="eclipse.all" />
225
							</tasks>
226
						</configuration>
227
					</plugin>
228
				</plugins>
229
			</build>
230
		</profile>
231
	</profiles>
232

  
233
	<reporting>
234
		<plugins>
235
			<plugin>
236
				<groupId>org.apache.maven.plugins</groupId>
237
				<artifactId>maven-javadoc-plugin</artifactId>
238
				<reportSets>
239
					<reportSet>
240
						<id>api</id>
241
						<configuration>
242
							<excludePackageNames>org.gvsig.compat.se</excludePackageNames>
243
							<name>Javadoc: API</name>
244
							<destDir>apidoc</destDir>
245
							<windowtitle>API Documentation</windowtitle>
246
							<links>
247
								<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
248
								<link>http://www.slf4j.org/api/</link>
249
								<link>${site-repository}/org.gvsig.tools/2.0.0/apidocs/</link>
250
							</links>
251
						</configuration>
252
						<reports>
253
							<report>javadoc</report>
254
						</reports>
255
					</reportSet>
256
					<reportSet>
257
						<id>se-impl</id>
258
						<configuration>
259
							<doctitle>${project.name} ${project.version} SE
260
								Implementation</doctitle>
261
							<subpackages>org.gvsig.compat.se</subpackages>
262
							<name>Javadoc: SE impl</name>
263
							<destDir>sedoc</destDir>
264
							<windowtitle>SE implementation Documentation</windowtitle>
265
							<links>
266
								<link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
267
								<link>http://www.slf4j.org/api/</link>
268
								<link>../apidoc/</link>
269
								<link>${site-repository}/org.gvsig.tools/2.0.0/apidocs/</link>
270
							</links>
271
						</configuration>
272
						<reports>
273
							<report>javadoc</report>
274
						</reports>
275
					</reportSet>
276
				</reportSets>
277
			</plugin>
278
		</plugins>
279
	</reporting>
280
</project>
tags/v2_0_0_Build_2020/libraries/libCompat/resources/se/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.compat.se.SECompatLibrary
tags/v2_0_0_Build_2020/libraries/libCompat/resources/api/META-INF/services/org.gvsig.tools.library.Library
1
org.gvsig.compat.CompatLibrary
tags/v2_0_0_Build_2020/libraries/libCompat/src-test/org/gvsig/compat/se/SECompatLibraryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 {DiSiD Technologies}  {{Task}}
26
 */
27
package org.gvsig.compat.se;
28

  
29
import junit.framework.TestCase;
30

  
31
import org.gvsig.compat.CompatLocator;
32
import org.gvsig.compat.se.lang.StandardStringUtils;
33
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer;
34

  
35
/**
36
 * Unit tests for the {@link SECompatLibrary} class.
37
 * 
38
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
39
 */
40
public class SECompatLibraryTest extends TestCase {
41

  
42
    /**
43
     * Test method for {@link org.gvsig.compat.se.SECompatLibrary#initialize()}.
44
     */
45
    public void testInitialize() {
46
        new DefaultLibrariesInitializer().fullInitialize();
47

  
48
        // Check if the correct implementation is returned
49
        assertEquals(StandardStringUtils.class, CompatLocator.getStringUtils()
50
                .getClass());
51
    }
52

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 {{Company}}   {{Task}}
26
 */
27
package org.gvsig.compat.se.lang;
28

  
29
import org.gvsig.compat.lang.StringUtils;
30
import org.gvsig.compat.lang.StringUtilsTestParent;
31

  
32
/**
33
 * Unit tests for the {@link org.gvsig.compat.se.lang.StandardStringUtils}
34
 * class.
35
 * 
36
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
37
 */
38
public class StandardStringUtilsTest extends StringUtilsTestParent {
39

  
40
    protected StringUtils createUtils() {
41
        return new StandardStringUtils();
42
    }
43

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 PRODEVELOP S.L. Main Development
26
 */
27
package org.gvsig.compat.se.lang;
28

  
29
import org.gvsig.compat.lang.MathUtils;
30
import org.gvsig.compat.lang.MathUtilsTestParent;
31

  
32
public class SEMathUtilsTest extends MathUtilsTestParent{
33

  
34
	protected MathUtils createUtils() {
35
		return new SEMathUtils();
36
	}
37

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 {DiSiD Technologies}  {{Task}}
26
 */
27
package org.gvsig.compat;
28

  
29
import junit.framework.TestCase;
30

  
31
import org.gvsig.tools.library.Library;
32

  
33
/**
34
 * Unit tests for the {@link CompatLibrary} class.
35
 * 
36
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
37
 */
38
public class CompatLibraryTest extends TestCase {
39

  
40
    /**
41
     * Test method for {@link org.gvsig.compat.se.SECompatLibrary#initialize()}.
42
     */
43
    public void testInitialize() {
44
        Library api = new CompatLibrary();
45

  
46
        // 1: Initialize the Library
47
        api.initialize();
48

  
49
        // 2: postInitialize them
50
        // as we don't initialize an implementation library,
51
        // the postInitialization must throw an Exception
52
        try {
53
            api.postInitialize();
54
            fail("Library postInitialization is not checking "
55
                    + "for implementation availability");
56
        } catch (Exception ex) {
57
            // Good
58
        }
59
    }
60

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 {{Company}}   {{Task}}
26
 */
27
package org.gvsig.compat.lang;
28

  
29
import java.util.Arrays;
30
import java.util.List;
31

  
32
import junit.framework.TestCase;
33

  
34
/**
35
 * Parent class for Unit tests for {@link org.gvsig.compat.lang.StringUtils}
36
 * implementations.
37
 * 
38
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
39
 */
40
public abstract class StringUtilsTestParent extends TestCase {
41

  
42
	private StringUtils utils;
43

  
44
	protected void setUp() throws Exception {
45
		super.setUp();
46
		utils = createUtils();
47
	}
48

  
49
	/**
50
	 * Return a new instance of an implementation of the StringUtils interface.
51
	 * 
52
	 * @return a new StringUtils instance
53
	 */
54
	protected abstract StringUtils createUtils();
55

  
56
	/**
57
	 * Test method for
58
	 * {@link org.gvsig.compat.se.lang.StandardStringUtils#split(java.lang.String, java.lang.String)}
59
	 * .
60
	 */
61
	public void testSplitString() {
62
		// Check the result is the same as the returned with the String.split
63
		// method.
64
		List list1;
65
		List list2;
66

  
67
		String testString = "En un lugar de la Mancha";
68
		String regex = " ";
69

  
70
		list1 = Arrays.asList(new String[] { "En", "un", "lugar", "de", "la",
71
				"Mancha" });
72

  
73
		list2 = Arrays.asList(utils.split(testString, regex));
74

  
75
		assertEquals(list1, list2);
76

  
77
		list1 = Arrays.asList(new String[] { "En", "un lugar de la Mancha" });
78

  
79
		list2 = Arrays.asList(utils.split(testString, regex, 2));
80

  
81
		assertEquals(list1, list2);
82
	}
83

  
84
	/**
85
	 * Test method for
86
	 * {@link org.gvsig.compat.se.lang.StandardStringUtils#replaceAll(java.lang.String, java.lang.String, java.lang.String)}
87
	 * .
88
	 */
89
	public void testReplaceAll() {
90
		// Check the result is the same as the returned with the
91
		// String.replaceAll method.
92
		String testString = "En un lugar de la Mancha";
93
		String regex = " ";
94
		String replacement = "_";
95

  
96
		assertEquals("En_un_lugar_de_la_Mancha",
97
				utils.replaceAll(testString, regex, replacement));
98

  
99
		// Check replaceFirst
100
		assertEquals("En_un lugar de la Mancha",
101
				utils.replaceFirst(testString, regex, replacement));
102
	}
103

  
104
	/**
105
	 * Test method for
106
	 * {@link org.gvsig.compat.se.lang.StandardStringUtils#compare(String, String, boolean)}
107
	 * .
108
	 */
109
	public void testCompare() {
110
		String avion = "Avi?n";
111
		String avionaccent = "Avion";
112
		String barco = "Barco";
113

  
114
		// Same value
115
		assertEquals(avion + " is not equal to " + avion, 0,
116
				utils.compare(avion, avion, false));
117
		assertEquals(avion + " is not equal to " + avion, 0,
118
				utils.compare(avion, avion, true));
119

  
120
		// Non localized comparison
121
		assertTrue(utils.compare(avion, barco, false) < 0);
122
		assertTrue(utils.compare(avion, avionaccent, false) > 0);
123
		assertTrue(utils.compare(barco, avion, false) > 0);
124
		assertTrue(utils.compare(avionaccent, avion, false) < 0);
125

  
126
		// Localized comparison, so accents must not be taken into account
127
		assertTrue(utils.compare(avion, barco, true) < 0);
128
		assertEquals(0, utils.compare(avion, avionaccent, true));
129
		assertTrue(utils.compare(barco, avion, true) > 0);
130
		assertEquals(0, utils.compare(avionaccent, avion, true));
131
	}
132
}
tags/v2_0_0_Build_2020/libraries/libCompat/src-test/org/gvsig/compat/lang/MathUtilsTestParent.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 PRODEVELOP S.L. Main Development
26
 */
27
package org.gvsig.compat.lang;
28

  
29
import junit.framework.TestCase;
30

  
31
/**
32
 * Parent class for Unit tests for {@link org.gvsig.compat.lang.MathUtils}
33
 * implementations.
34
 * 
35
 * @author <a href="mailto:jcarrasco@prodevelop.es">Javier Carrasco</a>
36
 */
37
public abstract class MathUtilsTestParent extends TestCase{
38
	
39
	private MathUtils utils;
40

  
41
    protected void setUp() throws Exception {
42
        super.setUp();
43
        utils = createUtils();
44
    }
45

  
46
    /**
47
     * Return a new instance of an implementation of the MathUtils interface.
48
     * 
49
     * @return a new MathUtils instance
50
     */
51
    protected abstract MathUtils createUtils();
52
    
53
    /**
54
     * Test method for
55
     * {@link org.gvsig.compat.se.lang.MathUtils#log10(double)}
56
     * .
57
     */
58
    public void testLog10() {
59
    	assertEquals(utils.log10(1000),3.0,0.00000000001);
60
    }
61
}
tags/v2_0_0_Build_2020/libraries/libCompat/resources-test/log4j.xml
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
3

  
4
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
5

  
6
	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
7
		<layout class="org.apache.log4j.PatternLayout">
8
			<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n  %m%n" />
9
		</layout>
10
	</appender>
11

  
12
	<category name="org.gvsig.tools">
13
		<priority value="DEBUG" />
14
	</category>
15
	<category name="org.gvsig.compat">
16
		<priority value="DEBUG" /> 
17
	</category>
18

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 PRODEVELOP S.L. Main Development
26
 */
27
package org.gvsig.compat.lang;
28

  
29
/**
30
 * Math Utilities used for Java SE-ME compatibility.
31
 * 
32
 * @author <a href="mailto:jcarrasco@prodevelop.es">Javier Carrasco</a>
33
 */
34
public interface MathUtils {
35
	/**
36
     * Compatible implementation of the Math.log10(double) method.
37
     * @see Math#log10(double)
38
     */
39
    double log10(double value);
40
}
tags/v2_0_0_Build_2020/libraries/libCompat/src/org/gvsig/compat/lang/GraphicsUtils.java
1
package org.gvsig.compat.lang;
2

  
3
import java.awt.Font;
4
import java.awt.Graphics2D;
5
import java.awt.Image;
6
import java.awt.image.BufferedImage;
7

  
8
import org.gvsig.compat.print.PrintAttributes;
9

  
10
/**
11
 * Multi-platform graphic utils interface.
12
 * This allows platforms with poor java.awt.Graphics2D implementations to
13
 * share most of the application source code.
14
 *   
15
 * @author Juan Lucas Dominguez Rubio jldominguez at prodevelop.es
16
 *
17
 */
18
public interface GraphicsUtils {
19
	
20
	/**
21
	 * Create a buffered Image of the given size and type.
22
	 * In this context, buffered image means editable image (admits setRGB etc)
23
	 *  
24
	 * @param w width in pixels of the requested image
25
	 * @param h height in pixels of the requested image
26
	 * @param type image type (refers to bands, etc. see {@link Image}
27
	 * @return a buffered (editable) image of the desired size and type
28
	 */
29
	public BufferedImage createBufferedImage(int w, int h, int type);
30
	
31
	/**
32
	 * Produces a copy of a buffered image with the same graphic content (pixel color)
33
	 * @param img image to be copied
34
	 * @return new instance of a BufferedImage (editable) with same size, type and graphic content.
35
	 */
36
	public BufferedImage copyBufferedImage(BufferedImage img);
37
	
38
	/**
39
	 * Returns an istance of Font which is the same as the one provided except for the size.
40
	 * 
41
	 * @param srcfont provided font to be used as model
42
	 * @param newheight height in pixels of the new fonr 
43
	 * @return the new font, same properties as the provided font, but different size
44
	 */
45
	public Font deriveFont(Font srcfont, float newheight);
46
	
47
	/**
48
	 * Returns device screen DPI (dots per inch)
49
	 * 
50
	 * @return number of pixels per inch in the current screen
51
	 */
52
	public int getScreenDPI();
53

  
54
	/**
55
	 * Adds a translation operation to the Graphics2D object's transformation matrix.
56
	 *   
57
	 * @param g Object whose transformation matrix has to be modified
58
	 * @param x horizontal offset of the translation 
59
	 * @param y vertical offset of the translation
60
	 */
61
	public void translate(Graphics2D g, double x, double y);
62
	
63
	/**
64
	 * Creates an object that implements the PrintAttributes interface with default/trivial values.
65
	 * 
66
	 * @return an object that implements the PrintAttributes interface with default/trivial values.
67
	 */
68
	public PrintAttributes createPrintAttributes();
69
	
70
	/**
71
	 * Sets the rendering hints to the Graphics2D object in a way that is suitable for drawing.
72
	 *  
73
	 * @param g the Graphics2D object whose rendering hints have to be set for drawing
74
	 */
75
	public void setRenderingHintsForDrawing(Graphics2D g);
76
	
77
	/**
78
	 * Sets the rendering hints to the Graphics2D object in a way that is suitable for printing.
79
	 *  
80
	 * @param g the Graphics2D object whose rendering hints have to be set for printing
81
	 */
82
	public void setRenderingHintsForPrinting(Graphics2D g);
83
}
0 84

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 DiSiD Technologies   Extract interface for the StringUtils utility
26
 */
27
package org.gvsig.compat.lang;
28

  
29
/**
30
 * String Utilities used for Java SE-ME compatibility.
31
 * 
32
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
33
 */
34
public interface StringUtils {
35
    
36
    /**
37
     * Compatible implementation of the String.split(regexp) method.
38
     * @see String#split(String)
39
     */
40
    String[] split(String input, String regex);
41
    
42
    /**
43
     * Compatible implementation of the String.split(regexp, limit) method.
44
     * @see String#split(String, int)
45
     */
46
    String[] split(String input, String regex, int limit);
47
    
48
    /**
49
     * Compatible implementation of the String.replaceAll(regexp, replacement)
50
     * method.
51
     * 
52
     * @see String#replaceAll(String, String)
53
     */
54
    String replaceAll(String input, String regex,
55
            String replacement);
56
    
57
    /**
58
     * Compatible implementation of the String.replaceFirst(regexp, replacement)
59
     * method.
60
     * 
61
     * @see String#replaceFirst(String, String)
62
     */
63
    String replaceFirst(String input, String regex,
64
            String replacement);
65

  
66
	/**
67
	 * Compares two Strings, maybe taking into account the current locale.
68
	 * 
69
	 * @param source
70
	 *            the source text
71
	 * @param target
72
	 *            the target text to compare to
73
	 * @param localized
74
	 *            if the comparison must be made with the current locale (ex: if
75
	 *            making a difference between accented characters or not).
76
	 * @return Returns an integer value. Value is less than zero if source is
77
	 *         less than target, value is zero if source and target are equal,
78
	 *         value is greater than zero if source is greater than target.
79
	 */
80
	int compare(String source, String target, boolean localized);
81
}
tags/v2_0_0_Build_2020/libraries/libCompat/src/org/gvsig/compat/net/Downloader.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.compat.net;
23

  
24
import java.io.File;
25
import java.io.IOException;
26
import java.net.ConnectException;
27
import java.net.URL;
28
import java.net.UnknownHostException;
29

  
30

  
31

  
32
/**
33
 * @author gvSIG Team
34
 * @version $Id$
35
 *
36
 */
37
public interface Downloader {
38
    /**
39
     * Downloads an URL into a temporary file that is removed the next time the
40
     * tempFileManager class is called, which means the next time gvSIG is launched.
41
     *
42
     * @param url
43
     * @param name
44
     * @return
45
     * @throws IOException
46
     * @throws ServerErrorResponseException
47
     * @throws ConnectException
48
     * @throws UnknownHostException
49
     */
50
    public File downloadFile(URL url, String name, ICancellable cancel) throws IOException,ConnectException, UnknownHostException;
51
    
52

  
53
    /**
54
     * Downloads a URL using the HTTP Post protocol
55
     * @param url
56
     * The server URL
57
     * @param data
58
     * The data to send in the request
59
     * @param name
60
     * A common name for all the retrieved files
61
     * @param cancel
62
     * Used to cancel the downloads
63
     * @return
64
     * The retrieved file
65
     * @throws IOException
66
     * @throws ConnectException
67
     * @throws UnknownHostException
68
     */
69
    public File downloadFile(URL url, String data, String name, ICancellable cancel) throws IOException,ConnectException, UnknownHostException;
70
 
71
    public void removeURL(URL url);
72
    
73
    public void removeURL(Object url);
74
    
75
    /**
76
     * Cleans every temporal file previously downloaded.
77
     */
78
    public void cleanUpTempFiles();
79
       
80

  
81
}
0 82

  
tags/v2_0_0_Build_2020/libraries/libCompat/src/org/gvsig/compat/net/ICancellable.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: ICancellable.java 29658 2009-06-29 17:10:19Z jpiera $
45
 * $Log$
46
 * Revision 1.1  2006-05-24 16:37:34  jaume
47
 * *** empty log message ***
48
 *
49
 *
50
 */
51
package org.gvsig.compat.net;
52

  
53
/**
54
 * <p>When a task is accessing to remote data, takes an indeterminate time, and occasionally gets locked. That's
55
 * the reason a task should support to be cancelable.</p>
56
 * <p><code>ICancellable</code> interface is designed for getting information about the cancellation of a
57
 * task of downloading remote information.</p>
58
 */
59
public interface ICancellable {
60
	/**
61
	 * <p>Returns <code>true</code> if a download or a group of downloads tasks has been canceled.</p>
62
	 * 
63
	 * @return <code>true</code> if a download or a group of downloads tasks has been canceled, otherwise <code>false</code>
64
	 */
65
	public boolean isCanceled();
66
	
67
	/**
68
	 * <p>Used to cancel only a group of downloads tasks with the same identifier.</p>
69
	 * 
70
	 * @return the identifier
71
	 */
72
	public Object getID();
73
}
0 74

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 DiSiD Technologies   Create initial base implementation
26
 */
27
package org.gvsig.compat;
28

  
29
import org.gvsig.compat.lang.GraphicsUtils;
30
import org.gvsig.compat.lang.MathUtils;
31
import org.gvsig.compat.lang.StringUtils;
32
import org.gvsig.compat.net.Downloader;
33
import org.gvsig.tools.locator.BaseLocator;
34
import org.gvsig.tools.locator.Locator;
35
import org.gvsig.tools.locator.LocatorException;
36

  
37
/**
38
 * Locator for the libCompat Library. Returns references to the library's main
39
 * utilities.
40
 * 
41
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
42
 */
43
public class CompatLocator extends BaseLocator {
44
    
45
    /**
46
     * The name of the StringUtils reference.
47
     */
48
    public static final String STRINGUTILS_NAME = "StringUtils";
49
    
50
    /**
51
     * The name of the MathUtils reference.
52
     */
53
    public static final String MATHUTILS_NAME = "MathUtils";
54
    public static final String GRAPHICSUTILS_NAME = "GraphicsUtils";
55

  
56
    /**
57
     * The description of the StringUtils reference.
58
     */
59
    private static final String STRINGUTILS_DESCRIPTION = "Compatible implementation for String Utilities";
60
    
61
    /**
62
     * The description of the MathUtils reference.
63
     */
64
    private static final String MATHUTILS_DESCRIPTION = "Compatible implementation for Math Utilities";
65
    private static final String GRAPHICSUTILS_DESCRIPTION = "Compatible implementation for Graphics Utilities";
66
    
67
    /**
68
     * The name and the description for the {@link Downloader} reference.
69
     */
70
    public static final String DOWNLOADER_NAME = "Downloader";
71
    public static final String DOWNLOADER_DESCRIPTION = "Downloader descripction";
72

  
73
    /**
74
     * Unique instance.
75
     */
76
    private static final CompatLocator instance = new CompatLocator();
77

  
78
    /**
79
     * Return the singleton instance.
80
     * 
81
     * @return the singleton instance
82
     */
83
    public static CompatLocator getInstance() {
84
        return instance;
85
    }
86

  
87
    /**
88
     * Return a reference to StringUtils.
89
     * 
90
     * @return a reference to StringUtils
91
     * @throws LocatorException
92
     *             if there is no access to the class or the class cannot be
93
     *             instantiated
94
     * @see Locator#get(String)
95
     */
96
    public static StringUtils getStringUtils() throws LocatorException {
97
        return (StringUtils) getInstance().get(STRINGUTILS_NAME);
98
    }
99

  
100
    /**
101
     * Return a reference to MathUtils.
102
     * 
103
     * @return a reference to MathUtils
104
     * @throws LocatorException
105
     *             if there is no access to the class or the class cannot be
106
     *             instantiated
107
     * @see Locator#get(String)
108
     */
109
    public static MathUtils getMathUtils() throws LocatorException {
110
        return (MathUtils) getInstance().get(MATHUTILS_NAME);
111
    }
112

  
113
    
114
    /**
115
     * Registers the Class implementing the MathUtils interface.
116
     * 
117
     * @param clazz
118
     *            implementing the MathUtils interface
119
     */
120
    public static void registerMathUtils(Class clazz) {
121
        getInstance()
122
                .register(MATHUTILS_NAME, MATHUTILS_DESCRIPTION, clazz);
123
    }
124
    
125
    /**
126
     * Registers the Class implementing the StringUtils interface.
127
     * 
128
     * @param clazz
129
     *            implementing the StringUtils interface
130
     */
131
    public static void registerStringUtils(Class clazz) {
132
        getInstance()
133
                .register(STRINGUTILS_NAME, STRINGUTILS_DESCRIPTION, clazz);
134
    }
135
    
136
    // ============================================================
137
    // ============================================================
138
    // ============================================================
139
    
140
    /**
141
     * Return a reference to GraphicsUtils.
142
     * 
143
     * @return a reference to GraphicsUtils
144
     * @throws LocatorException
145
     *             if there is no access to the class or the class cannot be
146
     *             instantiated
147
     * @see Locator#get(String)
148
     */
149
    public static GraphicsUtils getGraphicsUtils() throws LocatorException {
150
        return (GraphicsUtils) getInstance().get(GRAPHICSUTILS_NAME);
151
    }
152

  
153
    
154
    /**
155
     * Registers the Class implementing the GraphicsUtils interface.
156
     * 
157
     * @param clazz
158
     *            implementing the GraphicsUtils interface
159
     */
160
    public static void registerGraphicsUtils(Class clazz) {
161
        getInstance()
162
                .register(GRAPHICSUTILS_NAME, GRAPHICSUTILS_DESCRIPTION, clazz);
163
    }
164
    
165
    /**
166
     * Return a reference to GraphicsUtils.
167
     * 
168
     * @return a reference to GraphicsUtils
169
     * @throws LocatorException
170
     *             if there is no access to the class or the class cannot be
171
     *             instantiated
172
     * @see Locator#get(String)
173
     */
174
    public static Downloader getDownloader() throws LocatorException {
175
        return (Downloader) getInstance().get(DOWNLOADER_NAME);
176
    }
177

  
178
    
179
    /**
180
     * Registers the Class implementing the GraphicsUtils interface.
181
     * 
182
     * @param clazz
183
     *            implementing the GraphicsUtils interface
184
     */
185
    public static void registerDownloader(Class clazz) {
186
        getInstance()
187
                .register(DOWNLOADER_NAME, DOWNLOADER_DESCRIPTION, clazz);
188
    }
189
    
190
    
191
}
tags/v2_0_0_Build_2020/libraries/libCompat/src/org/gvsig/compat/se/SECompatLibrary.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
*
3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4
* of the Valencian Government (CIT)
5
* 
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
* 
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU General Public License for more details.
15
* 
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
* MA  02110-1301, USA.
20
* 
21
*/
22

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 DiSiD Technologies   Create initial base implementation
26
 */
27
package org.gvsig.compat.se;
28

  
29
import org.gvsig.compat.CompatLibrary;
30
import org.gvsig.compat.CompatLocator;
31
import org.gvsig.compat.se.lang.SEGraphUtils;
32
import org.gvsig.compat.se.lang.SEMathUtils;
33
import org.gvsig.compat.se.lang.StandardStringUtils;
34
import org.gvsig.compat.se.net.SEDownloader;
35
import org.gvsig.tools.library.AbstractLibrary;
36
import org.gvsig.tools.library.Library;
37
import org.gvsig.tools.library.LibraryException;
38

  
39
/**
40
 * Initialization of the libCompat library, Java Standard Edition
41
 * implementation.
42
 * 
43
 * @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
44
 */
45
public class SECompatLibrary extends AbstractLibrary {
46
	
47
	public SECompatLibrary() {
48
		super(CompatLibrary.class, Library.TYPE.IMPL);
49
	}
50

  
51
	protected void doInitialize() throws LibraryException {
52
		CompatLocator.registerStringUtils(StandardStringUtils.class);
53
		CompatLocator.registerMathUtils(SEMathUtils.class);
54
		CompatLocator.registerGraphicsUtils(SEGraphUtils.class);
55
		CompatLocator.registerDownloader(SEDownloader.class);
56
	}
57

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 PRODEVELOP S.L. Main Development
26
 */
27
package org.gvsig.compat.se.lang;
28

  
29
import org.gvsig.compat.lang.MathUtils;
30

  
31
/**
32
 * JSE (Desktop Java) implementation of {@link MathUtils}
33
 * 
34
 * @author Juan Lucas Dominguez Rubio jldominguez at prodevelop.es
35
 * 
36
 * @see MathUtils
37
 *
38
 */
39
public class SEMathUtils implements MathUtils{
40

  
41
	public double log10(double value) {
42
		return Math.log10(value);
43
	}
44

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

  
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 DiSiD Technologies   Create initial implementation of StringUtils for Java SE.
26
 */
27
package org.gvsig.compat.se.lang;
28

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

Also available in: Unified diff