Revision 35113
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/prepare-workspace.xml | ||
---|---|---|
1 |
<project name="org.gvsig.initial.build" default="prepare-workspace"> |
|
2 |
|
|
3 |
<dirname property="org.gvsig.initial.build.basedir" file="${ant.file.org.gvsig.initial.build}"/> |
|
4 |
|
|
5 |
<property name="workspace.basedir" |
|
6 |
value="${org.gvsig.initial.build.basedir}/.."/> |
|
7 |
<property name="build.basedir" |
|
8 |
value="${workspace.basedir}/org.gvsig.maven.base.build" |
|
9 |
description="Eclipse workspace location"/> |
|
10 |
<property name="build.jar.version" |
|
11 |
value="1.0.6-SNAPSHOT" /> |
|
12 |
<property name="build.jar.file" |
|
13 |
value="org.gvsig.maven.base.build-${build.jar.version}.jar" /> |
|
14 |
|
|
15 |
<target name="check-maven-base-build-available"> |
|
16 |
<available file="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" |
|
17 |
property="maven-base-build-available"/> |
|
18 |
</target> |
|
19 |
|
|
20 |
<target name="get-maven-base-build-local" |
|
21 |
depends="check-maven-base-build-available" |
|
22 |
if="maven-base-build-available"> |
|
23 |
<!-- Unzip de build jar file from the maven repository into the workspace root folder --> |
|
24 |
<unzip src="${user.home}/.m2/repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" |
|
25 |
dest="${workspace.basedir}"> |
|
26 |
<patternset> |
|
27 |
<exclude name="META-INF/**"/> |
|
28 |
</patternset> |
|
29 |
</unzip> |
|
30 |
</target> |
|
31 |
|
|
32 |
<target name="get-maven-base-build-remote" |
|
33 |
depends="check-maven-base-build-available" |
|
34 |
unless="maven-base-build-available"> |
|
35 |
<!-- Download the build jar file --> |
|
36 |
<get src="http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/maven-repository/org/gvsig/org.gvsig.maven.base.build/${build.jar.version}/${build.jar.file}" |
|
37 |
dest="target/${build.jar.file}" |
|
38 |
verbose="true"/> |
|
39 |
|
|
40 |
<!-- Unzip de build jar file into the workspace root folder --> |
|
41 |
<unzip src="target/${build.jar.file}" |
|
42 |
dest="${workspace.basedir}"> |
|
43 |
<patternset> |
|
44 |
<exclude name="META-INF/**"/> |
|
45 |
</patternset> |
|
46 |
</unzip> |
|
47 |
</target> |
|
48 |
|
|
49 |
<target name="prepare-workspace" depends="get-maven-base-build-local,get-maven-base-build-remote"> |
|
50 |
|
|
51 |
<mkdir dir="target"/> |
|
52 |
|
|
53 |
<chmod dir="${build.basedir}/maven/bin" perm="u+x" includes="m2,mvn,mvnDebug"/> |
|
54 |
|
|
55 |
<!-- Copy the maven launchers to the workspace metadata folder --> |
|
56 |
<copy todir="${workspace.basedir}/.metadata"> |
|
57 |
<fileset dir="${build.basedir}/eclipse-launchers"/> |
|
58 |
</copy> |
|
59 |
|
|
60 |
<!-- Configure the eclipse workspace --> |
|
61 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-configure-eclipse-workspace"/> |
|
62 |
|
|
63 |
<!-- Configure the gvSIG profile --> |
|
64 |
<ant antfile="${build.basedir}/check-gvsig-profile.xml" target="initialize"/> |
|
65 |
|
|
66 |
<!-- Compile, install and generate eclipse projects --> |
|
67 |
<ant antfile="${build.basedir}/maven-goals.xml" target="mvn-install-and-eclipse-eclipse"/> |
|
68 |
|
|
69 |
<echo>INFORMATION!!!</echo> |
|
70 |
<echo>Restart eclipse and then proceed to import the subprojects contained into the main project</echo> |
|
71 |
|
|
72 |
<!-- TODO: copiar al proyecto de configuraciĆ³n general --> |
|
73 |
</target> |
|
74 |
|
|
75 |
<target name="clean"> |
|
76 |
<delete dir="target"/> |
|
77 |
</target> |
|
78 |
|
|
79 |
</project> |
|
0 | 80 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
|
|
3 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
<modelVersion>4.0.0</modelVersion> |
|
6 |
<groupId>org.gvsig</groupId> |
|
7 |
<artifactId>org.gvsig.symbology</artifactId> |
|
8 |
<packaging>pom</packaging> |
|
9 |
<version>2.0.0-SNAPSHOT</version> |
|
10 |
<name>org.gvsig.symbology</name> |
|
11 |
<description>Symbology example project</description> |
|
12 |
<url>http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/docs/reference/org.gvsig.symbology/${project.version}/basic/org.gvsig.symbology</url> |
|
13 |
<parent> |
|
14 |
<groupId>org.gvsig</groupId> |
|
15 |
<artifactId>gvsig-base-library-pom</artifactId> |
|
16 |
<version>2.0-SNAPSHOT</version> |
|
17 |
</parent> |
|
18 |
|
|
19 |
<scm> |
|
20 |
<connection>scm:svn:https://svn.forge.osor.eu/svn/gvsig-symbology/org.gvsig.symbology/library/trunk</connection> |
|
21 |
<developerConnection>scm:svn:https://svn.forge.osor.eu/svn/gvsig-symbology/org.gvsig.symbology/library/trunk</developerConnection> |
|
22 |
<url>https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.symbology/library/trunk/?root=gvsig-symbology</url> |
|
23 |
</scm> |
|
24 |
|
|
25 |
<developers> |
|
26 |
<developer> |
|
27 |
<id>jjdelcerro</id> |
|
28 |
<name>Joaqu?n Jos? del Cerro</name> |
|
29 |
<email>jjdelcerro@gvsig.org</email> |
|
30 |
<roles> |
|
31 |
<role>Architect</role> |
|
32 |
<role>Developer</role> |
|
33 |
</roles> |
|
34 |
</developer> |
|
35 |
<developer> |
|
36 |
<id>jbadia</id> |
|
37 |
<name>Jos? Bad?a</name> |
|
38 |
<email>badia_jos@gva.es</email> |
|
39 |
<roles> |
|
40 |
<role>Developer</role> |
|
41 |
</roles> |
|
42 |
</developer> |
|
43 |
</developers> |
|
44 |
|
|
45 |
<distributionManagement> |
|
46 |
<site> |
|
47 |
<id>gvsig-repository</id> |
|
48 |
<url>scp://shell.forge.osor.eu/home/groups/gvsig-desktop/www/downloads/pub/projects/gvSIG-desktop/docs/reference/org.gvsig.symbology/${project.version}/basic/org.gvsig.symbology</url> |
|
49 |
</site> |
|
50 |
</distributionManagement> |
|
51 |
<repositories> |
|
52 |
<repository> |
|
53 |
<id>gvsig-public-http-repository</id> |
|
54 |
<name>gvSIG maven public HTTP repository</name> |
|
55 |
<url>http://gvsig-desktop.forge.osor.eu/downloads/pub/projects/gvSIG-desktop/maven-repository</url> |
|
56 |
<releases> |
|
57 |
<enabled>true</enabled> |
|
58 |
<updatePolicy>daily</updatePolicy> |
|
59 |
<checksumPolicy>warn</checksumPolicy> |
|
60 |
</releases> |
|
61 |
<snapshots> |
|
62 |
<enabled>true</enabled> |
|
63 |
<updatePolicy>daily</updatePolicy> |
|
64 |
<checksumPolicy>warn</checksumPolicy> |
|
65 |
</snapshots> |
|
66 |
</repository> |
|
67 |
</repositories> |
|
68 |
<build> |
|
69 |
<plugins> |
|
70 |
<plugin> |
|
71 |
<groupId>org.apache.maven.plugins</groupId> |
|
72 |
<artifactId>maven-release-plugin</artifactId> |
|
73 |
<configuration> |
|
74 |
<tagBase>https://svn.forge.osor.eu/svn/gvsig-symbology/org.gvsig.symbology/library/tags</tagBase> |
|
75 |
</configuration> |
|
76 |
</plugin> |
|
77 |
</plugins> |
|
78 |
</build> |
|
79 |
|
|
80 |
<dependencies> |
|
81 |
<dependency> |
|
82 |
<groupId>org.gvsig</groupId> |
|
83 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
84 |
<scope>compile</scope> |
|
85 |
</dependency> |
|
86 |
<dependency> |
|
87 |
<groupId>org.gvsig</groupId> |
|
88 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
89 |
<type>test-jar</type> |
|
90 |
</dependency> |
|
91 |
</dependencies> |
|
92 |
|
|
93 |
<modules> |
|
94 |
<module>org.gvsig.symbology.lib</module> |
|
95 |
<module>org.gvsig.symbology.swing</module> |
|
96 |
<module>org.gvsig.symbology.main</module> |
|
97 |
</modules> |
|
98 |
<properties> |
|
99 |
<build-dir>${basedir}/../build</build-dir> |
|
100 |
</properties> |
|
101 |
</project> |
|
0 | 102 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/README.txt | ||
---|---|---|
1 |
The first time you checkout the current project to a new workspace, |
|
2 |
you have to prepare it to be able to work easily with maven from |
|
3 |
eclipse itself. |
|
4 |
|
|
5 |
Perform the following steps: |
|
6 |
|
|
7 |
1.- Launch the *prepare-workspace.xml* ant build file. |
|
8 |
You can do it by loading the file into the ant view, |
|
9 |
and running the default task, or right-clicking the |
|
10 |
file from the package explorer or the navigator and |
|
11 |
select the option: *Run as > Ant build*. |
|
12 |
|
|
13 |
2.- Restart eclipse. |
|
14 |
|
|
15 |
3.- Import the subprojects of the project you have just checked out. |
|
16 |
|
|
17 |
Those steps are only needed once per workspace. |
|
18 |
|
|
0 | 19 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.main/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.symbology.main</artifactId> |
|
6 |
<packaging>jar</packaging> |
|
7 |
<name>org.gvsig.symbology.main</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.symbology</artifactId> |
|
11 |
<version>2.0.0-SNAPSHOT</version> |
|
12 |
</parent> |
|
13 |
<dependencies> |
|
14 |
<dependency> |
|
15 |
<groupId>org.gvsig</groupId> |
|
16 |
<artifactId>org.gvsig.symbology.lib.api</artifactId> |
|
17 |
<version>2.0.0-SNAPSHOT</version> |
|
18 |
<scope>compile</scope> |
|
19 |
</dependency> |
|
20 |
<dependency> |
|
21 |
<groupId>org.gvsig</groupId> |
|
22 |
<artifactId>org.gvsig.symbology.lib.impl</artifactId> |
|
23 |
<version>2.0.0-SNAPSHOT</version> |
|
24 |
<scope>runtime</scope> |
|
25 |
</dependency> |
|
26 |
<dependency> |
|
27 |
<groupId>org.gvsig</groupId> |
|
28 |
<artifactId>org.gvsig.symbology.swing.api</artifactId> |
|
29 |
<version>2.0.0-SNAPSHOT</version> |
|
30 |
<scope>compile</scope> |
|
31 |
</dependency> |
|
32 |
<dependency> |
|
33 |
<groupId>org.gvsig</groupId> |
|
34 |
<artifactId>org.gvsig.symbology.swing.impl</artifactId> |
|
35 |
<version>2.0.0-SNAPSHOT</version> |
|
36 |
<scope>runtime</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.slf4j</groupId> |
|
40 |
<artifactId>slf4j-api</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
</dependencies> |
|
44 |
<properties> |
|
45 |
<build-dir>${basedir}/../../build</build-dir> |
|
46 |
</properties> |
|
47 |
|
|
48 |
</project> |
|
0 | 49 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your classes. |
|
2 |
|
|
3 |
This folder is added to the classpath, so you can load any resources |
|
4 |
through the ClassLoader. |
|
5 |
|
|
6 |
By default, in this folder you can find an example of log4j configuration, |
|
7 |
prepared to log messages through the console, so logging works when you |
|
8 |
run your classes. |
|
0 | 9 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
3 |
|
|
4 |
<!-- |
|
5 |
Log4J configuration file for unit tests execution. |
|
6 |
--> |
|
7 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
8 |
|
|
9 |
<!-- Appender configuration to show logging messages through the console --> |
|
10 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
11 |
<layout class="org.apache.log4j.PatternLayout"> |
|
12 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
13 |
</layout> |
|
14 |
</appender> |
|
15 |
|
|
16 |
<!-- |
|
17 |
Activate logging messages of DEBUG level of higher only for the |
|
18 |
org.gvsig.tools packages. |
|
19 |
You can put full classes names or packages instead, to configure |
|
20 |
logging for all the classes and subpackages of the package. |
|
21 |
--> |
|
22 |
<category name="org.gvsig.tools"> |
|
23 |
<priority value="DEBUG" /> |
|
24 |
</category> |
|
25 |
<category name="org.gvsig.symbology"> |
|
26 |
<priority value="DEBUG" /> |
|
27 |
</category> |
|
28 |
|
|
29 |
<!-- |
|
30 |
By default, show only logging messages of INFO level or higher, |
|
31 |
through the previously configured CONSOLE appender. |
|
32 |
--> |
|
33 |
<root> |
|
34 |
<priority value="INFO" /> |
|
35 |
<appender-ref ref="CONSOLE" /> |
|
36 |
</root> |
|
37 |
</log4j:configuration> |
|
0 | 38 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/java/org/gvsig/symbology/main/package.html | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|
4 |
<head> |
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
|
6 |
<title>org.gvsig.symbology package documentation</title> |
|
7 |
</head> |
|
8 |
<body> |
|
9 |
|
|
10 |
<p>Symbology library testing and demo application.</p> |
|
11 |
|
|
12 |
</body> |
|
13 |
</html> |
|
0 | 14 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.main/src/main/java/org/gvsig/symbology/main/Main.java | ||
---|---|---|
1 |
/* gvSIG. Geographic Information System of the Valencian Government |
|
2 |
* |
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department |
|
4 |
* of the Valencian Government (CIT) |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License |
|
8 |
* as published by the Free Software Foundation; either version 2 |
|
9 |
* of the License, or (at your option) any later version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 |
* GNU General Public License for more details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
20 |
* |
|
21 |
*/ |
|
22 |
package org.gvsig.symbology.main; |
|
23 |
|
|
24 |
import java.awt.BorderLayout; |
|
25 |
import java.awt.Dimension; |
|
26 |
import java.awt.event.ActionEvent; |
|
27 |
|
|
28 |
import javax.swing.AbstractAction; |
|
29 |
import javax.swing.Action; |
|
30 |
import javax.swing.JButton; |
|
31 |
import javax.swing.JFrame; |
|
32 |
import javax.swing.JMenu; |
|
33 |
import javax.swing.JMenuBar; |
|
34 |
import javax.swing.JMenuItem; |
|
35 |
import javax.swing.JToolBar; |
|
36 |
import javax.swing.WindowConstants; |
|
37 |
|
|
38 |
import org.gvsig.symbology.SymbologyLocator; |
|
39 |
import org.gvsig.symbology.SymbologyManager; |
|
40 |
import org.gvsig.symbology.swing.SymbologySwingLocator; |
|
41 |
import org.gvsig.symbology.swing.SymbologySwingManager; |
|
42 |
import org.gvsig.tools.library.impl.DefaultLibrariesInitializer; |
|
43 |
import org.slf4j.Logger; |
|
44 |
import org.slf4j.LoggerFactory; |
|
45 |
|
|
46 |
/** |
|
47 |
* Main executable class for testing the Symbology library. |
|
48 |
* |
|
49 |
* @author gvSIG Team |
|
50 |
* @version $Id$ |
|
51 |
*/ |
|
52 |
public class Main { |
|
53 |
|
|
54 |
private static final Logger LOG = LoggerFactory.getLogger(Main.class); |
|
55 |
|
|
56 |
private SymbologyManager manager; |
|
57 |
private SymbologySwingManager swingManager; |
|
58 |
|
|
59 |
public static void main(String args[]) { |
|
60 |
new DefaultLibrariesInitializer().fullInitialize(); |
|
61 |
Main main = new Main(); |
|
62 |
main.show(); |
|
63 |
} |
|
64 |
|
|
65 |
@SuppressWarnings("serial") |
|
66 |
public void show() { |
|
67 |
manager = SymbologyLocator.getSymbologyManager(); |
|
68 |
swingManager = SymbologySwingLocator.getSwingManager(); |
|
69 |
|
|
70 |
Action showCookie = new AbstractAction("Get a Symbology") { |
|
71 |
|
|
72 |
public void actionPerformed(ActionEvent e) { |
|
73 |
showSymbology(manager); |
|
74 |
} |
|
75 |
}; |
|
76 |
|
|
77 |
Action exit = new AbstractAction("Exit") { |
|
78 |
|
|
79 |
public void actionPerformed(ActionEvent e) { |
|
80 |
System.exit(0); |
|
81 |
} |
|
82 |
}; |
|
83 |
|
|
84 |
JFrame frame = new JFrame("Symbology example app"); |
|
85 |
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); |
|
86 |
|
|
87 |
// Create the menu bar. |
|
88 |
JMenuBar menuBar = new JMenuBar(); |
|
89 |
|
|
90 |
// Build the menu. |
|
91 |
JMenu menuFile = new JMenu("File"); |
|
92 |
menuFile.add(new JMenuItem(showCookie)); |
|
93 |
menuFile.add(new JMenuItem(exit)); |
|
94 |
|
|
95 |
menuBar.add(menuFile); |
|
96 |
|
|
97 |
JToolBar toolBar = new JToolBar(); |
|
98 |
toolBar.add(new JButton(showCookie)); |
|
99 |
toolBar.add(new JButton(exit)); |
|
100 |
|
|
101 |
frame.setPreferredSize(new Dimension(200, 100)); |
|
102 |
frame.setJMenuBar(menuBar); |
|
103 |
frame.add(toolBar, BorderLayout.PAGE_START); |
|
104 |
|
|
105 |
// Display the window. |
|
106 |
frame.pack(); |
|
107 |
frame.setVisible(true); |
|
108 |
} |
|
109 |
|
|
110 |
public void showSymbology(SymbologyManager manager) { |
|
111 |
// try { |
|
112 |
// SymbologyService service = |
|
113 |
// (SymbologyService) manager.getSymbologyService(); |
|
114 |
// JSymbologyServicePanel panel = |
|
115 |
// swingManager.createSymbology(service); |
|
116 |
// swingManager.getWindowManager().showWindow(panel, "Symbology", |
|
117 |
// SymbologyWindowManager.MODE_WINDOW); |
|
118 |
// |
|
119 |
// } catch (ServiceException e) { |
|
120 |
// LOG.error("Error showing a Symbology", e); |
|
121 |
// } |
|
122 |
} |
|
123 |
|
|
124 |
} |
|
0 | 125 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
3 |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
|
4 |
http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
5 |
|
|
6 |
<modelVersion>4.0.0</modelVersion> |
|
7 |
<artifactId>org.gvsig.symbology.lib</artifactId> |
|
8 |
<packaging>pom</packaging> |
|
9 |
<name>org.gvsig.symbology.lib</name> |
|
10 |
<parent> |
|
11 |
<groupId>org.gvsig</groupId> |
|
12 |
<artifactId>org.gvsig.symbology</artifactId> |
|
13 |
<version>2.0.0-SNAPSHOT</version> |
|
14 |
</parent> |
|
15 |
|
|
16 |
<modules> |
|
17 |
<module>org.gvsig.symbology.lib.api</module> |
|
18 |
<module>org.gvsig.symbology.lib.impl</module> |
|
19 |
</modules> |
|
20 |
|
|
21 |
<properties> |
|
22 |
<build-dir>${basedir}/../../build</build-dir> |
|
23 |
</properties> |
|
24 |
|
|
25 |
</project> |
|
0 | 26 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/resources/README.txt | ||
---|---|---|
1 |
Put into this folder the resources needed by your test classes. |
|
2 |
|
|
3 |
This folder is added to the Tests classpath, so you can load any resources |
|
4 |
through the ClassLoader. |
|
5 |
|
|
6 |
By default, in this folder you can find an example of log4j configuration, |
|
7 |
prepared to log messages through the console, so logging works when you |
|
8 |
run your tests classes. |
|
0 | 9 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/resources/log4j.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
|
2 |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> |
|
3 |
|
|
4 |
<!-- |
|
5 |
Log4J configuration file for unit tests execution. |
|
6 |
--> |
|
7 |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> |
|
8 |
|
|
9 |
<!-- Appender configuration to show logging messages through the console --> |
|
10 |
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> |
|
11 |
<layout class="org.apache.log4j.PatternLayout"> |
|
12 |
<param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{2}.%M()]\n %m%n" /> |
|
13 |
</layout> |
|
14 |
</appender> |
|
15 |
|
|
16 |
<!-- |
|
17 |
Activate logging messages of DEBUG level of higher only for the |
|
18 |
org.gvsig.tools packages. |
|
19 |
You can put full classes names or packages instead, to configure |
|
20 |
logging for all the classes and subpackages of the package. |
|
21 |
--> |
|
22 |
<category name="org.gvsig.tools"> |
|
23 |
<priority value="DEBUG" /> |
|
24 |
</category> |
|
25 |
<category name="org.gvsig.symbology"> |
|
26 |
<priority value="DEBUG" /> |
|
27 |
</category> |
|
28 |
|
|
29 |
<!-- |
|
30 |
By default, show only logging messages of INFO level or higher, |
|
31 |
through the previously configured CONSOLE appender. |
|
32 |
--> |
|
33 |
<root> |
|
34 |
<priority value="INFO" /> |
|
35 |
<appender-ref ref="CONSOLE" /> |
|
36 |
</root> |
|
37 |
</log4j:configuration> |
|
0 | 38 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/AllTests.java | ||
---|---|---|
1 |
package org.gvsig.symbology.fmap.mapcontext.rendering; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
|
|
5 |
import junit.framework.Test; |
|
6 |
import junit.framework.TestCase; |
|
7 |
import junit.framework.TestSuite; |
|
8 |
|
|
9 |
import org.cresques.cts.IProjection; |
|
10 |
import org.gvsig.fmap.crs.CRSFactory; |
|
11 |
import org.gvsig.fmap.mapcontext.MapContext; |
|
12 |
import org.gvsig.fmap.mapcontext.ViewPort; |
|
13 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
|
14 |
import org.gvsig.fmap.mapcontext.layers.FLayer; |
|
15 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawFills; |
|
16 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawLines; |
|
17 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestDrawMarkers; |
|
18 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestISymbol; |
|
19 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestMultiLayerSymbol; |
|
20 |
|
|
21 |
public class AllTests extends TestCase{ |
|
22 |
/** |
|
23 |
* The EPSG:4326 projection |
|
24 |
*/ |
|
25 |
public static IProjection TEST_DEFAULT_PROJECTION = |
|
26 |
CRSFactory.getCRS("EPSG:4326"); |
|
27 |
|
|
28 |
/** |
|
29 |
* The EPSG:23030 projection |
|
30 |
*/ |
|
31 |
public static IProjection TEST_DEFAULT_MERCATOR_PROJECTION = |
|
32 |
CRSFactory.getCRS("EPSG:23030"); |
|
33 |
|
|
34 |
/** |
|
35 |
* The EPSG:23029 projection |
|
36 |
*/ |
|
37 |
public static IProjection test_newProjection = |
|
38 |
CRSFactory.getCRS("EPSG:23029"); |
|
39 |
|
|
40 |
public static Test suite() { |
|
41 |
TestSuite suite = new TestSuite("Test for com.iver.cit.gvsig.fmap"); |
|
42 |
//$JUnit-BEGIN$ |
|
43 |
|
|
44 |
|
|
45 |
// /* Symbols (jaume) */ |
|
46 |
// // integration tests |
|
47 |
// // ISymbol |
|
48 |
// suite.addTestSuite(TestISymbol.class); |
|
49 |
// suite.addTestSuite(TestMultiLayerSymbol.class); |
|
50 |
// |
|
51 |
// // CartographicSupport |
|
52 |
// suite.addTestSuite(TestCartographicSupportForSymbol.class); |
|
53 |
// |
|
54 |
// // |
|
55 |
// /* |
|
56 |
// * Feature iterators |
|
57 |
// * */ |
|
58 |
//// suite.addTestSuite(FeatureIteratorTest.class); |
|
59 |
// |
|
60 |
// /* |
|
61 |
// * Other Tests present in FMap (cesar) |
|
62 |
// * Remove them from here and the src-test dir if they are not |
|
63 |
// * useful anymore. |
|
64 |
// */ |
|
65 |
// |
|
66 |
//// suite.addTestSuite(TestAbstractIntervalLegend.class); |
|
67 |
// suite.addTestSuite(TestCartographicSupportForSymbol.class); |
|
68 |
// suite.addTestSuite(TestDrawFills.class); |
|
69 |
// suite.addTestSuite(TestDrawLines.class); |
|
70 |
// suite.addTestSuite(TestDrawMarkers.class); |
|
71 |
//// suite.addTestSuite(TestIClassifiedLegend.class); |
|
72 |
//// suite.addTestSuite(TestILegend.class); |
|
73 |
// suite.addTestSuite(TestMultiLayerSymbol.class); |
|
74 |
|
|
75 |
//$JUnit-END$ |
|
76 |
return suite; |
|
77 |
} |
|
78 |
|
|
79 |
//// jaume |
|
80 |
//// PASTED FROM FeatureIteratorTest.java to be globally accessible |
|
81 |
static final String fwAndamiDriverPath = "../_fwAndami/gvSIG/extensiones/com.iver.cit.gvsig/drivers"; |
|
82 |
private static File baseDataPath; |
|
83 |
private static File baseDriversPath; |
|
84 |
|
|
85 |
|
|
86 |
public static void setUpDrivers() { |
|
87 |
// try { |
|
88 |
// URL url = AllTests.class.getResource("testdata"); |
|
89 |
// if (url == null) |
|
90 |
// throw new Exception("No se encuentra el directorio con datos de prueba"); |
|
91 |
// |
|
92 |
// baseDataPath = new File(url.getFile()); |
|
93 |
// if (!baseDataPath.exists()) |
|
94 |
// throw new Exception("No se encuentra el directorio con datos de prueba"); |
|
95 |
// |
|
96 |
// baseDriversPath = new File(fwAndamiDriverPath); |
|
97 |
// if (!baseDriversPath.exists()) |
|
98 |
// throw new Exception("Can't find drivers path: " + fwAndamiDriverPath); |
|
99 |
// |
|
100 |
// LayerFactory.setDriversPath(baseDriversPath.getAbsolutePath()); |
|
101 |
// if (LayerFactory.getDM().getDriverNames().length < 1) |
|
102 |
// throw new Exception("Can't find drivers in path: " + fwAndamiDriverPath); |
|
103 |
// } catch (Exception e) { |
|
104 |
// throw new RuntimeException(e); |
|
105 |
// } |
|
106 |
} |
|
107 |
|
|
108 |
public static FLayer newLayer(String fileName, |
|
109 |
String driverName) |
|
110 |
throws LoadLayerException { |
|
111 |
// File file = new File(baseDataPath, fileName); |
|
112 |
// return LayerFactory.createLayer(fileName, |
|
113 |
// driverName, |
|
114 |
// file, TEST_DEFAULT_MERCATOR_PROJECTION); |
|
115 |
return null; |
|
116 |
} |
|
117 |
|
|
118 |
public static MapContext newMapContext(IProjection projection) { |
|
119 |
ViewPort vp = new ViewPort(projection); |
|
120 |
return new MapContext(vp); |
|
121 |
} |
|
122 |
|
|
123 |
//// end past |
|
124 |
} |
|
0 | 125 |
tags/v2_0_0_Build_2025/libraries/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestAbstractIntervalLegend.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2004 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 |
package org.gvsig.symbology.fmap.mapcontext.rendering.legend; |
|
42 |
|
|
43 |
import java.awt.Dimension; |
|
44 |
import java.awt.Rectangle; |
|
45 |
import java.util.ArrayList; |
|
46 |
import java.util.Hashtable; |
|
47 |
import java.util.Iterator; |
|
48 |
import java.util.List; |
|
49 |
import java.util.Set; |
|
50 |
|
|
51 |
import org.cresques.cts.IProjection; |
|
52 |
import org.gvsig.fmap.dal.DataQuery; |
|
53 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
54 |
import org.gvsig.fmap.dal.DataServerExplorerParameters; |
|
55 |
import org.gvsig.fmap.dal.DataSet; |
|
56 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
57 |
import org.gvsig.fmap.dal.exception.DataException; |
|
58 |
import org.gvsig.fmap.dal.exception.ReadException; |
|
59 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
60 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
|
61 |
import org.gvsig.fmap.dal.feature.Feature; |
|
62 |
import org.gvsig.fmap.dal.feature.FeatureCache; |
|
63 |
import org.gvsig.fmap.dal.feature.FeatureIndex; |
|
64 |
import org.gvsig.fmap.dal.feature.FeatureIndexes; |
|
65 |
import org.gvsig.fmap.dal.feature.FeatureLocks; |
|
66 |
import org.gvsig.fmap.dal.feature.FeatureQuery; |
|
67 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
68 |
import org.gvsig.fmap.dal.feature.FeatureSelection; |
|
69 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
70 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
71 |
import org.gvsig.fmap.dal.feature.FeatureStoreTransforms; |
|
72 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
73 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
74 |
import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException; |
|
75 |
import org.gvsig.fmap.geom.GeometryLocator; |
|
76 |
import org.gvsig.fmap.geom.GeometryManager; |
|
77 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
|
78 |
import org.gvsig.fmap.geom.Geometry.TYPES; |
|
79 |
import org.gvsig.fmap.geom.primitive.Curve; |
|
80 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
81 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
|
82 |
import org.gvsig.fmap.mapcontext.rendering.legend.IClassifiedVectorLegend; |
|
83 |
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend; |
|
84 |
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol; |
|
85 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.AbstractIntervalLegend; |
|
86 |
import org.gvsig.symbology.fmap.mapcontext.rendering.legend.impl.FInterval; |
|
87 |
import org.gvsig.symbology.fmap.mapcontext.rendering.symbol.TestISymbol; |
|
88 |
import org.gvsig.tools.dynobject.DynClass; |
|
89 |
import org.gvsig.tools.dynobject.DynObject; |
|
90 |
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException; |
|
91 |
import org.gvsig.tools.dynobject.exception.DynMethodException; |
|
92 |
import org.gvsig.tools.exception.BaseException; |
|
93 |
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase; |
|
94 |
import org.gvsig.tools.observer.Observer; |
|
95 |
import org.gvsig.tools.persistence.PersistentState; |
|
96 |
import org.gvsig.tools.persistence.exception.PersistenceException; |
|
97 |
import org.gvsig.tools.undo.RedoException; |
|
98 |
import org.gvsig.tools.undo.UndoException; |
|
99 |
import org.gvsig.tools.visitor.Visitor; |
|
100 |
|
|
101 |
/** |
|
102 |
* Integration test to ensure that the legends which implements the |
|
103 |
* IVectorialIntervalLegend interface follow the rules that follow the managing |
|
104 |
* of them by the application. |
|
105 |
* |
|
106 |
* @author pepe vidal salvador - jose.vidal.salvador@iver.es |
|
107 |
*/ |
|
108 |
public class TestAbstractIntervalLegend extends AbstractLibraryAutoInitTestCase { |
|
109 |
|
|
110 |
private static final Integer v0 = new Integer(0); |
|
111 |
private static final Integer v1 = new Integer(1); |
|
112 |
private static final Integer v2 = new Integer(2); |
|
113 |
private static final Integer v3 = new Integer(3); |
|
114 |
|
|
115 |
private static final String FIELD3 = "field3"; |
|
116 |
private static final String FIELD2 = "field2"; |
|
117 |
private static final String FIELD1 = "field1"; |
|
118 |
private static final String FIELD0 = "field0"; |
|
119 |
private static final int FIELDID = 0; |
|
120 |
|
|
121 |
private static final Integer[] feature0Values = new Integer[] { v0, v1, v2, v3, }; |
|
122 |
private static final Integer[] feature1Values = new Integer[] { v3, v0, v1, v2, }; |
|
123 |
private static final Integer[] feature2Values = new Integer[] { v2, v3, v0, v1, }; |
|
124 |
private static final Integer[] feature3Values = new Integer[] { v1, v2, v3, v0, }; |
|
125 |
|
|
126 |
private static final Integer[][] featureValues = new Integer[][] { |
|
127 |
feature0Values, |
|
128 |
feature1Values, |
|
129 |
feature2Values, |
|
130 |
feature3Values,}; |
|
131 |
|
|
132 |
private static String[] fieldNames = new String[] {FIELD0,FIELD1,FIELD2,FIELD3,}; |
|
133 |
|
|
134 |
|
|
135 |
// private static final Value v4 = (Value)ValueFactory.createValue(4); |
|
136 |
// private static final Value v5 = (Value)ValueFactory.createValue(5); |
|
137 |
// private static final Value v6 = (Value)ValueFactory.createValue(6); |
|
138 |
// private static final Value v7 = (Value)ValueFactory.createValue(7); |
|
139 |
// private static final Value v8 = (Value)ValueFactory.createValue(8); |
|
140 |
// private static final Value v9 = (Value)ValueFactory.createValue(9); |
|
141 |
|
|
142 |
private AbstractIntervalLegend[] intervalLegends; |
|
143 |
private MockDataSource mockDataSource = new MockDataSource(); |
|
144 |
|
|
145 |
/** |
|
146 |
* To avoid duplicated validation logic in the test a mock object is created |
|
147 |
* to use a DataSource for this test. |
|
148 |
* |
|
149 |
*/ |
|
150 |
private class MockDataSource implements FeatureStore { |
|
151 |
|
|
152 |
public boolean allowWrite() { |
|
153 |
|
|
154 |
return false; |
|
155 |
} |
|
156 |
|
|
157 |
public void beginEditingGroup(String description) |
|
158 |
throws NeedEditingModeException { |
|
159 |
|
|
160 |
|
|
161 |
} |
|
162 |
|
|
163 |
public boolean canWriteGeometry(int gvSIGgeometryType) |
|
164 |
throws DataException { |
|
165 |
|
|
166 |
return false; |
|
167 |
} |
|
168 |
|
|
169 |
public void cancelEditing() throws DataException { |
|
170 |
|
|
171 |
|
|
172 |
} |
|
173 |
|
|
174 |
public FeatureSelection createFeatureSelection() throws DataException { |
|
175 |
|
|
176 |
return null; |
|
177 |
} |
|
178 |
|
|
179 |
public FeatureIndex createIndex(FeatureType featureType, |
|
180 |
String attributeName, String indexName) throws DataException { |
|
181 |
|
|
182 |
return null; |
|
183 |
} |
|
184 |
|
|
185 |
public EditableFeature createNewFeature() throws DataException { |
|
186 |
|
|
187 |
return null; |
|
188 |
} |
|
189 |
|
|
190 |
public EditableFeature createNewFeature(FeatureType type, |
|
191 |
Feature defaultValues) throws DataException { |
|
192 |
|
|
193 |
return null; |
|
194 |
} |
|
195 |
|
|
196 |
public EditableFeature createNewFeature(FeatureType type, |
|
197 |
boolean defaultValues) throws DataException { |
|
198 |
|
|
199 |
return null; |
|
200 |
} |
|
201 |
|
|
202 |
public EditableFeature createNewFeature(boolean defaultValues) |
|
203 |
throws DataException { |
|
204 |
|
|
205 |
return null; |
|
206 |
} |
|
207 |
|
|
208 |
public void delete(Feature feature) throws DataException { |
|
209 |
|
|
210 |
|
|
211 |
} |
|
212 |
|
|
213 |
public void edit() throws DataException { |
|
214 |
|
|
215 |
|
|
216 |
} |
|
217 |
|
|
218 |
public void edit(int mode) throws DataException { |
|
219 |
|
|
220 |
|
|
221 |
} |
|
222 |
|
|
223 |
public void endEditingGroup() throws NeedEditingModeException { |
|
224 |
|
|
225 |
|
|
226 |
} |
|
227 |
|
|
228 |
public void finishEditing() throws DataException { |
|
229 |
|
|
230 |
|
|
231 |
} |
|
232 |
|
|
233 |
public FeatureType getDefaultFeatureType() throws DataException { |
|
234 |
|
|
235 |
return null; |
|
236 |
} |
|
237 |
|
|
238 |
public Envelope getEnvelope() { |
|
239 |
|
|
240 |
return null; |
|
241 |
} |
|
242 |
|
|
243 |
public Feature getFeatureByReference(FeatureReference reference) |
|
244 |
throws DataException { |
|
245 |
|
|
246 |
return null; |
|
247 |
} |
|
248 |
|
|
249 |
public Feature getFeatureByReference(FeatureReference reference, |
|
250 |
FeatureType featureType) throws DataException { |
|
251 |
|
|
252 |
return null; |
|
253 |
} |
|
254 |
|
|
255 |
public FeatureSelection getFeatureSelection() throws DataException { |
|
256 |
|
|
257 |
return null; |
|
258 |
} |
|
259 |
|
|
260 |
public FeatureSet getFeatureSet() throws DataException { |
|
261 |
|
|
262 |
return null; |
|
263 |
} |
|
264 |
|
|
265 |
public FeatureSet getFeatureSet(FeatureQuery featureQuery) |
|
266 |
throws DataException { |
|
267 |
|
|
268 |
return null; |
|
269 |
} |
|
270 |
|
|
271 |
public void getFeatureSet(FeatureQuery featureQuery, Observer observer) |
|
272 |
throws DataException { |
|
273 |
|
|
274 |
|
|
275 |
} |
|
276 |
|
|
277 |
public void getFeatureSet(Observer observer) throws DataException { |
|
278 |
|
|
279 |
|
|
280 |
} |
|
281 |
|
|
282 |
public List getFeatureTypes() throws DataException { |
|
283 |
|
|
284 |
return null; |
|
285 |
} |
|
286 |
|
|
287 |
public FeatureIndexes getIndexes() { |
|
288 |
|
|
289 |
return null; |
|
290 |
} |
|
291 |
|
|
292 |
public FeatureLocks getLocks() throws DataException { |
|
293 |
|
|
294 |
return null; |
|
295 |
} |
|
296 |
|
|
297 |
public DataStoreParameters getParameters() { |
|
298 |
|
|
299 |
return null; |
|
300 |
} |
|
301 |
|
|
302 |
public IProjection getSRSDefaultGeometry() throws DataException { |
|
303 |
|
|
304 |
return null; |
|
305 |
} |
|
306 |
|
|
307 |
public FeatureStoreTransforms getTransforms() { |
|
308 |
|
|
309 |
return null; |
|
310 |
} |
|
311 |
|
|
312 |
public void insert(EditableFeature feature) throws DataException { |
|
313 |
|
|
314 |
|
|
315 |
} |
|
316 |
|
|
317 |
public boolean isAppendModeSupported() { |
|
318 |
|
|
319 |
return false; |
|
320 |
} |
|
321 |
|
|
322 |
public boolean isAppending() { |
|
323 |
|
|
324 |
return false; |
|
325 |
} |
|
326 |
|
|
327 |
public boolean isEditing() { |
|
328 |
|
|
329 |
return false; |
|
330 |
} |
|
331 |
|
|
332 |
public boolean isLocksSupported() { |
|
333 |
|
|
334 |
return false; |
|
335 |
} |
|
336 |
|
|
337 |
|
|
338 |
public void setSelection(FeatureSet selection) throws DataException { |
|
339 |
|
|
340 |
|
|
341 |
} |
|
342 |
public void update(EditableFeatureType featureType) |
|
343 |
throws DataException { |
|
344 |
|
|
345 |
|
|
346 |
} |
|
347 |
|
|
348 |
public void update(EditableFeature feature) throws DataException { |
|
349 |
|
|
350 |
|
|
351 |
} |
|
352 |
|
|
353 |
public void validateFeatures(int mode) throws DataException { |
|
354 |
|
|
355 |
|
|
356 |
} |
|
357 |
|
|
358 |
public DataSet createSelection() throws DataException { |
|
359 |
|
|
360 |
return null; |
|
361 |
} |
|
362 |
|
|
363 |
public void dispose() { |
|
364 |
|
|
365 |
|
|
366 |
} |
|
367 |
|
|
368 |
public Iterator getChildren() { |
|
369 |
|
|
370 |
return null; |
|
371 |
} |
|
372 |
|
|
373 |
public DataSet getDataSet() throws DataException { |
|
374 |
|
|
375 |
return null; |
|
376 |
} |
|
377 |
|
|
378 |
public DataSet getDataSet(DataQuery dataQuery) throws DataException { |
|
379 |
|
|
380 |
return null; |
|
381 |
} |
|
382 |
|
|
383 |
public void getDataSet(Observer observer) throws DataException { |
|
384 |
|
|
385 |
|
|
386 |
} |
|
387 |
|
|
388 |
public void getDataSet(DataQuery dataQuery, Observer observer) |
|
389 |
throws DataException { |
|
390 |
|
|
391 |
|
|
392 |
} |
|
393 |
|
|
394 |
public DataServerExplorer getExplorer() throws DataException { |
|
395 |
|
|
396 |
return null; |
|
397 |
} |
|
398 |
|
|
399 |
public String getName() { |
|
400 |
|
|
401 |
return null; |
|
402 |
} |
|
403 |
|
|
404 |
public DataSet getSelection() throws DataException { |
|
405 |
|
|
406 |
return null; |
|
407 |
} |
|
408 |
|
|
409 |
public void refresh() throws DataException { |
|
410 |
|
|
411 |
|
|
412 |
} |
|
413 |
|
|
414 |
public void setSelection(DataSet selection) throws DataException { |
|
415 |
|
|
416 |
|
|
417 |
} |
|
418 |
|
|
419 |
public void beginComplexNotification() { |
|
420 |
|
|
421 |
|
|
422 |
} |
|
423 |
|
|
424 |
public void disableNotifications() { |
|
425 |
|
|
426 |
|
|
427 |
} |
|
428 |
|
|
429 |
public void enableNotifications() { |
|
430 |
|
|
431 |
|
|
432 |
} |
|
433 |
|
|
434 |
public void endComplexNotification() { |
|
435 |
|
|
436 |
|
|
437 |
} |
|
438 |
|
|
439 |
public void addObserver(Observer o) { |
|
440 |
|
|
441 |
|
|
442 |
} |
|
443 |
|
|
444 |
public void deleteObserver(Observer o) { |
|
445 |
|
|
446 |
|
|
447 |
} |
|
448 |
|
|
449 |
public void deleteObservers() { |
|
450 |
|
|
451 |
|
|
452 |
} |
|
453 |
|
|
454 |
public void saveToState(PersistentState state) |
|
455 |
throws PersistenceException { |
|
456 |
|
|
457 |
|
|
458 |
} |
|
459 |
|
|
460 |
public void loadFromState(PersistentState state) throws PersistenceException { |
|
461 |
|
|
462 |
|
|
463 |
} |
|
464 |
|
|
465 |
public FeatureQuery createFeatureQuery() { |
|
466 |
|
|
467 |
return null; |
|
468 |
} |
|
469 |
|
|
470 |
public boolean canRedo() { |
|
471 |
|
|
472 |
return false; |
|
473 |
} |
|
474 |
|
|
475 |
public boolean canUndo() { |
|
476 |
|
|
477 |
return false; |
|
478 |
} |
|
479 |
|
|
480 |
public List getRedoInfos() { |
|
481 |
|
|
482 |
return null; |
|
483 |
} |
|
484 |
|
|
485 |
public List getUndoInfos() { |
|
486 |
|
|
487 |
return null; |
|
488 |
} |
|
489 |
|
|
490 |
public void redo() throws RedoException { |
|
491 |
|
|
492 |
|
|
493 |
} |
|
494 |
|
|
495 |
public void redo(int num) throws RedoException { |
|
496 |
|
|
497 |
|
|
498 |
} |
|
499 |
|
|
500 |
public void undo() throws UndoException { |
|
501 |
|
|
502 |
|
|
503 |
} |
|
504 |
|
|
505 |
public void undo(int num) throws UndoException { |
|
506 |
|
|
507 |
|
|
508 |
} |
|
509 |
|
|
510 |
public FeatureIndex createIndex(FeatureType featureType, |
|
511 |
String attributeName, String indexName, Observer observer) |
|
512 |
throws DataException { |
|
513 |
|
|
514 |
return null; |
|
515 |
} |
|
516 |
|
|
517 |
public Object getMetadataID() { |
|
518 |
|
|
519 |
return null; |
|
520 |
} |
|
521 |
|
|
522 |
public void delegate(DynObject dynObject) { |
|
523 |
|
|
524 |
|
|
525 |
} |
|
526 |
|
|
527 |
public DynClass getDynClass() { |
|
528 |
|
|
529 |
return null; |
|
530 |
} |
|
531 |
|
|
532 |
public Object getDynValue(String name) throws DynFieldNotFoundException { |
|
533 |
|
|
534 |
return null; |
|
535 |
} |
|
536 |
|
|
537 |
public boolean hasDynValue(String name) { |
|
538 |
|
|
539 |
return false; |
|
540 |
} |
|
541 |
|
|
542 |
public void implement(DynClass dynClass) { |
|
543 |
|
|
544 |
|
|
545 |
} |
|
546 |
|
|
547 |
public Object invokeDynMethod(String name, DynObject context) |
|
548 |
throws DynMethodException { |
|
549 |
|
|
550 |
return null; |
|
551 |
} |
|
552 |
|
|
553 |
public Object invokeDynMethod(int code, DynObject context) |
|
554 |
throws DynMethodException { |
|
555 |
|
|
556 |
return null; |
|
557 |
} |
|
558 |
|
|
559 |
public void setDynValue(String name, Object value) |
|
560 |
throws DynFieldNotFoundException { |
|
561 |
|
|
562 |
|
|
563 |
} |
|
564 |
|
|
565 |
/* |
|
566 |
* (non-Javadoc) |
|
567 |
* |
|
568 |
* @see org.gvsig.metadata.Metadata#getMetadataChildren() |
|
569 |
*/ |
|
570 |
public Set getMetadataChildren() { |
|
571 |
|
|
572 |
return null; |
|
573 |
} |
|
574 |
|
|
575 |
/* |
|
576 |
* (non-Javadoc) |
|
577 |
* |
|
578 |
* @see org.gvsig.metadata.Metadata#getMetadataName() |
|
579 |
*/ |
|
580 |
public String getMetadataName() { |
|
581 |
|
|
582 |
return null; |
|
583 |
} |
|
584 |
|
|
585 |
public FeatureType getFeatureType(String featureTypeId) |
|
586 |
throws DataException { |
|
587 |
|
|
588 |
return null; |
|
589 |
} |
|
590 |
|
|
591 |
public DataQuery createQuery() { |
|
592 |
|
|
593 |
return null; |
|
594 |
} |
|
595 |
|
|
596 |
public long getFeatureCount() throws DataException { |
|
597 |
|
|
598 |
return 0; |
|
599 |
} |
|
600 |
|
|
601 |
public void accept(Visitor visitor, DataQuery dataQuery) |
|
602 |
throws BaseException { |
|
603 |
} |
|
604 |
|
|
605 |
public void accept(Visitor visitor) throws BaseException { |
|
606 |
} |
|
607 |
|
|
608 |
public void createCache(String name, |
|
609 |
DynObject parameters) throws DataException { |
|
610 |
// Do nothing |
|
611 |
} |
|
612 |
|
|
613 |
public FeatureCache getCache() { |
|
614 |
return null; |
|
615 |
} |
|
616 |
|
|
617 |
public void clear() { |
|
618 |
// Nothing to do |
|
619 |
} |
|
620 |
|
|
621 |
public void export(DataServerExplorer explorer, String provider, |
|
622 |
NewFeatureStoreParameters params) throws DataException { |
|
623 |
// Nothing to do |
|
624 |
} |
|
625 |
|
|
626 |
public String getProviderName() { |
|
627 |
return null; |
|
628 |
} |
|
629 |
|
|
630 |
public String getFullName() { |
|
631 |
// TODO Auto-generated method stub |
|
632 |
return null; |
|
633 |
} |
|
634 |
|
|
635 |
public boolean isKnownEnvelope() { |
|
636 |
// TODO Auto-generated method stub |
|
637 |
return false; |
|
638 |
} |
|
639 |
|
|
640 |
public boolean hasRetrievedFeaturesLimit() { |
|
641 |
// TODO Auto-generated method stub |
|
642 |
return false; |
|
643 |
} |
|
644 |
|
|
645 |
public int getRetrievedFeaturesLimit() { |
|
646 |
// TODO Auto-generated method stub |
|
647 |
return 0; |
|
648 |
} |
|
649 |
|
|
650 |
public FeatureIndex createIndex(String indexTypeName, |
|
651 |
FeatureType featureType, String attributeName, String indexName) |
|
652 |
throws DataException { |
|
653 |
// TODO Auto-generated method stub |
|
654 |
return null; |
|
655 |
} |
|
656 |
|
|
657 |
public FeatureIndex createIndex(String indexTypeName, |
|
658 |
FeatureType featureType, String attributeName, String indexName, |
|
659 |
Observer observer) throws DataException { |
|
660 |
// TODO Auto-generated method stub |
|
661 |
return null; |
|
662 |
} |
|
663 |
} |
|
664 |
|
|
665 |
private static final FInterval interval0=new FInterval(0,2); |
|
666 |
private static final FInterval interval1=new FInterval(3,5); |
|
667 |
private static final FInterval interval2=new FInterval(6,8); |
|
668 |
private static final FInterval interval3=new FInterval(9,11); |
|
669 |
// private static final Value interval4; |
|
670 |
// private static final Value interval5; |
|
671 |
// private static final Value interval6; |
|
672 |
// private static final Value interval7; |
|
673 |
// private static final Value interval8; |
|
674 |
// private static final Value interval9; |
|
675 |
|
|
676 |
Hashtable symTable; |
|
677 |
|
|
678 |
private ISymbol[] symbols; |
|
679 |
private FInterval[] sampleIntervals = new FInterval[] { interval0, interval1, interval2, interval3, }; |
|
680 |
private Feature[] features; |
|
681 |
|
|
682 |
// private FInterval[] intervals = new FInterval[] { |
|
683 |
// interval0, |
|
684 |
// interval1, |
|
685 |
// interval2, |
|
686 |
// interval3, |
|
687 |
// interval4, |
|
688 |
// interval5, |
|
689 |
// interval6, |
|
690 |
// interval7, |
|
691 |
// interval8, |
|
692 |
// interval9, |
|
693 |
// }; |
|
694 |
|
|
695 |
protected void doSetUp() throws Exception { |
|
696 |
features = new Feature[4]; |
|
697 |
|
|
698 |
// initialize test values |
|
699 |
for (int i = 0; i < features.length; i++) { |
|
700 |
|
|
701 |
// create the geometry associated to the feature |
|
702 |
int size = 200; |
|
703 |
Dimension d = new Dimension(size, size); |
|
704 |
Rectangle aShape = new Rectangle(i * size, i * size, d.width, |
|
705 |
d.height); |
|
706 |
GeometryManager geomManager = GeometryLocator.getGeometryManager(); |
|
707 |
Curve curve = (Curve)geomManager.create(TYPES.CURVE, SUBTYPES.GEOM2D); |
|
708 |
curve.setGeneralPath(new GeneralPathX(aShape.getPathIterator(null))); |
|
709 |
|
|
710 |
/* |
|
711 |
* create a full-featured Feature with randomed values at its fields |
|
712 |
* to avoid testing over the same values each time |
|
713 |
*/ |
|
714 |
//TODO |
|
715 |
// features[i] = new MemoryFeature(geom, featureValues[i], "[" + i |
|
716 |
// + "]"); |
|
717 |
} |
|
718 |
|
|
719 |
// initialize the symbol subset for this test |
|
720 |
TestISymbol.addSymbols(); |
Also available in: Unified diff