geomajas-commits Mailing List for Geomajas (Page 875)
Brought to you by:
piedere,
triathlon98
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(188) |
Sep
(327) |
Oct
(169) |
Nov
(259) |
Dec
(244) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(251) |
Feb
(340) |
Mar
(370) |
Apr
(258) |
May
(184) |
Jun
(523) |
Jul
(655) |
Aug
(280) |
Sep
(434) |
Oct
(318) |
Nov
(196) |
Dec
(482) |
| 2011 |
Jan
(1121) |
Feb
(324) |
Mar
(613) |
Apr
(265) |
May
(320) |
Jun
(443) |
Jul
(193) |
Aug
(530) |
Sep
(840) |
Oct
(495) |
Nov
(348) |
Dec
(626) |
| 2012 |
Jan
(1065) |
Feb
(538) |
Mar
(293) |
Apr
(287) |
May
(375) |
Jun
(452) |
Jul
(376) |
Aug
(140) |
Sep
(322) |
Oct
(232) |
Nov
(136) |
Dec
(211) |
| 2013 |
Jan
(534) |
Feb
(442) |
Mar
(560) |
Apr
(277) |
May
(426) |
Jun
(468) |
Jul
(800) |
Aug
(324) |
Sep
(284) |
Oct
(386) |
Nov
(374) |
Dec
(215) |
| 2014 |
Jan
(236) |
Feb
(66) |
Mar
|
Apr
(21) |
May
(31) |
Jun
(40) |
Jul
(340) |
Aug
(41) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(14) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(10) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(13) |
May
|
Jun
(3) |
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sv...@ge...> - 2009-08-26 10:06:37
|
Author: pieterdg Date: 2009-08-26 11:04:58 +0200 (Wed, 26 Aug 2009) New Revision: 3820 Modified: trunk/geomajas/geomajas-dojo-client/pom.xml Log: MAJ-386: Improving the dojo-client build module Modified: trunk/geomajas/geomajas-dojo-client/pom.xml =================================================================== --- trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-26 09:04:07 UTC (rev 3819) +++ trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-26 09:04:58 UTC (rev 3820) @@ -1,4 +1,5 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <parent> <groupId>org.geomajas</groupId> <artifactId>geomajas</artifactId> @@ -8,12 +9,14 @@ <groupId>org.geomajas</groupId> <artifactId>geomajas-dojo-client</artifactId> <packaging>jar</packaging> - <name>Geomajas dojo face, client side</name> - + <name>Geomajas dojo face, client side</name> <build> <plugins> - - <!-- This plugin unzips DOJO from the maven repository into the JS directory --> + + <!-- + This plugin unzips DOJO from the maven repository into the JS + directory + --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> @@ -33,16 +36,14 @@ <type>zip</type> </artifactItem> </artifactItems> - <outputDirectory>${basedir}/src/main/webapp/js</outputDirectory> + <outputDirectory>${basedir}/target/classes/js</outputDirectory> </configuration> </execution> </executions> </plugin> - - - <!-- + <!-- This plugin builds the DOJO + Geomajas javascript --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> @@ -56,28 +57,32 @@ </execution> </executions> <configuration> - <workingDirectory>src/main/javascript/util/buildscripts - </workingDirectory> + <workingDirectory>${basedir}/target/classes/js/util/buildscripts</workingDirectory> <executable>java</executable> <mainClass></mainClass> <arguments> <argument>-jar</argument> <argument>../shrinksafe/custom_rhino.jar</argument> <argument>build.js</argument> - <argument>profile=base</argument> - <argument>releaseDir=../../../../../target/</argument> - <argument>releaseName=classes</argument> + <argument>profileFile=../../../dojo-build/profiles/geomajas.profile.js</argument> + <argument>releaseDir=../../../../../target/release/</argument> <argument>localeList=nl,en</argument> <argument>internStrings=false</argument> <argument>action=clean,release</argument> </arguments> </configuration> </plugin> + + + <!-- + This plugin will create a ZIP file from the built DOJO + Geomajas + directory + --> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> - <descriptor>src/main/assembly/module-source.xml</descriptor> + <descriptor>src/main/assembly.xml</descriptor> </descriptors> </configuration> <executions> @@ -90,7 +95,7 @@ </execution> </executions> </plugin> - --> + </plugins> </build> |
|
From: <sv...@ge...> - 2009-08-26 10:05:47
|
Author: pieterdg Date: 2009-08-26 11:04:07 +0200 (Wed, 26 Aug 2009) New Revision: 3819 Added: trunk/geomajas/geomajas-dojo-client/src/main/resources/ trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/ trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/MANIFEST.MF trunk/geomajas/geomajas-dojo-client/src/main/resources/js/ Removed: trunk/geomajas/geomajas-dojo-client/src/main/resources/js/ Log: MAJ-386: Improving the dojo-client build module Added: trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/MANIFEST.MF =================================================================== --- trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/MANIFEST.MF (rev 0) +++ trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/MANIFEST.MF 2009-08-26 09:04:07 UTC (rev 3819) @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + Property changes on: trunk/geomajas/geomajas-dojo-client/src/main/resources/META-INF/MANIFEST.MF ___________________________________________________________________ Added: svn:mime-type + text/plain |
|
From: <sv...@ge...> - 2009-08-26 08:46:29
|
Author: pieterdg Date: 2009-08-26 09:44:43 +0200 (Wed, 26 Aug 2009) New Revision: 3818 Modified: trunk/geomajas/geomajas-dojo-client/src/main/webapp/js/ Log: Switch from dojo's external SVN, to a zip file from the geosparc svn. No more svn:externals! This will speed up building time. Fix for MAJ-401 Property changes on: trunk/geomajas/geomajas-dojo-client/src/main/webapp/js ___________________________________________________________________ Deleted: svn:externals - dojo http://svn.dojotoolkit.org/src/tags/release-1.1.0/dojo dijit http://svn.dojotoolkit.org/src/tags/release-1.1.0/dijit dojox http://svn.dojotoolkit.org/src/tags/release-1.1.0/dojox util http://svn.dojotoolkit.org/src/tags/release-1.1.0/util |
|
From: <sv...@ge...> - 2009-08-26 08:45:06
|
Author: pieterdg Date: 2009-08-26 09:43:28 +0200 (Wed, 26 Aug 2009) New Revision: 3817 Modified: trunk/geomajas/pom.xml Log: pom change: added logback logging Modified: trunk/geomajas/pom.xml =================================================================== --- trunk/geomajas/pom.xml 2009-08-26 07:41:08 UTC (rev 3816) +++ trunk/geomajas/pom.xml 2009-08-26 07:43:28 UTC (rev 3817) @@ -1,656 +1,661 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.geomajas</groupId> - <artifactId>geomajas</artifactId> - <version>1.5.0-SNAPSHOT</version> - <packaging>pom</packaging> - <name>Geomajas</name> - <description> - Geomajas is a component framework for building rich Internet applications (RIA) with sophisticated capabilities - for the display, analysis and management of geographic information. It is a building block that allows - developers to add maps and other geographic data capabilities to their web applications. - </description> - <url>http://www.geomajas.org/project</url> - - <scm> - <connection>scm:svn:https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</connection> - <developerConnection>scm:svn:https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</developerConnection> - <url>https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</url> - </scm> - <organization> - <name>Geosparc</name> - <url>http://www.geosparc.com</url> - </organization> - <mailingLists> - <mailingList> - <name>DEV</name> - <post>mailto:maj...@ge...</post> - <subscribe>http://lists.geomajas.org/mailman/listinfo/Mmajas-dev</subscribe> - <unsubscribe>http://lists.geomajas.org/mailman/listinfo/majas-dev</unsubscribe> - <archive>http://lists.geomajas.org/pipermail/majas-dev/</archive> - </mailingList> - </mailingLists> - <licenses> - <license> - <name>GNU Affero General Public License, Version 3</name> - <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url> - <distribution>repo</distribution> - </license> - </licenses> - <issueManagement> - <system>JIRA</system> - <url>http://jira.geomajas.org</url> - </issueManagement> - <distributionManagement> - <site> - <id>Geomajas project site</id> - <name>Mapping with Asynchronous Java and SVG</name> - <url>scp://www.majas.dfc.be/var/www/www.majas.dfc.be/htdocs/maven</url> - </site> - </distributionManagement> - <developers> - <developer> - <id>dirkf</id> - <name>dirk.frigne</name> - <email>dir...@ge...</email> - <roles> - <role>CEO</role> - </roles> - </developer> - <developer> - <id>jandm</id> - <name>Jan De Moerlose</name> - <email>jan...@ge...</email> - <roles> - <role>Architect</role> - <role>Lead Developer</role> - </roles> - </developer> - <developer> - <id>pieterdg</id> - <name>Pieter De Graef</name> - <email>pie...@ge...</email> - <roles> - <role>Architect</role> - <role>Lead Developer</role> - </roles> - </developer> - <developer> - <id>joachimvda</id> - <name>Joachim Van der Auwera</name> - <email>jo...@ge...</email> - <roles> - <role>Developer</role> - </roles> - </developer> - </developers> - - <modules> - <module>geomajas-xml-binding</module> - <module>geomajas-api</module> - <module>geomajas-impl</module> - <module>geomajas-dojo-server</module> - <module>geomajas-dojo-client</module> - <module>geomajas-gwt-server</module> - <module>geomajas-gwt-client</module> - <module>layermodels</module> - <module>extensions</module> - </modules> - - <repositories> - <repository> - <id>Geomajas</id> - <name>Geomajas repository</name> - <url>http://maven.geomajas.org</url> - </repository> - <repository> - <id>skynet</id> - <name>Belgian maven archive mirror</name> - <url>http://maven2.mirrors.skynet.be/pub/maven2</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>ibiblio</id> - <name>Ibiblio - the public's library and digital archive</name> - <url>http://www.ibiblio.org/maven2</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>geotools</id> - <name>Geotools repository</name> - <url>http://maven.geotools.fr/repository</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>refractions</id> - <name>Geotools repository</name> - <url>http://lists.refractions.net/m2</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>javanet</id> - <name>Java.net repository</name> - <url>http://download.java.net/maven/2/</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>smartgwt</id> - <url> http://www.smartclient.com/maven2</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - <repository> - <id>jts4gwt</id> - <url>http://jts4gwt.sourceforge.net/maven/repository/</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </repository> - </repositories> - <pluginRepositories> - <pluginRepository> - <id>gegis</id> - <name>gegis repository</name> - <url>http://www.gegis.org/repository</url> - <snapshots> - <enabled>false</enabled> - </snapshots> - </pluginRepository> - <pluginRepository> - <id>gwt-maven</id> - <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url> - </pluginRepository> - </pluginRepositories> - - <build> - <extensions> - <extension> - <groupId>org.apache.maven.wagon</groupId> - <artifactId>wagon-webdav</artifactId> - <version>1.0-beta-2</version> - </extension> - <extension> - <groupId>org.geomajas</groupId> - <artifactId>geomajas-checkstyle</artifactId> - <version>1.0.0</version> - </extension> - </extensions> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <encoding>utf8</encoding> - <source>1.5</source> - <target>1.5</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> - <configuration> - <configLocation>config/geomajas-checkstyle.xml</configLocation> - </configuration> - <executions> - <execution> - <phase>verify</phase> - <goals> - <goal>check</goal> - </goals> - </execution> - </executions> - </plugin> - <!-- make it a Cypal project in Eclipse --> - <!-- - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-eclipse-plugin</artifactId> - <configuration> - <wtpversion>2.0</wtpversion> - <workspace>${basedir}/..</workspace> - <alwaysWritePomProjects>true</alwaysWritePomProjects> - <additionalProjectnatures> - <projectnature>in.cypal.studio.gwt.core.gwtNature</projectnature> - </additionalProjectnatures> - <additionalBuildcommands> - <buildcommand>in.cypal.studio.gwt.core.gwtBuilder</buildcommand> - </additionalBuildcommands> - - <sourceExcludes> - <sourceExclude>org/geomajas/emul/</sourceExclude> - </sourceExcludes> - - <excludes> - <exclude>org/geomajas/emul/</exclude> - </excludes> - - </configuration> - </plugin> - --> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-eclipse-plugin</artifactId> - <version>2.5</version> - <configuration> - <wtpmanifest>true</wtpmanifest> - <wtpapplicationxml>true</wtpapplicationxml> - <wtpversion>2.0</wtpversion> - <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF - </manifest> - <workspace>${basedir}/..</workspace> - <alwaysWritePomProjects>true</alwaysWritePomProjects> - </configuration> - </plugin> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <version>2.3</version> - </plugin> - <plugin> - <artifactId>maven-war-plugin</artifactId> - <version>2.1-alpha-1</version> - <configuration> - <nonFilteredFileExtensions> - <nonFilteredFileExtension>dbf,shp,shx,sbx,sbn</nonFilteredFileExtension> - </nonFilteredFileExtensions> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - <reporting> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-javadoc-plugin</artifactId> - <configuration> - <links> - <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> - </links> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-report-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jxr-plugin</artifactId> - </plugin> - </plugins> - </reporting> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.geomajas</groupId> - <artifactId>geomajas-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.geomajas</groupId> - <artifactId>geomajas-xml-binding</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.geomajas</groupId> - <artifactId>geomajas-impl</artifactId> - <version>${project.version}</version> - </dependency> - - <!-- - <dependency> - <groupId>com.vividsolutions</groupId> - <artifactId>jts</artifactId> - <version>1.10</version> - </dependency> - --> - <dependency> - <groupId>net.sf</groupId> - <artifactId>jts4gwt</artifactId> - <version>1.10.0</version> - </dependency> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0</version> - </dependency> - - <!-- next three dependencies for the Hibernate LayerModel --> - <dependency> - <groupId>org.hibernatespatial</groupId> - <artifactId>hibernate-spatial</artifactId> - <version>1.0-M2</version> - <exclusions> - <exclusion> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.hibernatespatial</groupId> - <artifactId>hibernate-spatial-postgis</artifactId> - <version>1.0-M2</version> - <exclusions> - <exclusion> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-annotations</artifactId> - <version>3.4.0.GA</version> - </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-cglib-repack</artifactId> - <version>2.1_3</version> - </dependency> - - - <!-- override the 1.0 driver that postgis loads --> - <dependency> - <groupId>org.postgis</groupId> - <artifactId>postgis-jdbc</artifactId> - <version>1.1.6</version> - </dependency> - <dependency> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - <version>1.3.03</version> - </dependency> - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.1</version> - </dependency> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> - <version>2.1.3</version> - </dependency> - - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-main</artifactId> - <version>${geotools-version}</version> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-api</artifactId> - <version>${geotools-version}</version> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-epsg-wkt</artifactId> - <version>${geotools-version}</version> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-postgis</artifactId> - <version>${geotools-version}</version> - <exclusions> - <exclusion> - <groupId>org.postgis</groupId> - <artifactId>postgis-driver</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-shapefile</artifactId> - <version>${geotools-version}</version> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-xml</artifactId> - <version>${geotools-version}</version> - </dependency> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-render</artifactId> - <version>${geotools-version}</version> - </dependency> - - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>xalan</groupId> - <artifactId>xalan</artifactId> - <version>2.7.0</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> - <version>2.4</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>c3p0</groupId> - <artifactId>c3p0</artifactId> - <version>0.9.1.2</version> - </dependency> - - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.7.0</version> - </dependency> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.1</version> - </dependency> - <dependency> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - <version>1.7</version> - </dependency> - <dependency> - <groupId>commons-fileupload</groupId> - <artifactId>commons-fileupload</artifactId> - <version>1.0</version> - </dependency> - <dependency> - <groupId>commons-httpclient</groupId> - <artifactId>commons-httpclient</artifactId> - <version>2.0</version> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.1</version> - </dependency> - <dependency> - <groupId>commons-configuration</groupId> - <artifactId>commons-configuration</artifactId> - <version>1.2</version> - </dependency> - - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>1.5.8</version> - </dependency> - - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.8.1</version> - </dependency> - <dependency> - <groupId>commons-el</groupId> - <artifactId>commons-el</artifactId> - <version>1.0</version> - </dependency> - <dependency> - <groupId>com.metaparadigm</groupId> - <artifactId>json-rpc</artifactId> - <version>1.0</version> - </dependency> - <dependency> - <groupId>javax.media</groupId> - <artifactId>jai_core</artifactId> - <version>1.1.3-alpha</version> - </dependency> - <dependency> - <groupId>javax.media</groupId> - <artifactId>jai_codec</artifactId> - <version>1.1.3-alpha</version> - </dependency> - <dependency> - <groupId>javax.media</groupId> - <artifactId>jai_imageio</artifactId> - <version>1.1-alpha</version> - </dependency> - <dependency> - <groupId>com.lowagie</groupId> - <artifactId>itext</artifactId> - <version>2.1.3</version> - </dependency> - <dependency> - <groupId>net.java.dev.weblets</groupId> - <artifactId>weblets-api</artifactId> - <version>1.1</version> - <exclusions> - <exclusion> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>net.java.dev.weblets</groupId> - <artifactId>weblets-impl</artifactId> - <version>1.1</version> - <exclusions> - <exclusion> - <groupId>commons-digester</groupId> - <artifactId>commons-digester</artifactId> - </exclusion> - <exclusion> - <groupId>commons-logging</groupId> - <artifactId>commons-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-servlet</artifactId> - <version>${gwt-version}</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${gwt-version}</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwt-version}</version> - <classifier>${platform}-libs</classifier> - <type>zip</type> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwt-version}</version> - <classifier>${platform}</classifier> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>com.smartgwt</groupId> - <artifactId>smartgwt</artifactId> - <version>${smartgwt-version}</version> - </dependency> - <dependency> - <groupId>com.smartgwt</groupId> - <artifactId>smartgwt-skins</artifactId> - <version>${smartgwt-version}</version> - </dependency> - - <dependency> - <groupId>com.thoughtworks.xstream</groupId> - <artifactId>xstream</artifactId> - <version>1.3.1</version> - </dependency> - </dependencies> - </dependencyManagement> - - <!-- profiles (with activation per platform) --> - <profiles> - <profile> - <id>gwt-dev-windows</id> - <properties> - <platform>windows</platform> - </properties> - <activation> - <activeByDefault>true</activeByDefault> - <os> - <family>windows</family> - </os> - </activation> - </profile> - <profile> - <id>gwt-dev-mac</id> - <properties> - <platform>mac</platform> - </properties> - <activation> - <activeByDefault>false</activeByDefault> - <os> - <family>mac</family> - </os> - </activation> - </profile> - <profile> - <id>gwt-dev-linux</id> - <properties> - <platform>linux</platform> - </properties> - <activation> - <activeByDefault>false</activeByDefault> - <os> - <name>linux</name> - </os> - </activation> - </profile> - </profiles> - - <properties> - <geotools-version>2.4.1</geotools-version> - <gwt-version>1.7.0</gwt-version> - <smartgwt-version>1.2</smartgwt-version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - -</project> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> + <packaging>pom</packaging> + <name>Geomajas</name> + <description> + Geomajas is a component framework for building rich Internet applications (RIA) with sophisticated capabilities + for the display, analysis and management of geographic information. It is a building block that allows + developers to add maps and other geographic data capabilities to their web applications. + </description> + <url>http://www.geomajas.org/project</url> + + <scm> + <connection>scm:svn:https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</connection> + <developerConnection>scm:svn:https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</developerConnection> + <url>https://svn.geomajas.org/majas/branches/1.5.x/geomajas/</url> + </scm> + <organization> + <name>Geosparc</name> + <url>http://www.geosparc.com</url> + </organization> + <mailingLists> + <mailingList> + <name>DEV</name> + <post>mailto:maj...@ge...</post> + <subscribe>http://lists.geomajas.org/mailman/listinfo/Mmajas-dev</subscribe> + <unsubscribe>http://lists.geomajas.org/mailman/listinfo/majas-dev</unsubscribe> + <archive>http://lists.geomajas.org/pipermail/majas-dev/</archive> + </mailingList> + </mailingLists> + <licenses> + <license> + <name>GNU Affero General Public License, Version 3</name> + <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url> + <distribution>repo</distribution> + </license> + </licenses> + <issueManagement> + <system>JIRA</system> + <url>http://jira.geomajas.org</url> + </issueManagement> + <distributionManagement> + <site> + <id>Geomajas project site</id> + <name>Mapping with Asynchronous Java and SVG</name> + <url>scp://www.majas.dfc.be/var/www/www.majas.dfc.be/htdocs/maven</url> + </site> + </distributionManagement> + <developers> + <developer> + <id>dirkf</id> + <name>dirk.frigne</name> + <email>dir...@ge...</email> + <roles> + <role>CEO</role> + </roles> + </developer> + <developer> + <id>jandm</id> + <name>Jan De Moerlose</name> + <email>jan...@ge...</email> + <roles> + <role>Architect</role> + <role>Lead Developer</role> + </roles> + </developer> + <developer> + <id>pieterdg</id> + <name>Pieter De Graef</name> + <email>pie...@ge...</email> + <roles> + <role>Architect</role> + <role>Lead Developer</role> + </roles> + </developer> + <developer> + <id>joachimvda</id> + <name>Joachim Van der Auwera</name> + <email>jo...@ge...</email> + <roles> + <role>Developer</role> + </roles> + </developer> + </developers> + + <modules> + <module>geomajas-xml-binding</module> + <module>geomajas-api</module> + <module>geomajas-impl</module> + <module>geomajas-dojo-server</module> + <module>geomajas-dojo-client</module> + <module>geomajas-gwt-server</module> + <module>geomajas-gwt-client</module> + <module>layermodels</module> + <module>extensions</module> + </modules> + + <repositories> + <repository> + <id>Geomajas</id> + <name>Geomajas repository</name> + <url>http://maven.geomajas.org</url> + </repository> + <repository> + <id>skynet</id> + <name>Belgian maven archive mirror</name> + <url>http://maven2.mirrors.skynet.be/pub/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>ibiblio</id> + <name>Ibiblio - the public's library and digital archive</name> + <url>http://www.ibiblio.org/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>geotools</id> + <name>Geotools repository</name> + <url>http://maven.geotools.fr/repository</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>refractions</id> + <name>Geotools repository</name> + <url>http://lists.refractions.net/m2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>javanet</id> + <name>Java.net repository</name> + <url>http://download.java.net/maven/2/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>smartgwt</id> + <url> http://www.smartclient.com/maven2</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>jts4gwt</id> + <url>http://jts4gwt.sourceforge.net/maven/repository/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>gegis</id> + <name>gegis repository</name> + <url>http://www.gegis.org/repository</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </pluginRepository> + <pluginRepository> + <id>gwt-maven</id> + <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url> + </pluginRepository> + </pluginRepositories> + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav</artifactId> + <version>1.0-beta-2</version> + </extension> + <extension> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-checkstyle</artifactId> + <version>1.0.0</version> + </extension> + </extensions> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <encoding>utf8</encoding> + <source>1.5</source> + <target>1.5</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <configuration> + <configLocation>config/geomajas-checkstyle.xml</configLocation> + </configuration> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>check</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- make it a Cypal project in Eclipse --> + <!-- + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <wtpversion>2.0</wtpversion> + <workspace>${basedir}/..</workspace> + <alwaysWritePomProjects>true</alwaysWritePomProjects> + <additionalProjectnatures> + <projectnature>in.cypal.studio.gwt.core.gwtNature</projectnature> + </additionalProjectnatures> + <additionalBuildcommands> + <buildcommand>in.cypal.studio.gwt.core.gwtBuilder</buildcommand> + </additionalBuildcommands> + + <sourceExcludes> + <sourceExclude>org/geomajas/emul/</sourceExclude> + </sourceExcludes> + + <excludes> + <exclude>org/geomajas/emul/</exclude> + </excludes> + + </configuration> + </plugin> + --> + </plugins> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.5</version> + <configuration> + <wtpmanifest>true</wtpmanifest> + <wtpapplicationxml>true</wtpapplicationxml> + <wtpversion>2.0</wtpversion> + <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF + </manifest> + <workspace>${basedir}/..</workspace> + <alwaysWritePomProjects>true</alwaysWritePomProjects> + </configuration> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <version>2.3</version> + </plugin> + <plugin> + <artifactId>maven-war-plugin</artifactId> + <version>2.1-alpha-1</version> + <configuration> + <nonFilteredFileExtensions> + <nonFilteredFileExtension>dbf,shp,shx,sbx,sbn</nonFilteredFileExtension> + </nonFilteredFileExtensions> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <links> + <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> + </links> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-report-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jxr-plugin</artifactId> + </plugin> + </plugins> + </reporting> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-xml-binding</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-impl</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- + <dependency> + <groupId>com.vividsolutions</groupId> + <artifactId>jts</artifactId> + <version>1.10</version> + </dependency> + --> + <dependency> + <groupId>net.sf</groupId> + <artifactId>jts4gwt</artifactId> + <version>1.10.0</version> + </dependency> + <dependency> + <groupId>javax.persistence</groupId> + <artifactId>persistence-api</artifactId> + <version>1.0</version> + </dependency> + + <!-- next three dependencies for the Hibernate LayerModel --> + <dependency> + <groupId>org.hibernatespatial</groupId> + <artifactId>hibernate-spatial</artifactId> + <version>1.0-M2</version> + <exclusions> + <exclusion> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernatespatial</groupId> + <artifactId>hibernate-spatial-postgis</artifactId> + <version>1.0-M2</version> + <exclusions> + <exclusion> + <groupId>org.hibernate</groupId> + <artifactId>hibernate</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-annotations</artifactId> + <version>3.4.0.GA</version> + </dependency> + <dependency> + <groupId>org.hibernate</groupId> + <artifactId>hibernate-cglib-repack</artifactId> + <version>2.1_3</version> + </dependency> + + + <!-- override the 1.0 driver that postgis loads --> + <dependency> + <groupId>org.postgis</groupId> + <artifactId>postgis-jdbc</artifactId> + <version>1.1.6</version> + </dependency> + <dependency> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + <version>1.3.03</version> + </dependency> + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + <version>2.1.3</version> + </dependency> + + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-main</artifactId> + <version>${geotools-version}</version> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-api</artifactId> + <version>${geotools-version}</version> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-epsg-wkt</artifactId> + <version>${geotools-version}</version> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-postgis</artifactId> + <version>${geotools-version}</version> + <exclusions> + <exclusion> + <groupId>org.postgis</groupId> + <artifactId>postgis-driver</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-shapefile</artifactId> + <version>${geotools-version}</version> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-xml</artifactId> + <version>${geotools-version}</version> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-render</artifactId> + <version>${geotools-version}</version> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>2.7.0</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>c3p0</groupId> + <artifactId>c3p0</artifactId> + <version>0.9.1.2</version> + </dependency> + + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.7.0</version> + </dependency> + <dependency> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.1</version> + </dependency> + <dependency> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + <version>1.7</version> + </dependency> + <dependency> + <groupId>commons-fileupload</groupId> + <artifactId>commons-fileupload</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>2.0</version> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.1</version> + </dependency> + <dependency> + <groupId>commons-configuration</groupId> + <artifactId>commons-configuration</artifactId> + <version>1.2</version> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.5.8</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>0.9.9</version> + </dependency> + + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.8.1</version> + </dependency> + <dependency> + <groupId>commons-el</groupId> + <artifactId>commons-el</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>com.metaparadigm</groupId> + <artifactId>json-rpc</artifactId> + <version>1.0</version> + </dependency> + <dependency> + <groupId>javax.media</groupId> + <artifactId>jai_core</artifactId> + <version>1.1.3-alpha</version> + </dependency> + <dependency> + <groupId>javax.media</groupId> + <artifactId>jai_codec</artifactId> + <version>1.1.3-alpha</version> + </dependency> + <dependency> + <groupId>javax.media</groupId> + <artifactId>jai_imageio</artifactId> + <version>1.1-alpha</version> + </dependency> + <dependency> + <groupId>com.lowagie</groupId> + <artifactId>itext</artifactId> + <version>2.1.3</version> + </dependency> + <dependency> + <groupId>net.java.dev.weblets</groupId> + <artifactId>weblets-api</artifactId> + <version>1.1</version> + <exclusions> + <exclusion> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.java.dev.weblets</groupId> + <artifactId>weblets-impl</artifactId> + <version>1.1</version> + <exclusions> + <exclusion> + <groupId>commons-digester</groupId> + <artifactId>commons-digester</artifactId> + </exclusion> + <exclusion> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + </exclusion> + </exclusions> + </dependency> + + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-servlet</artifactId> + <version>${gwt-version}</version> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-user</artifactId> + <version>${gwt-version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <version>${gwt-version}</version> + <classifier>${platform}-libs</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <version>${gwt-version}</version> + <classifier>${platform}</classifier> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.smartgwt</groupId> + <artifactId>smartgwt</artifactId> + <version>${smartgwt-version}</version> + </dependency> + <dependency> + <groupId>com.smartgwt</groupId> + <artifactId>smartgwt-skins</artifactId> + <version>${smartgwt-version}</version> + </dependency> + + <dependency> + <groupId>com.thoughtworks.xstream</groupId> + <artifactId>xstream</artifactId> + <version>1.3.1</version> + </dependency> + </dependencies> + </dependencyManagement> + + <!-- profiles (with activation per platform) --> + <profiles> + <profile> + <id>gwt-dev-windows</id> + <properties> + <platform>windows</platform> + </properties> + <activation> + <activeByDefault>true</activeByDefault> + <os> + <family>windows</family> + </os> + </activation> + </profile> + <profile> + <id>gwt-dev-mac</id> + <properties> + <platform>mac</platform> + </properties> + <activation> + <activeByDefault>false</activeByDefault> + <os> + <family>mac</family> + </os> + </activation> + </profile> + <profile> + <id>gwt-dev-linux</id> + <properties> + <platform>linux</platform> + </properties> + <activation> + <activeByDefault>false</activeByDefault> + <os> + <name>linux</name> + </os> + </activation> + </profile> + </profiles> + + <properties> + <geotools-version>2.4.1</geotools-version> + <gwt-version>1.7.0</gwt-version> + <smartgwt-version>1.2</smartgwt-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + +</project> |
Author: pieterdg
Date: 2009-08-26 09:41:08 +0200 (Wed, 26 Aug 2009)
New Revision: 3816
Added:
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/application.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layerTree.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/cities_world.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/countries_world.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/roads.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/maps.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.dbf
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.prj
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shx
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.dbf
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.prj
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shp
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shx
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shx
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/roads_france/
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/roads_france/FRA_roads.dbf
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/roads_france/FRA_roads.prj
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/roads_france/FRA_roads.shp
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/roads_france/FRA_roads.shx
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/toolbar.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/tools.xml
Modified:
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModelFactory.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java
Log:
Added unit tests for the geotools layer model
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModelFactory.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModelFactory.java 2009-08-26 07:15:25 UTC (rev 3815)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModelFactory.java 2009-08-26 07:41:08 UTC (rev 3816)
@@ -28,8 +28,8 @@
import java.util.HashMap;
import java.util.Iterator;
+import org.apache.commons.lang.NotImplementedException;
import org.geomajas.schemas.configuration.FeatureType;
-import org.hibernatespatial.SpatialRelation;
import org.opengis.filter.Filter;
import com.vividsolutions.jts.geom.Geometry;
@@ -48,49 +48,7 @@
public java.util.Map<String, Collection<String>> getRelatedFeatures(int spatialRelation,
LayerModel layer1, LayerModel layer2, Filter filter1, Filter filter2) throws IOException {
- if (spatialRelation < 0 || spatialRelation > SpatialRelation.INTERSECTS) {
- throw new IOException(spatialRelation + " is not a valid relation index");
- }
- Iterator it1 = layer1.getElements(filter1);
- Iterator it2 = layer2.getElements(filter2);
- java.util.Map<String, Geometry> map1 = getGeometryMap(layer1, it1);
- java.util.Map<String, Geometry> map2 = getGeometryMap(layer2, it2);
- java.util.Map<String, Collection<String>> result = new HashMap<String, Collection<String>>();
- // double loop, very inefficient (but at least JTS uses boundary
- // checks)!!!!
- for (String id1 : map1.keySet()) {
- for (String id2 : map2.keySet()) {
- Geometry geom1 = map1.get(id1);
- Geometry geom2 = map2.get(id2);
- switch (spatialRelation) {
- case SpatialRelation.EQUALS:
- addConditionally(geom1.equals(geom2), result, id1, id2);
- break;
- case SpatialRelation.DISJOINT:
- addConditionally(geom1.disjoint(geom2), result, id1, id2);
- break;
- case SpatialRelation.TOUCHES:
- addConditionally(geom1.touches(geom2), result, id1, id2);
- break;
- case SpatialRelation.CROSSES:
- addConditionally(geom1.crosses(geom2), result, id1, id2);
- break;
- case SpatialRelation.WITHIN:
- addConditionally(geom1.within(geom2), result, id1, id2);
- break;
- case SpatialRelation.OVERLAPS:
- addConditionally(geom1.overlaps(geom2), result, id1, id2);
- break;
- case SpatialRelation.CONTAINS:
- addConditionally(geom1.contains(geom2), result, id1, id2);
- break;
- case SpatialRelation.INTERSECTS:
- addConditionally(geom1.intersects(geom2), result, id1, id2);
- break;
- }
- }
- }
- return result;
+ throw new NotImplementedException("Not implemented");
}
public java.util.Map<String, Collection<String>> getRelatedFeatures(String intersectionPattern,
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-26 07:15:25 UTC (rev 3815)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -23,6 +23,15 @@
<groupId>org.geotools</groupId>
<artifactId>gt2-main</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,128 @@
+package org.geomajas.layermodels.geotools;
+
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.geotools.data.DataStore;
+import org.geotools.data.FeatureSource;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.geotools.feature.Feature;
+import org.geotools.feature.FeatureIterator;
+
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.io.ParseException;
+import com.vividsolutions.jts.io.WKTReader;
+
+/**
+ * <p>
+ * Testcase testing all methods of the Geotools FeatureModel.
+ * </p>
+ *
+ * @author Mathias Versichele
+ */
+public class GeoToolsFeatureModelTest extends TestCase {
+
+ private static final String SHAPE_FILE = "org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp";
+
+ private static final String LAYER_NAME = "cities";
+
+ private DataStore dataStore;
+
+ private GeotoolsFeatureModel featureModel;
+
+ private Feature feature;
+
+ protected void setUp() throws Exception {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ URL url = classloader.getResource(SHAPE_FILE);
+ dataStore = new ShapefileDataStore(url);
+ featureModel = new GeotoolsFeatureModel(dataStore, LAYER_NAME, "4326");
+
+ FeatureSource fs = featureModel.getFeatureSource();
+ FeatureIterator fi = fs.getFeatures().features();
+ feature = fi.next();
+ feature = fi.next();
+ feature = fi.next();
+ feature = fi.next();
+ }
+
+ public void testGetId() {
+ try {
+ assertEquals(featureModel.getId(feature), "4");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetAttribute() {
+ try {
+ assertEquals(featureModel.getAttribute(feature, "City"), "Heusweiler");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetAttributes() {
+ try {
+ assertEquals(featureModel.getAttributes(feature).get("City"), "Heusweiler");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetGeometry() {
+ try {
+ assertEquals(featureModel.getGeometry(feature).getCoordinate().x, 6.93);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetGeometryAttributeName() {
+ try {
+ assertEquals(featureModel.getGeometryAttributeName(), "the_geom");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetCRS() {
+ try {
+ assertEquals("EPSG:4326", featureModel.getCrs());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testSetAttributes() {
+ try {
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("City", "Heikant");
+ map.put("the_geom", featureModel.getGeometry(feature));
+ map.put("Population", 100);
+ featureModel.setAttributes(feature, map);
+ assertEquals(featureModel.getAttribute(feature, "City"), "Heikant");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testSetGeometry() {
+ try {
+ WKTReader wktReader = new WKTReader();
+ try {
+ Point pt = (Point) wktReader.read("POINT (5 5)");
+ featureModel.setGeometry(feature, pt);
+ assertEquals(5, featureModel.getGeometry(feature).getCoordinate().x, 0);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,252 @@
+package org.geomajas.layermodels.geotools;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.geomajas.core.filters.FilterCreator;
+import org.geomajas.schemas.configuration.Attributes;
+import org.geomajas.schemas.configuration.FeatureType;
+import org.geomajas.schemas.configuration.GeometricAttribute;
+import org.geomajas.schemas.configuration.IdentifierAttribute;
+import org.geomajas.schemas.configuration.PrimitiveAttribute;
+import org.geomajas.schemas.configuration.PrimitiveType;
+import org.geotools.feature.Feature;
+import org.opengis.filter.Filter;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
+public class GeoToolsFilterTest extends TestCase {
+
+ private static final String SHAPE_FILE = "org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp";
+
+ private GeotoolsLayerModel layerModel;
+
+ protected void setUp() throws Exception {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ URL url = classloader.getResource(SHAPE_FILE);
+ Map<String, String> params = new HashMap<String, String>();
+
+ File file = new File(url.getFile());
+ if (file == null || !file.exists()) {
+ System.out.println(url);
+ return;
+ }
+ params.put("url", "file://" + url.getFile());
+ GeotoolsLayerModelFactory factory = new GeotoolsLayerModelFactory("test", params);
+
+ FeatureType ft = new FeatureType();
+ ft.setLayerModelFactoryRef("filtertest");
+ ft.setName("filtertest");
+
+ IdentifierAttribute ia = new IdentifierAttribute();
+ ia.setLabel("id");
+ ia.setName("Id");
+ ia.setType(PrimitiveType.STRING);
+ ft.setIdentifier(ia);
+
+ GeometricAttribute ga = new GeometricAttribute();
+ ga.setName("the_geom");
+ ga.setCrs("EPSG:4326");
+ ga.setEditable(false);
+ ft.setGeometryType(ga);
+
+ Attributes attr = new Attributes();
+ PrimitiveAttribute pa = new PrimitiveAttribute();
+ pa.setLabel("textAttr");
+ pa.setName("textAttr");
+ pa.setEditable(false);
+ pa.setIdentifying(true);
+ pa.setType(PrimitiveType.STRING);
+
+ attr.getAttributeOrAssociation().add(pa);
+
+ PrimitiveAttribute pa2 = new PrimitiveAttribute();
+ pa2.setLabel("numberAttr");
+ pa2.setName("numberAttr");
+ pa2.setEditable(false);
+ pa2.setIdentifying(true);
+ pa2.setType(PrimitiveType.INTEGER);
+
+ attr.getAttributeOrAssociation().add(pa2);
+ ft.setAttributes(attr);
+
+ layerModel = (GeotoolsLayerModel) factory.createLayerModel(ft);
+ }
+
+ public void testBetweenFilter() {
+ Filter filter = FilterCreator.createBetweenFilter("numberAttr", "2", "8");
+ try {
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(2, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testCompareFilter() {
+ Filter filter = FilterCreator.createCompareFilter("numberAttr", "<", "15");
+ try {
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(4, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testLikeFilter() {
+ Filter filter = FilterCreator.createLikeFilter("textAttr", "*sid*");
+ try {
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(2, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testLogicFilter() {
+ Filter filter1 = FilterCreator.createCompareFilter("numberAttr", "<", "15");
+ Filter filter2 = FilterCreator.createLikeFilter("textAttr", "over*");
+ Filter filter = FilterCreator.createLogicFilter(filter1, "and", filter2);
+
+ try {
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(1, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testFIDFilter() {
+ Filter filter = FilterCreator.createFidFilter(new String[] { "1" });
+ try {
+ Iterator<?> it = layerModel.getElements(filter);
+ Feature f = (Feature) it.next();
+ assertEquals("centraal", f.getAttribute("textAttr"));
+ } catch (IOException e) {
+ }
+ }
+
+ public void testContainsFilter() {
+ try {
+ Geometry geom = ((Feature) layerModel.read("3")).getDefaultGeometry();
+ Filter filter = FilterCreator.createContainsFilter(geom, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(3, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testWithinFilter() {
+ try {
+ Geometry geom = ((Feature) layerModel.read("1")).getDefaultGeometry();
+ Filter filter = FilterCreator.createWithinFilter(geom, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(4, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testIntersectsFilter() {
+ try {
+ Geometry geom = ((Feature) layerModel.read("1")).getDefaultGeometry();
+ Filter filter = FilterCreator.createIntersectsFilter(geom, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(6, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testTouchesFilter() {
+ try {
+ Geometry geom = ((Feature) layerModel.read("1")).getDefaultGeometry();
+ Filter filter = FilterCreator.createTouchesFilter(geom, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(1, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testcreateBBoxFilter() {
+ try {
+ Envelope envelope = new Envelope(-0.4d, -0.2d, -0.3d, 0.1d);
+ Filter filter = FilterCreator.createBBoxFilter("EPSG:4326", envelope, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(3, t);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testOverlapsFilter() {
+ try {
+ Geometry geom = ((Feature) layerModel.read("4")).getDefaultGeometry();
+ Filter filter = FilterCreator.createOverlapsFilter(geom, "the_geom");
+ Iterator<?> it = layerModel.getElements(filter);
+
+ int t = 0;
+ while (it.hasNext()) {
+ it.next();
+ t++;
+ }
+ assertEquals(1, t);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,186 @@
+package org.geomajas.layermodels.geotools;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.geomajas.core.filters.FilterCreator;
+import org.geomajas.schemas.configuration.Attributes;
+import org.geomajas.schemas.configuration.FeatureType;
+import org.geomajas.schemas.configuration.GeometricAttribute;
+import org.geomajas.schemas.configuration.IdentifierAttribute;
+import org.geomajas.schemas.configuration.PrimitiveAttribute;
+import org.geomajas.schemas.configuration.PrimitiveType;
+import org.geotools.factory.FactoryRegistryException;
+import org.geotools.feature.AttributeType;
+import org.geotools.feature.AttributeTypeFactory;
+import org.geotools.feature.DefaultFeature;
+import org.geotools.feature.Feature;
+import org.geotools.feature.FeatureTypeBuilder;
+import org.geotools.feature.IllegalAttributeException;
+import org.geotools.feature.SchemaException;
+import org.opengis.filter.Filter;
+
+import com.vividsolutions.jts.geom.Point;
+import com.vividsolutions.jts.io.ParseException;
+import com.vividsolutions.jts.io.WKTReader;
+
+public class GeoToolsLayerModelTest extends TestCase {
+
+ private static final String SHAPE_FILE = "org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp";
+
+ private GeotoolsLayerModel layerModel;
+
+ private Filter filter;
+
+ protected void setUp() throws Exception {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ URL url = classloader.getResource(SHAPE_FILE);
+ Map<String, String> params = new HashMap<String, String>();
+
+ File file = new File(url.getFile());
+ if (file == null || !file.exists()) {
+ System.out.println(url);
+ return;
+ }
+ params.put("url", "file://" + url.getFile());
+ GeotoolsLayerModelFactory factory = new GeotoolsLayerModelFactory("test", params);
+
+ FeatureType ft = new FeatureType();
+ ft.setLayerModelFactoryRef("citiesShape");
+ ft.setName("cities");
+
+ IdentifierAttribute ia = new IdentifierAttribute();
+ ia.setLabel("id");
+ ia.setName("Id");
+ ia.setType(PrimitiveType.STRING);
+ ft.setIdentifier(ia);
+
+ GeometricAttribute ga = new GeometricAttribute();
+ ga.setName("the_geom");
+ ga.setCrs("EPSG:4326");
+ ga.setEditable(false);
+ ft.setGeometryType(ga);
+
+ Attributes attr = new Attributes();
+ PrimitiveAttribute pa = new PrimitiveAttribute();
+ pa.setLabel("City");
+ pa.setName("City");
+ pa.setEditable(false);
+ pa.setIdentifying(true);
+ pa.setType(PrimitiveType.STRING);
+
+ attr.getAttributeOrAssociation().add(pa);
+ ft.setAttributes(attr);
+
+ layerModel = (GeotoolsLayerModel) factory.createLayerModel(ft);
+ filter = FilterCreator.createCompareFilter("Population", ">", "49900");
+ }
+
+ public void testRead() {
+ DefaultFeature f = null;
+ try {
+ f = (DefaultFeature) layerModel.read("9703");
+ } catch (IOException e) {
+ }
+
+ assertEquals("Elmhurst", f.getAttribute("City"));
+ }
+
+ public void testUpdate() {
+ DefaultFeature f = null;
+
+ Calendar cal = Calendar.getInstance();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ try {
+ f = (DefaultFeature) layerModel.read("10");
+ try {
+ f.setAttribute("City", sdf.format(cal.getTime()));
+ } catch (IllegalAttributeException e) {
+ }
+ layerModel.update(f);
+ } catch (IOException e) {
+ }
+ assertEquals(sdf.format(cal.getTime()), f.getAttribute("City"));
+ }
+
+ public void testCreate() {
+ Object created = null;
+
+ AttributeType geom = AttributeTypeFactory.newAttributeType("the_geom", Point.class);
+ AttributeType city = AttributeTypeFactory.newAttributeType("City", String.class);
+ AttributeType population = AttributeTypeFactory.newAttributeType("Population", Integer.class);
+
+ org.geotools.feature.FeatureType ft = null;
+ try {
+ ft = FeatureTypeBuilder.newFeatureType(new AttributeType[] { geom, city, population }, "city");
+ WKTReader wktReader = new WKTReader();
+ Point geometry = null;
+ try {
+ geometry = (Point) wktReader.read("POINT (0 0)");
+ } catch (ParseException e) {
+ }
+ String name = "Tsjakamaka";
+ Integer pop = new Integer(100);
+ Feature newCity = null;
+ newCity = ft.create(new Object[] { geometry, name, pop });
+ created = layerModel.create(newCity);
+ } catch (FactoryRegistryException e) {
+ } catch (SchemaException e) {
+ } catch (IllegalAttributeException e) {
+ } catch (IOException e) {
+ }
+ assertNotNull(created);
+ }
+
+ public void testDelete() {
+ DefaultFeature f = null;
+ try {
+ f = (DefaultFeature) layerModel.read("10580");
+ assertNotNull(f);
+ layerModel.delete("10580");
+ assertTrue(true);
+ } catch (IOException e) {
+ assertTrue(false);
+ }
+ }
+
+ public void testGetBounds() {
+ try {
+ // Checked in QGis!
+ String bounds = layerModel.getBounds().toString();
+ assertEquals("ReferencedEnvelope[-175.22 : 179.38, -46.41 : 69.41]", bounds);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testGetBoundsFilter() {
+ try {
+ // Checked in QGis!
+ String bounds = layerModel.getBounds(filter).toString();
+ assertEquals("ReferencedEnvelope[-118.01 : 120.86, -19.99 : 53.09]", bounds);
+ } catch (IOException e) {
+ }
+ }
+
+ public void testGetElements() {
+ try {
+ // Checked in QGis!
+ Iterator<?> it = layerModel.getElements(filter);
+ int counter = 0;
+ while (it.hasNext()) {
+ it.next();
+ counter++;
+ }
+ assertEquals(16, counter);
+ } catch (IOException e) {
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/application.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/application.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/application.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<applicationConfig xmlns="http://geomajas.org/schemas/configuration/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns2="http://www.w3.org/1999/xhtml" xmlns:ns="http://www.majas.org/schema/2006/configuration/"
+ xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xsi:schemaLocation="http://geomajas.org/schemas/configuration/ file://majas-application.xsd ">
+
+ <url>simplevectors</url>
+ <name>Simple vectorial application focused on South Africa.</name>
+
+ <layerModelFactory id="worldShape">
+ <factoryClass>org.geomajas.layermodels.shapeinmem.ShapeInMemLayerModelFactory
+ </factoryClass>
+ <parameterMap>
+ <parameter name="url"
+ value="file:shapes/countries_world/world_adm0.shp" />
+ </parameterMap>
+ </layerModelFactory>
+
+ <layerModelFactory id="roadShape">
+ <factoryClass>org.geomajas.layermodels.shapeinmem.ShapeInMemLayerModelFactory
+ </factoryClass>
+ <parameterMap>
+ <parameter name="url" value="file:shapes/roads_france/FRA_roads.shp" />
+ </parameterMap>
+ </layerModelFactory>
+
+ <layerModelFactory id="citiesShape">
+ <factoryClass>org.geomajas.layermodels.shapeinmem.ShapeInMemLayerModelFactory
+ </factoryClass>
+ <parameterMap>
+ <parameter name="url" value="file:shapes/cities_world/cities.shp" />
+ </parameterMap>
+ </layerModelFactory>
+
+ <xi:include href="layerTree.xml" />
+ <xi:include href="maps.xml" />
+ <xi:include href="toolbar.xml" />
+ <xi:include href="tools.xml" />
+
+</applicationConfig>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/application.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layerTree.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layerTree.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layerTree.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<layerTrees xmlns="http://geomajas.org/schemas/configuration/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <layerTree id="mainLayerTree">
+ <targetMap>mainMap</targetMap>
+ <toolRef>LayerVisibleTool</toolRef>
+ <toolRef>LayerLabeledTool</toolRef>
+ </layerTree>
+
+</layerTrees>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layerTree.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/cities_world.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/cities_world.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/cities_world.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<layer xmlns="http://geomajas.org/schemas/configuration/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="cities"
+ xsi:type="vectorLayerInfo">
+ <label>Cities</label>
+ <visible>true</visible>
+ <layerType>2</layerType>
+ <crs>EPSG:4326</crs>
+ <viewScale>
+ <min>0</min>
+ <max>1000</max>
+ </viewScale>
+ <maxExtent>
+ <minX>-170</minX>
+ <maxX>170</maxX>
+ <minY>-80</minY>
+ <maxY>80</maxY>
+ </maxExtent>
+ <maxTileLevel>17</maxTileLevel>
+ <layerDefinition>
+ <layerFactory>
+ org.geomajas.core.application.DefaultLayerFactory
+ </layerFactory>
+ <label>
+ <labelAttribute>City</labelAttribute>
+ </label>
+ <filter />
+ <editPermissions>
+ <creatingAllowed>false</creatingAllowed>
+ <updatingAllowed>false</updatingAllowed>
+ <deletingAllowed>false</deletingAllowed>
+ </editPermissions>
+ <featureType>
+ <layerModelFactoryRef>citiesShape</layerModelFactoryRef>
+ <name>cities</name>
+ <identifier>
+ <label>id</label>
+ <name>Id</name>
+ <type>string</type>
+ </identifier>
+ <geometryType>
+ <name>the_geom</name>
+ <crs>EPSG:4326</crs>
+ <editable>false</editable>
+ </geometryType>
+ <attributes>
+ <attribute>
+ <label>City</label>
+ <name>City</name>
+ <editable>false</editable>
+ <identifying>true</identifying>
+ <type>string</type>
+ </attribute>
+ </attributes>
+ </featureType>
+
+ <snappingRules />
+
+ <styleDefs>
+ <styleDef id="1">
+ <name>City</name>
+ <formula />
+ <style>
+ <fillColor>#76EE00</fillColor>
+ <fillOpacity>1</fillOpacity>
+ <strokeColor>#458B00</strokeColor>
+ <strokeOpacity>1</strokeOpacity>
+ <strokeWidth>1</strokeWidth>
+ <symbol>
+ <rect w="10" h="10"/>
+ </symbol>
+ </style>
+ </styleDef>
+ </styleDefs>
+
+ </layerDefinition>
+</layer>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/cities_world.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/countries_world.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/countries_world.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/countries_world.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<layer xmlns="http://geomajas.org/schemas/configuration/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="countries"
+ xsi:type="vectorLayerInfo">
+ <label>Countries</label>
+ <visible>true</visible>
+ <layerType>7</layerType>
+ <crs>EPSG:4326</crs>
+ <viewScale>
+ <min>0</min>
+ <max>1000</max>
+ </viewScale>
+ <maxExtent>
+ <minX>-170</minX>
+ <maxX>170</maxX>
+ <minY>-80</minY>
+ <maxY>80</maxY>
+ </maxExtent>
+ <maxTileLevel>17</maxTileLevel>
+ <layerDefinition>
+ <layerFactory>
+ org.geomajas.core.application.DefaultLayerFactory
+ </layerFactory>
+ <label>
+ <labelAttribute>NAME</labelAttribute>
+ </label>
+ <filter />
+ <editPermissions>
+ <creatingAllowed>false</creatingAllowed>
+ <updatingAllowed>false</updatingAllowed>
+ <deletingAllowed>false</deletingAllowed>
+ </editPermissions>
+ <featureType>
+ <layerModelFactoryRef>worldShape</layerModelFactoryRef>
+ <name>world_adm0</name>
+ <identifier>
+ <label>id</label>
+ <name>GMI_CNTRY</name>
+ <type>string</type>
+ </identifier>
+ <geometryType>
+ <name>the_geom</name>
+ <crs>EPSG:4326</crs>
+ <editable>false</editable>
+ </geometryType>
+ <attributes>
+ <attribute>
+ <label>Name</label>
+ <name>NAME</name>
+ <editable>false</editable>
+ <identifying>true</identifying>
+ <type>string</type>
+ </attribute>
+ <attribute>
+ <label>Region</label>
+ <name>REGION</name>
+ <editable>false</editable>
+ <identifying>true</identifying>
+ <type>string</type>
+ </attribute>
+ </attributes>
+ </featureType>
+
+ <snappingRules />
+
+ <styleDefs>
+ <styleDef id="1">
+ <name>South Africa</name>
+ <formula>(GMI_CNTRY like 'ZAF')</formula>
+ <style>
+ <fillColor>#33BB77</fillColor>
+ <fillOpacity>0.6</fillOpacity>
+ <strokeColor>#339977</strokeColor>
+ <strokeOpacity>1</strokeOpacity>
+ <strokeWidth>1</strokeWidth>
+ </style>
+ </styleDef>
+ <styleDef id="2">
+ <name>Countries</name>
+ <formula></formula>
+ <style>
+ <fillColor>#66BB33</fillColor>
+ <fillOpacity>0.6</fillOpacity>
+ <strokeColor>#668833</strokeColor>
+ <strokeOpacity>1</strokeOpacity>
+ <strokeWidth>1</strokeWidth>
+ </style>
+ </styleDef>
+ </styleDefs>
+
+ </layerDefinition>
+</layer>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/countries_world.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/roads.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/roads.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/roads.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<layer xmlns="http://geomajas.org/schemas/configuration/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="roads" xsi:type="vectorLayerInfo">
+ <label>Roads of France</label>
+ <visible>true</visible>
+ <layerType>6</layerType>
+ <crs>EPSG:4326</crs>
+ <viewScale>
+ <min>0</min>
+ <max>1000</max>
+ </viewScale>
+ <maxExtent>
+ <minX>-170</minX>
+ <maxX>170</maxX>
+ <minY>-80</minY>
+ <maxY>80</maxY>
+ </maxExtent>
+ <maxTileLevel>17</maxTileLevel>
+ <layerDefinition>
+ <layerFactory>
+ org.geomajas.core.application.DefaultLayerFactory
+ </layerFactory>
+ <label>
+ <labelAttribute>NAME</labelAttribute>
+ </label>
+ <filter />
+ <editPermissions>
+ <creatingAllowed>false</creatingAllowed>
+ <updatingAllowed>false</updatingAllowed>
+ <deletingAllowed>false</deletingAllowed>
+ </editPermissions>
+ <featureType>
+ <layerModelFactoryRef>roadShape</layerModelFactoryRef>
+ <name>FRA_roads</name>
+ <identifier>
+ <label>id</label>
+ <name>Id</name>
+ <type>string</type>
+ </identifier>
+ <geometryType>
+ <name>the_geom</name>
+ <crs>EPSG:4326</crs>
+ <editable>false</editable>
+ </geometryType>
+ <attributes>
+ <attribute>
+ <label>Median</label>
+ <name>MED_DESCRI</name>
+ <editable>false</editable>
+ <identifying>true</identifying>
+ <type>string</type>
+ </attribute>
+ </attributes>
+ </featureType>
+
+ <snappingRules />
+ <styleDefs>
+ <styleDef id="1">
+ <name>Roads</name>
+ <formula></formula>
+ <style>
+ <fillColor>#778899</fillColor>
+ <fillOpacity>0</fillOpacity>
+ <strokeColor>#778899</strokeColor>
+ <strokeOpacity>1</strokeOpacity>
+ <strokeWidth>2</strokeWidth>
+ </style>
+ </styleDef>
+ </styleDefs>
+
+ </layerDefinition>
+</layer>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/layers/roads.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/maps.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/maps.xml (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/maps.xml 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ This software project is called Geomajas, a component framework for building
+ rich Internet applications (RIA) with sophisticated capabilities for the
+ display, analysis and management of geographic information.
+ It is a building block that allows developers to add maps
+ and other geographic data capabilities to their web applications.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+
+ Copyright 2009 Geosparc, http://www.geosparc.com, Belgium
+ This file is part of Geomajas.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<maps xmlns="http://geomajas.org/schemas/configuration/"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <map id="mainMap">
+ <backgroundColor>#E0E0E0</backgroundColor>
+ <lineSelectStyle>
+ <fillOpacity>0</fillOpacity>
+ <strokeColor>#FF6600</strokeColor>
+ <strokeOpacity>1</strokeOpacity>
+ </lineSelectStyle>
+
+ <pointSelectStyle>
+ <fillColor>#FFFF00</fillColor>
+ </pointSelectStyle>
+
+ <polygonSelectStyle>
+ <fillColor>#FFFF00</fillColor>
+ <fillOpacity>0.5</fillOpacity>
+ </polygonSelectStyle>
+
+ <crs>EPSG:900913</crs>
+ <scaleBarEnabled>true</scaleBarEnabled>
+ <panButtonsEnabled>true</panButtonsEnabled>
+ <overview />
+ <maximumScale>100000</maximumScale>
+ <initialBounds x="-3500000" y="-4500000" width="10000000" height="10000000" />
+
+ <resolutions>
+ <resolution>156543.03</resolution>
+ <resolution>78271.52</resolution>
+ <resolution>39135.76</resolution>
+ <resolution>19567.88</resolution>
+ <resolution>9783.94</resolution>
+ <resolution>4891.97</resolution>
+ <resolution>2445.98</resolution>
+ <resolution>1222.99</resolution>
+ <resolution>611.49</resolution>
+ <resolution>305.75</resolution>
+ <resolution>152.874057</resolution>
+ <resolution>76.4370283</resolution>
+ <resolution>38.2185141</resolution>
+ <resolution>19.1092571</resolution>
+ <resolution>9.55462853</resolution>
+ <resolution>4.77731427</resolution>
+ <resolution>2.38865713</resolution>
+ <resolution>1.19432857</resolution>
+ </resolutions>
+
+ <layerConfig>
+ <xi:include href="layers/countries_world.xml" />
+ <xi:include href="layers/cities_world.xml" />
+ <xi:include href="layers/roads.xml" />
+ <mapOrder>
+ <layerRef>osm</layerRef>
+ <layerRef>countries</layerRef>
+ <layerRef>roads</layerRef>
+ <layerRef>cities</layerRef>
+ </mapOrder>
+ <layerTree>
+ <label>Layers</label>
+ <layerRef>osm</layerRef>
+ <layerRef>countries</layerRef>
+ <layerRef>roads</layerRef>
+ <layerRef>cities</layerRef>
+ </layerTree>
+ </layerConfig>
+ </map>
+
+</maps>
\ No newline at end of file
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/maps.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.dbf
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.dbf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.prj
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.prj (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.prj 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1 @@
+GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
\ No newline at end of file
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shx
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.dbf
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.dbf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.prj
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.prj (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.prj 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1 @@
+GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
\ No newline at end of file
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shp
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shp
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shx
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/countries_world/world_adm0.shx
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj (rev 0)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj 2009-08-26 07:41:08 UTC (rev 3816)
@@ -0,0 +1 @@
+GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
\ No newline at end of file
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp
===================================================================
(Binary files differ)
Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/test/resources/org/geomajas/configuration/app...
[truncated message content] |
|
From: <sv...@ge...> - 2009-08-26 08:17:07
|
Author: kristofh
Date: 2009-08-26 09:15:25 +0200 (Wed, 26 Aug 2009)
New Revision: 3815
Modified:
branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
Log:
foutboodschap uitgebreid
Modified: branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-26 06:53:14 UTC (rev 3814)
+++ branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-26 07:15:25 UTC (rev 3815)
@@ -71,11 +71,11 @@
PermissionResult pr = sm.checkPermission(userContext, getRequiredOperations(), new Resource(
getLayer()), application.getUrl());
+ String securityFilter = "";
if (pr.allowed) {
if (pr.filter != null) {
// security ok, but need to add a filter
String fltr = getFilter();
- String securityFilter;
try {
securityFilter = StringUtils.substituteParameters(pr.filter, userContext.getUser()
.getRoleProperties());
@@ -95,7 +95,7 @@
} else {
return setErrorResult("Beveiligingsfout: Gebruiker: " + userContext.getUser().getUserName()
+ " heeft niet voldoende rechten om deze aanvraag uit te voeren ("
- + this.getClass().getSimpleName() + ")", "SecurityException. user: "
+ + this.getClass().getSimpleName() + ("".equals(securityFilter) ? "" : ", Filter: " + securityFilter) + ")", "SecurityException. user: "
+ userContext.getUser().getUserName() + " has insufficient rights to execute request. ("
+ this.getClass().getSimpleName() + ")");
}
|
|
From: <sv...@ge...> - 2009-08-26 07:54:56
|
Author: pieterdg
Date: 2009-08-26 08:53:14 +0200 (Wed, 26 Aug 2009)
New Revision: 3814
Modified:
trunk/geomajas/geomajas-dojo-client/pom.xml
Log:
Switch from dojo's external SVN, to a zip file from the geosparc svn.
No more svn:externals! This will speed up building time.
Fix for MAJ-401
Modified: trunk/geomajas/geomajas-dojo-client/pom.xml
===================================================================
--- trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-26 06:50:54 UTC (rev 3813)
+++ trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-26 06:53:14 UTC (rev 3814)
@@ -12,6 +12,36 @@
<build>
<plugins>
+
+ <!-- This plugin unzips DOJO from the maven repository into the JS directory -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack dojo-1.1.0</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.geomajas.dojo</groupId>
+ <artifactId>dojo</artifactId>
+ <version>1.1.0</version>
+ <type>zip</type>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${basedir}/src/main/webapp/js</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+
+
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
|
Author: joachimvda
Date: 2009-08-26 08:50:54 +0200 (Wed, 26 Aug 2009)
New Revision: 3813
Modified:
trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java
trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractBasicSecurityApplicationCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractRoleSecurityApplicationCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/NoopCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentCommand.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
Log:
MAJ-390 rename checkSecurity to isAuthenticated as this is more meaningful
Modified: trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java
===================================================================
--- trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -114,5 +114,5 @@
* @param sm security manager
* @return true when command is allowed, false otherwise
*/
- public boolean checkSecurity(SecurityManager sm);
+ public boolean isAuthenticated(SecurityManager sm);
}
Modified: trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
===================================================================
--- trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -76,6 +76,6 @@
}
public boolean beforeExecute(ApplicationCommand command) {
- return command.checkSecurity(sm);
+ return command.isAuthenticated(sm);
}
}
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractBasicSecurityApplicationCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractBasicSecurityApplicationCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractBasicSecurityApplicationCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -34,7 +34,7 @@
private final Logger log = LoggerFactory.getLogger(AbstractBasicSecurityApplicationCommand.class);
- public boolean checkSecurity(SecurityManager sm) {
+ public boolean isAuthenticated(SecurityManager sm) {
if (getUserContext().isAuthenticated() && getUserContext().getUser() != null) {
if (getUserContext().getUser().isInApplication(application.getUrl())) {
return true;
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -66,11 +66,11 @@
*/
public abstract ApplicationResult getEmptyResult();
- public boolean checkSecurity(SecurityManager sm) {
+ public boolean isAuthenticated(SecurityManager sm) {
log.debug("Checking security: user: {} - {} - {} - {}", new Object[] {
(userContext.getUser() == null ? "null" : userContext.getUser().getUserName()),
getRequiredOperations(), getLayer(), application.getUrl() });
- if (!super.checkSecurity(sm))
+ if (!super.isAuthenticated(sm))
return false;
PermissionResult pr = sm.checkPermission(userContext, getRequiredOperations(), new Resource(
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractRoleSecurityApplicationCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractRoleSecurityApplicationCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractRoleSecurityApplicationCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -35,8 +35,8 @@
*/
abstract String getRequiredRole();
- public boolean checkSecurity(SecurityManager sm) {
- if (!super.checkSecurity(sm))
+ public boolean isAuthenticated(SecurityManager sm) {
+ if (!super.isAuthenticated(sm))
return false;
if (getUserContext().isUserInRole(getRequiredRole())) {
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -142,8 +142,8 @@
this.point = point;
}
- public boolean checkSecurity(SecurityManager sm) {
- if (!super.checkSecurity(sm))
+ public boolean isAuthenticated(SecurityManager sm) {
+ if (!super.isAuthenticated(sm))
return false;
if (layerIds == null || layerIds.length == 0)
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/NoopCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/NoopCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/NoopCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -29,7 +29,7 @@
public void execute() {
}
- public boolean checkSecurity(SecurityManager sm) {
+ public boolean isAuthenticated(SecurityManager sm) {
return true;
}
}
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -172,7 +172,7 @@
return UCM;
}
- public boolean checkSecurity(SecurityManager sm) {
+ public boolean isAuthenticated(SecurityManager sm) {
// can't return false here or you wopn't ba able to log in...
return true;
}
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentCommand.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentCommand.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentCommand.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -183,8 +183,8 @@
* cheating a bit here, all layers we are allowed to read are used, security
* in itself doesn't fail, if we have no readaccess anywhere we fail
*/
- public boolean checkSecurity(SecurityManager sm) {
- if (!super.checkSecurity(sm))
+ public boolean isAuthenticated(SecurityManager sm) {
+ if (!super.isAuthenticated(sm))
return false;
if (!init())
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-26 05:48:18 UTC (rev 3812)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-26 06:50:54 UTC (rev 3813)
@@ -78,6 +78,6 @@
}
public boolean beforeExecute(ApplicationCommand command) {
- return command.checkSecurity(sm);
+ return command.isAuthenticated(sm);
}
}
|
Author: pieterdg Date: 2009-08-26 07:48:18 +0200 (Wed, 26 Aug 2009) New Revision: 3812 Modified: trunk/geomajas/extensions/geomajas-printing/ trunk/geomajas/geomajas-xml-binding/ trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/ trunk/geomajas/layermodels/geomajas-layermodel-wms/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/extensions/geomajas-printing ___________________________________________________________________ Added: svn:ignore + .settings target .project .classpath Property changes on: trunk/geomajas/geomajas-xml-binding ___________________________________________________________________ Added: svn:ignore + .project target .settings .classpath Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps ___________________________________________________________________ Added: svn:ignore + target .settings .project .classpath Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-wms ___________________________________________________________________ Added: svn:ignore + target .settings .project .classpath |
|
From: <sv...@ge...> - 2009-08-26 06:49:04
|
Author: pieterdg Date: 2009-08-26 07:47:21 +0200 (Wed, 26 Aug 2009) New Revision: 3811 Modified: trunk/geomajas/layermodels/geomajas-layermodel-hibernate/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-hibernate ___________________________________________________________________ Added: svn:ignore + .classpath .settings target .project |
|
From: <sv...@ge...> - 2009-08-26 06:48:27
|
Author: pieterdg Date: 2009-08-26 07:46:48 +0200 (Wed, 26 Aug 2009) New Revision: 3810 Modified: trunk/geomajas/layermodels/geomajas-layermodel-google/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/layermodels/geomajas-layermodel-google ___________________________________________________________________ Added: svn:ignore + .project target .settings .classpath |
|
From: <sv...@ge...> - 2009-08-26 06:47:13
|
Author: pieterdg Date: 2009-08-26 07:45:35 +0200 (Wed, 26 Aug 2009) New Revision: 3809 Modified: trunk/geomajas/geomajas-gwt-server/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/geomajas-gwt-server ___________________________________________________________________ Added: svn:ignore + .project .settings .classpath target |
|
From: <sv...@ge...> - 2009-08-26 06:46:42
|
Author: pieterdg Date: 2009-08-26 07:45:00 +0200 (Wed, 26 Aug 2009) New Revision: 3808 Modified: trunk/geomajas-gwt-example/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas-gwt-example ___________________________________________________________________ Added: svn:ignore + .project target .settings .classpath |
|
From: <sv...@ge...> - 2009-08-26 06:46:08
|
Author: pieterdg Date: 2009-08-26 07:44:27 +0200 (Wed, 26 Aug 2009) New Revision: 3807 Modified: trunk/geomajas/geomajas-gwt-client/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/geomajas-gwt-client ___________________________________________________________________ Added: svn:ignore + .project .classpath .settings target |
|
From: <sv...@ge...> - 2009-08-26 06:45:30
|
Author: pieterdg Date: 2009-08-26 07:43:51 +0200 (Wed, 26 Aug 2009) New Revision: 3806 Modified: trunk/geomajas/extensions/geomajas-editing/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/extensions/geomajas-editing ___________________________________________________________________ Added: svn:ignore + .project .settings target .classpath |
|
From: <sv...@ge...> - 2009-08-26 06:45:16
|
Author: pieterdg Date: 2009-08-26 07:43:35 +0200 (Wed, 26 Aug 2009) New Revision: 3805 Modified: trunk/geomajas-dojo-simple/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas-dojo-simple ___________________________________________________________________ Added: svn:ignore + target .classpath .settings .project |
|
From: <sv...@ge...> - 2009-08-26 06:44:27
|
Author: pieterdg Date: 2009-08-26 07:42:46 +0200 (Wed, 26 Aug 2009) New Revision: 3804 Modified: trunk/geomajas/geomajas-dojo-server/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas/geomajas-dojo-server ___________________________________________________________________ Added: svn:ignore + .project .classpath target .settings |
|
From: <sv...@ge...> - 2009-08-26 06:40:02
|
Author: pieterdg Date: 2009-08-26 07:38:20 +0200 (Wed, 26 Aug 2009) New Revision: 3803 Modified: trunk/geomajas-checkstyle/ Log: Committing svn:ignore statements Property changes on: trunk/geomajas-checkstyle ___________________________________________________________________ Added: svn:ignore + .project target .classpath |
Author: joachimvda
Date: 2009-08-26 07:21:29 +0200 (Wed, 26 Aug 2009)
New Revision: 3802
Added:
trunk/geomajas-dojo-example/src/main/eclipse/eclipse.properties
trunk/geomajas/geomajas-dojo-server/src/main/java/org/geomajas/dojo/
trunk/geomajas/geomajas-dojo-server/src/main/java/org/geomajas/dojo/server/
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java
trunk/geomajas/layermodels/geomajas-layermodel-google/src/main/java/org/geomajas/layermodels/
trunk/geomajas/layermodels/geomajas-layermodel-google/src/main/java/org/geomajas/layermodels/google/
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/
trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/java/org/geomajas/layermodels/
trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/java/org/geomajas/layermodels/osm/
trunk/geomajas/layermodels/geomajas-layermodel-wms/src/main/java/org/geomajas/layermodels/
trunk/geomajas/layermodels/geomajas-layermodel-wms/src/main/java/org/geomajas/layermodels/wms/
Removed:
trunk/geomajas-dojo-example/src/main/filters/eclipse.properties
trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/xml/
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/google/
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/osm/
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wms/
Modified:
trunk/geomajas-dojo-example/src/main/eclipse/build.xml
trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java
trunk/geomajas/geomajas-impl/pom.xml
trunk/geomajas/geomajas-impl/src/main-ref/java/org/geomajas/server/layer/layermodels/LayerModelFactoryRegistry.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplication.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerManager.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerModelRegistry.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/Construction.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-google/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java
trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java
trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-wms/pom.xml
trunk/geomajas/pom.xml
Log:
MAJ-386 move layermodels to their own module, move some impl out of api again, MAJ-384 remove all Class.forName
Modified: trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java
===================================================================
--- trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-api/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -29,8 +29,7 @@
import org.geomajas.core.aaa.policy.SecurityManager;
/**
- * @version 1.0
- * @created 21-Mar-2006 9:06:40 AM
+ * Command definition.
*/
public interface ApplicationCommand extends UserContextAware {
@@ -44,26 +43,23 @@
/**
* Each command has a unique identifier. This is mainly for cancelling purposes.
*
- * @param id
- * Set this unique identifier.
+ * @param id Set this unique identifier.
*/
public void setId(Long id);
/**
* A command always has to be executed on an <code>Application</code>
*
- * @param application
- * The application on which to execute this command.
+ * @param application The application on which to execute this command.
*/
public void setApplication(Application application);
/**
* A command always has to be executed in a certain user context. If this is not set, an anonymous user is assumed.
*
- * @param application
- * The application on which to execute this command.
+ * @param userContext The application on which to execute this command.
*/
- public void setUserContext(UserContext usercontext);
+ public void setUserContext(UserContext userContext);
/**
* Execute this command.
@@ -79,10 +75,9 @@
* <p>
* Error is already set in result, so you do not need to implement this method if you don't need it
*
- * @param contains
- * error generated by interceptors (if any)
+ * @param error error generated by interceptors (if any)
*/
- public void postExecute(Throwable t);
+ public void postExecute(Throwable error);
/**
* Get the result, after execution.
@@ -106,7 +101,7 @@
public UserContext getUserContext();
/**
- * Use the securitymanager to check if the requestor has adequate rights to execute this command.<br />
+ * Use the security manager to check if the requestor has adequate rights to execute this command.<br />
* Don't forget to set command.errorResult if you cancel beforeExecute as execute won't be called anymore<br />
* <br />
* Also don't forget to use the filter provided by SecurityManager.checkPermission()
@@ -116,8 +111,8 @@
result.addErrorMessage("SecurityException: You do not have enough rights to execute this command!");
* </code>
*
- * @param sm
- * @return
+ * @param sm security manager
+ * @return true when command is allowed, false otherwise
*/
public boolean checkSecurity(SecurityManager sm);
}
Modified: trunk/geomajas/geomajas-impl/pom.xml
===================================================================
--- trunk/geomajas/geomajas-impl/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -26,6 +26,7 @@
</dependency>
<!-- next three dependencies for the Hibernate LayerModel -->
+ <!--
<dependency>
<groupId>org.hibernatespatial</groupId>
<artifactId>hibernate-spatial</artifactId>
@@ -46,13 +47,16 @@
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
</dependency>
+ -->
<!-- override the 1.0 driver that postgis loads -->
+ <!--
<dependency>
<groupId>org.postgis</groupId>
<artifactId>postgis-jdbc</artifactId>
</dependency>
-
+ -->
+
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/SecurityInterceptor.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -45,7 +45,9 @@
throw new IllegalArgumentException("No security manager class name provided");
}
try {
- Class<?> managerClass = Class.forName(managerClassName);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class<?> managerClass = loader.loadClass(managerClassName);
SecurityManager sm = (SecurityManager) managerClass.newInstance();
setSecurityManager(sm);
Copied: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java (from rev 3800, trunk/geomajas/geomajas-api/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java)
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java (rev 0)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.geomajas.core.aaa.policy.xml;
+
+public class Role {
+
+ private String roleName;
+
+ private String applicationName;
+
+ public Role() {
+ }
+
+ public Role(String roleName, String appName) {
+ this.roleName = roleName;
+ this.applicationName = appName;
+ }
+
+ // ------------------------------------------------------------------------
+
+ public String getApplicationName() {
+ return applicationName;
+ }
+
+ public void setApplicationName(String applicationName) {
+ this.applicationName = applicationName;
+ }
+
+ public void setRoleName(String roleName) {
+ this.roleName = roleName;
+ }
+
+ public String getRoleName() {
+ return roleName;
+ }
+}
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplication.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplication.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplication.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -170,7 +170,9 @@
className = "org.geomajas.command.interceptor." + className;
}
try {
- Class<?> interceptorClass = Class.forName(className);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class<?> interceptorClass = loader.loadClass(className);
CommandInterceptor ci = null;
try {
log.debug("createInterceptor() : trying (map) constructor");
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerManager.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerManager.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerManager.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -200,7 +200,9 @@
}
try {
- Class<?> factoryClass = Class.forName(factory);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class<?> factoryClass = loader.loadClass(factory);
return (LayerFactory) factoryClass.newInstance();
} catch (Exception e) {
log.error("createVectorLayerFactory() : could not create vector layer factory", e);
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerModelRegistry.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerModelRegistry.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerModelRegistry.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -74,7 +74,9 @@
className = "org.geomajas.layermodels." + className;
}
try {
- Class factoryClass = Class.forName(className);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class factoryClass = loader.loadClass(className);
LayerModelFactory factory = null;
try {
log.debug("lookupByJavaClass() : trying (id,map) constructor");
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -62,7 +62,9 @@
className = "org.geomajas.layermodels." + className;
}
try {
- Class factoryClass = Class.forName(className);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class factoryClass = loader.loadClass(className);
LayerFactory factory = null;
try {
log.debug("lookupByJavaClass() : trying map constructor");
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/Construction.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/Construction.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/Construction.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -23,9 +23,6 @@
package org.geomajas.core.util;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,37 +31,33 @@
private Construction() {}
/**
- * Private class that create an Object out of a class-name.
+ * Private class that create an object using the no-args constructor, for given class-name.
*
* @param className name of class to instantiate
- * @return Returns null if something went wrong.
+ * @return new object of class, null if something went wrong (logging the error)
*/
public static Object createObjectFromClassName(String className) {
try {
- Class<?> clazz = Class.forName(className);
- Constructor<?> c = clazz.getConstructor();
- return c.newInstance();
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = Construction.class.getClassLoader();
+ return loader.loadClass(className).newInstance();
} catch (ClassNotFoundException e) {
- log("given className " + className + " was not found", e);
+ log(className, "given className " + className + " was not found", e);
} catch (SecurityException e) {
- log("security exception", e);
- } catch (NoSuchMethodException e) {
- log("no constructors could be found", e);
+ log(className, "security exception", e);
} catch (IllegalArgumentException e) {
- log("illegal arguments were passed to the constructor", e);
+ log(className, "illegal arguments were passed to the constructor", e);
} catch (InstantiationException e) {
- log("error occurred during initialization", e);
+ log(className, "error occurred during initialization", e);
} catch (IllegalAccessException e) {
- log("error occurred during initialization", e);
- } catch (InvocationTargetException e) {
- log("error occurred during initialization", e);
+ log(className, "error occurred during initialization", e);
}
return null;
}
- private static void log( String msg, Throwable t ) {
+ private static void log( String name, String msg, Throwable t ) {
Logger log = LoggerFactory.getLogger(Construction.class);
- log.error("Could not create rendering strategy, " + msg + " : ", t.getMessage());
+ log.error("Could not create class " + name + ", " + msg + " : ", t.getMessage());
}
}
\ No newline at end of file
Modified: trunk/geomajas/geomajas-impl/src/main-ref/java/org/geomajas/server/layer/layermodels/LayerModelFactoryRegistry.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main-ref/java/org/geomajas/server/layer/layermodels/LayerModelFactoryRegistry.java 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/geomajas-impl/src/main-ref/java/org/geomajas/server/layer/layermodels/LayerModelFactoryRegistry.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -125,7 +125,9 @@
className = "org.geomajas.server.layer.layermodels." + className;
}
try {
- Class<?> factoryClass = Class.forName(className);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = Construction.class.getClassLoader();
+ Class<?> factoryClass = loader.loadClass(className);
LayerModelFactory factory;
try {
log.debug("lookupByJavaClass() : trying (id,map) constructor");
@@ -138,7 +140,6 @@
Constructor<?> c = factoryClass
.getConstructor(String.class);
factory = (LayerModelFactory) c.newInstance(name);
-
}
factories.put(name, factory);
} catch (InvocationTargetException e) {
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -15,11 +15,9 @@
<groupId>org.geomajas</groupId>
<artifactId>geomajas-api</artifactId>
</dependency>
- <!-- @todo this dependency should be removed when module split is complete -->
<dependency>
<groupId>org.geomajas</groupId>
<artifactId>geomajas-impl</artifactId>
- <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
Modified: trunk/geomajas/layermodels/geomajas-layermodel-google/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-google/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/layermodels/geomajas-layermodel-google/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -1,21 +1,29 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.geomajas.layermodels</groupId>
- <artifactId>geomajas-layermodel-google</artifactId>
- <packaging>jar</packaging>
- <name>Geomajas layer model using Google Maps</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.geomajas.layermodels</groupId>
+ <artifactId>geomajas-layermodel-google</artifactId>
+ <packaging>jar</packaging>
+ <name>Geomajas layer model using Google Maps</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
Modified: trunk/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -1,21 +1,60 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.geomajas.layermodels</groupId>
- <artifactId>geomajas-layermodel-hibernate</artifactId>
- <packaging>jar</packaging>
- <name>Geomajas layer model using hibernate</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.geomajas.layermodels</groupId>
+ <artifactId>geomajas-layermodel-hibernate</artifactId>
+ <packaging>jar</packaging>
+ <name>Geomajas layer model using hibernate</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-xml-binding</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernatespatial</groupId>
+ <artifactId>hibernate-spatial</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernatespatial</groupId>
+ <artifactId>hibernate-spatial-postgis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-cglib-repack</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
Modified: trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-25 11:44:58 UTC (rev 3800)
+++ trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -215,7 +215,9 @@
public Class<?> getSuperClass() throws IOException {
if (type.getExtends() != null) {
try {
- return Class.forName(type.getExtends());
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ return loader.loadClass(type.getExtends());
} catch (ClassNotFoundException e) {
throw new IOException("Superclass " + type.getExtends() + " not found");
}
Modified: trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java 2009-08-25 11:44:58 UTC (rev 3800)
+++ trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -248,7 +248,9 @@
@SuppressWarnings("unchecked")
private String getTableName() {
try {
- Class clazz = Class.forName(type.getName());
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ Class clazz = loader.loadClass(type.getName());
Table t = (Table) clazz.getAnnotation(Table.class);
if (t != null)
return t.name();
Modified: trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java 2009-08-25 11:44:58 UTC (rev 3800)
+++ trunk/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java 2009-08-26 05:21:29 UTC (rev 3802)
@@ -144,6 +144,8 @@
return type.getName();
}
});
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
if (type.getExtends() != null) {
String superName = allTypes.get(type.getExtends()).getName();
Class superClass = null;
@@ -151,7 +153,7 @@
superClass = createClass(allTypes.get(type.getExtends()));
} else {
try {
- superClass = Class.forName(superName);
+ superClass = loader.loadClass(superName);
} catch (ClassNotFoundException e) {
// cannot happen
}
@@ -174,7 +176,7 @@
String className = allTypes.get(association.getFeature()).getName();
if (classExists(className)) {
try {
- clazz = Class.forName(className);
+ clazz = loader.loadClass(className);
} catch (ClassNotFoundException e) {
// cannot happen
}
@@ -264,7 +266,9 @@
private boolean classExists(String name) {
try {
- Class.forName(name);
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (null == loader) loader = this.getClass().getClassLoader();
+ loader.loadClass(name);
return true;
} catch (Throwable t) {
return false;
Modified: trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -1,21 +1,29 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.geomajas.layermodels</groupId>
- <artifactId>geomajas-layermodel-openstreetmaps</artifactId>
- <packaging>jar</packaging>
- <name>Geomajas layer model using Openstreetmaps</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.geomajas.layermodels</groupId>
+ <artifactId>geomajas-layermodel-openstreetmaps</artifactId>
+ <packaging>jar</packaging>
+ <name>Geomajas layer model using Openstreetmaps</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
Modified: trunk/geomajas/layermodels/geomajas-layermodel-wms/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-wms/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/layermodels/geomajas-layermodel-wms/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -1,21 +1,29 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.geomajas.layermodels</groupId>
- <artifactId>geomajas-layermodel-wms</artifactId>
- <packaging>jar</packaging>
- <name>Geomajas layer model using WMS</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.geomajas.layermodels</groupId>
+ <artifactId>geomajas-layermodel-wms</artifactId>
+ <packaging>jar</packaging>
+ <name>Geomajas layer model using WMS</name>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
Modified: trunk/geomajas/pom.xml
===================================================================
--- trunk/geomajas/pom.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas/pom.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -305,6 +305,11 @@
<artifactId>geomajas-xml-binding</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<!--
<dependency>
Modified: trunk/geomajas-dojo-example/src/main/eclipse/build.xml
===================================================================
--- trunk/geomajas-dojo-example/src/main/eclipse/build.xml 2009-08-25 12:17:02 UTC (rev 3801)
+++ trunk/geomajas-dojo-example/src/main/eclipse/build.xml 2009-08-26 05:21:29 UTC (rev 3802)
@@ -21,7 +21,7 @@
</fileset>
<!-- mimick maven filtering !!! -->
<filterset begintoken="$${" endtoken="}">
- <filtersfile file="src/main/filters/eclipse.properties" />
+ <filtersfile file="src/main/eclipse/eclipse.properties" />
</filterset>
</copy>
</target>
|
Author: joachimvda
Date: 2009-08-25 13:44:58 +0200 (Tue, 25 Aug 2009)
New Revision: 3800
Added:
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/simple/
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/simple/Geomajas.java
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/simple/TestPage.java
trunk/geomajas-gwt-simple/src/main/resources/org/
trunk/geomajas-gwt-simple/src/main/resources/org/geomajas/
trunk/geomajas-gwt-simple/src/main/resources/org/geomajas/public/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasService.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasServiceAsync.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandDispatcher.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandRequest.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandResponse.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/core/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/core/CommandRequestImpl.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/geometry/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/geometry/Matrix.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/GraphicsContext.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Paintable.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Painter.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Circle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Rectangle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/painter/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/painter/CirclePainter.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/FontStyle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/LayerStyleDefinition.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/PictureStyle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/ShapeStyle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/Style.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/SymbolStyle.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/svg/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/svg/SVGGraphicsContext.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/vml/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/vml/VMLGraphicsContext.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/vml/decoder/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/vml/decoder/VmlPathDecoder.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/vml/decoder/VmlStyleDecoder.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/Camera.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/MapModel.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/MapView.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/SpatialCache.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/SpatialCode.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/SpatialNode.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/SpatialNodeFunction.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/tile/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/tile/Tile.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/cache/tile/TileCode.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/feature/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/feature/Feature.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/feature/FeatureFunction.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/layer/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/layer/Layer.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/map/layer/VectorLayer.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/util/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/util/DOM.java
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/widget/
trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/widget/MapWidget.java
Removed:
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/client/
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/Geomajas.java
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/gwt/TestPage.java
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/public/
trunk/geomajas-gwt-simple/src/main/resources/META-INF/
trunk/geomajas-gwt-simple/src/main/resources/commons-logging.properties
trunk/geomajas-gwt-simple/src/main/resources/log4j.properties
trunk/geomajas-gwt-simple/src/main/webapp/META-INF/
Modified:
trunk/geomajas-gwt-simple/pom.xml
trunk/geomajas-gwt-simple/src/main/java/org/geomajas/Geomajas.gwt.xml
trunk/geomajas/geomajas-gwt-client/pom.xml
Log:
MAJ-386 fix compilation problems
Modified: trunk/geomajas/geomajas-gwt-client/pom.xml
===================================================================
--- trunk/geomajas/geomajas-gwt-client/pom.xml 2009-08-25 10:47:41 UTC (rev 3799)
+++ trunk/geomajas/geomajas-gwt-client/pom.xml 2009-08-25 11:44:58 UTC (rev 3800)
@@ -11,11 +11,62 @@
<name>Geomajas gwt face, client side</name>
<dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <!-- @todo this dependency should be removed when module split is complete -->
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${gwt-version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${gwt-version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>${gwt-version}</version>
+ <classifier>${platform}-libs</classifier>
+ <type>zip</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>${gwt-version}</version>
+ <classifier>${platform}</classifier>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.smartgwt</groupId>
+ <artifactId>smartgwt</artifactId>
+ <version>${smartgwt-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.smartgwt</groupId>
+ <artifactId>smartgwt-skins</artifactId>
+ <version>${smartgwt-version}</version>
+ </dependency>
+
</dependencies>
</project>
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasService.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasService.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasService.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,50 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client;
+
+import org.geomajas.gwt.client.command.CommandResponse;
+import org.geomajas.gwt.client.command.CommandRequest;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+/**
+ * <p>
+ * Interface for the service object that is responsible for the communication
+ * between the geomajas client and server.
+ * </p>
+ *
+ * @author JanDM
+ */
+public interface GeomajasService extends RemoteService {
+
+ /**
+ * Execute a <code>CommandRequest</code>, and return the answer as a
+ * <code>CommandResponse</code>.
+ *
+ * @param command
+ * The command to be executed.
+ * @return The result.
+ */
+ public CommandResponse execute(CommandRequest command);
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasServiceAsync.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasServiceAsync.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/GeomajasServiceAsync.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,50 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client;
+
+import org.geomajas.gwt.client.command.CommandResponse;
+import org.geomajas.gwt.client.command.CommandRequest;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+/**
+ * <p>
+ * Interface for the service object that is responsible for the communication
+ * between the geomajas client and server.
+ * </p>
+ *
+ * @author JanDM
+ */
+public interface GeomajasServiceAsync {
+
+ /**
+ * Execute a <code>CommandRequest</code>, and return the answer as a
+ * <code>CommandResponse</code>.
+ *
+ * @param command
+ * The command to be executed.
+ * @return The result.
+ */
+ public void execute(CommandRequest command, AsyncCallback callback);
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandDispatcher.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandDispatcher.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandDispatcher.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.command;
+
+import org.geomajas.gwt.client.GeomajasService;
+import org.geomajas.gwt.client.GeomajasServiceAsync;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+
+public final class CommandDispatcher {
+
+ private static CommandDispatcher INSTANCE;
+
+ private GeomajasServiceAsync service;
+
+ private CommandDispatcher() {
+ service = (GeomajasServiceAsync) GWT.create(GeomajasService.class);
+ ServiceDefTarget endpoint = (ServiceDefTarget) service;
+ String moduleRelativeURL = GWT.getModuleBaseURL() + "service";
+ endpoint.setServiceEntryPoint(moduleRelativeURL);
+ }
+
+ public static CommandDispatcher getINSTANCE() {
+ if (INSTANCE == null) {
+ INSTANCE = new CommandDispatcher();
+ }
+ return INSTANCE;
+ }
+
+ public void execute(CommandRequest request, AsyncCallback<?> callback) {
+ service.execute(request, callback);
+ }
+}
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandRequest.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandRequest.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandRequest.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,48 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+package org.geomajas.gwt.client.command;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+public interface CommandRequest extends Serializable, IsSerializable {
+
+ String getCommandClassName();
+
+ void setCommandClassName(String commandClassName);
+
+ boolean addParameter(String name, Serializable value);
+
+ Object getParameter(String name);
+
+ /**
+ *
+ * @return
+ * @gwt.typeArgs<java.lang.String, java.io.Serializable>
+ */
+ Map<String, Serializable> getParameters();
+}
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandResponse.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandResponse.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/CommandResponse.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,92 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.command;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.google.gwt.user.client.rpc.IsSerializable;
+
+/**
+ * AbstractApplicationResult
+ *
+ * <p>
+ * Abstraction of a result object that is to be sent back to the client through
+ * the JSON protocol. This result object can either hold error-messages, or
+ * actual data.
+ * </p>
+ */
+public class CommandResponse implements Serializable, IsSerializable {
+
+ /**
+ * Serializable needs a serialVersionUID.
+ */
+ private static final long serialVersionUID = -339934764625760514L;
+
+ protected long id;
+
+ /**
+ * @gwt.typeArgs<java.lang.String>
+ */
+ protected List<String> errorMessages = null;
+
+ // Constructors:
+
+ public CommandResponse() {
+ errorMessages = new ArrayList<String>();
+ }
+
+ public CommandResponse(List<String> errorMessages) {
+ this.errorMessages = errorMessages;
+ }
+
+ // Class specific functions:
+
+ public void addErrorMessage(String message) {
+ errorMessages.add(message);
+ }
+
+ // Getters and setters:
+
+ public List<String> getErrorMessages() {
+ return errorMessages;
+ }
+
+ public void setErrorMessages(List<String> errorMessages) {
+ this.errorMessages = errorMessages;
+ }
+
+ public boolean isError() {
+ return errorMessages.size() > 0;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/core/CommandRequestImpl.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/core/CommandRequestImpl.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/command/core/CommandRequestImpl.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,88 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.command.core;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.geomajas.gwt.client.command.CommandRequest;
+
+@SuppressWarnings("serial")
+public class CommandRequestImpl implements CommandRequest {
+
+ /**
+ * The command's class-name.
+ */
+ private String commandClassName;
+
+ /**
+ * A list of parameters that the server side command requires in order to
+ * execute correctly.
+ *
+ * @gwt.typeArgs<java.lang.String, java.io.Serializable>
+ */
+ private Map<String, Serializable> parameters;
+
+ // Constructors:
+
+ /**
+ * Default constructor, that exists only to make this class serializable. It
+ * is not intended to be used.
+ */
+ public CommandRequestImpl() {
+ parameters = new HashMap<String, Serializable>();
+ }
+
+ /**
+ * A recommended constructor. Immediately sets the required command class
+ * name.
+ */
+ public CommandRequestImpl(String commandClassName) {
+ this.commandClassName = commandClassName;
+ parameters = new HashMap<String, Serializable>();
+ }
+
+ // CommandRequest implementation:
+
+ public String getCommandClassName() {
+ return commandClassName;
+ }
+
+ public void setCommandClassName(String commandClassName) {
+ this.commandClassName = commandClassName;
+ }
+
+ public Object getParameter(String name) {
+ return parameters.get(name);
+ }
+
+ public boolean addParameter(String name, Serializable value) {
+ return true;
+ }
+
+ public Map<String, Serializable> getParameters() {
+ return parameters;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/geometry/Matrix.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/geometry/Matrix.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/geometry/Matrix.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,109 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.geometry;
+
+/**
+ * <p>
+ * A very simple matrix class, that is actually nothing more the a POJO object.
+ * </p>
+ * <p>
+ * TODO: Should we not make a more useful matrix class?
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public class Matrix {
+
+ private double xx;
+
+ private double xy;
+
+ private double yx;
+
+ private double yy;
+
+ private double dx;
+
+ private double dy;
+
+ // Constructors:
+
+ /**
+ * The default contructor initializes everything to 0.
+ */
+ public Matrix() {
+ this.xx = 0;
+ this.xy = 0;
+ this.yx = 0;
+ this.yy = 0;
+ this.dx = 0;
+ this.dy = 0;
+ }
+
+ /**
+ * Initialize this matrix with all it's fields.
+ *
+ * @param xx
+ * @param xy
+ * @param yx
+ * @param yy
+ * @param dx
+ * @param dy
+ */
+ public Matrix(double xx, double xy, double yx, double yy, double dx,
+ double dy) {
+ this.xx = xx;
+ this.xy = xy;
+ this.yx = yx;
+ this.yy = yy;
+ this.dx = dx;
+ this.dy = dy;
+ }
+
+ // Getters:
+
+ public double getXx() {
+ return xx;
+ }
+
+ public double getXy() {
+ return xy;
+ }
+
+ public double getYx() {
+ return yx;
+ }
+
+ public double getYy() {
+ return yy;
+ }
+
+ public double getDx() {
+ return dx;
+ }
+
+ public double getDy() {
+ return dy;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/GraphicsContext.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/GraphicsContext.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/GraphicsContext.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,119 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx;
+
+import java.util.Map;
+
+import org.geomajas.gwt.client.gfx.paintable.Circle;
+import org.geomajas.gwt.client.gfx.paintable.Rectangle;
+
+public interface GraphicsContext {
+
+ public String init();
+
+ /**
+ * Draw directly (implementation-specific shortcut)
+ */
+ public void drawData(String data, Map<String, ?> options);
+
+ /**
+ * Draw a certain group of objects.
+ */
+ public void drawGroup(Map<String, ?> options);
+
+ /**
+ * Draw a line.
+ */
+ public void drawLine(Paintable line, Map<String, ?> options);
+
+ /**
+ * Draw a polygon.
+ */
+ public void drawPolygon(Paintable polygon, Map<String, ?> options);
+
+ /**
+ * Draw a rectangle.
+ */
+ public void drawRectangle(Rectangle rectangle, Map<String, ?> options);
+
+ /**
+ * Draw a circle.
+ */
+ public void drawCircle(Circle circle, Map<String, ?> options);
+
+ /**
+ * Draw a symbol/point object.
+ */
+ public void drawSymbol(Paintable symbol, Map<String, ?> options);
+
+ /**
+ * Draw an image (from gif/jpg/png/...).
+ */
+ public void drawImage(Paintable image, Map<String, ?> options);
+
+ /**
+ * Draw some text on the screen.
+ */
+ public void drawText(Paintable text, Map<String, ?> options);
+
+ /**
+ * Draw a type (def/symbol for svg, shapetype for vml)
+ */
+ public void drawShapeType(Map<String, ?> options);
+
+ /**
+ * Delete the shape with the specified id.
+ */
+ public void deleteShape(String id, boolean childrenOnly);
+
+ /**
+ * Set a specific cursor type.
+ *
+ * @param elementID
+ * optional. If not used, the cursor will be applied on the
+ * entire map.
+ */
+ public void setCursor(String cursor, String elementID);
+
+ /**
+ * Set the background color.
+ */
+ public void setBackgroundColor(String color);
+
+ /**
+ * Hide something with the given id
+ */
+ public void hide(String id);
+
+ /**
+ * Unhide something with the given id
+ */
+ public void unhide(String id);
+
+ public void setSize(int width, int height);
+
+ public int getWidth();
+
+ public int getHeight();
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Paintable.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Paintable.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Paintable.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx;
+
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * <p>
+ * Definition of an object that can be painted on a <code>GraphicsContext</code>
+ * . The painting is orchestrated by a <code>PainterVisitor</code> which visits
+ * registered painters, who in turn know when to call the paintable's accept
+ * functions.
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public interface Paintable {
+
+ /**
+ * A preferebly unique ID that identifies the object even after it is
+ * painted. This can later be used to update or delete it from the
+ * <code>GraphicsContext</code>.
+ *
+ * @return
+ */
+ public String getId();
+
+ /**
+ * The accept function. Usually it simply calls the visitor's visit
+ * function. But sometimes, more needs to be done.
+ *
+ * @param visitor
+ * The visitor
+ * @param bounds
+ * ????
+ * @param recursive
+ * Should the painting be a recursive operation (accept -> visit
+ * -> paint -> accept, ...)
+ */
+ public void accept(PainterVisitor visitor, Envelope bounds, boolean recursive);
+}
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Painter.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Painter.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/Painter.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx;
+
+/**
+ * <p>
+ * General interface for painters. Implementations of this class can paint
+ * <code>Paintable</code> objects in a <code>GraphicsContext</code>, or delete
+ * them.
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public interface Painter {
+
+ /**
+ * Paint a <code>Paintable</code> object on the given
+ * <code>GraphicsContext</code>. It the object already exists, it will be
+ * updated.
+ *
+ * @param paintable
+ * The object to be painted.
+ * @param graphics
+ * The context to paint on.
+ */
+ public void paint(Paintable paintable, GraphicsContext graphics);
+
+ /**
+ * Delete a <code>Paintable</code> object from the given
+ * <code>GraphicsContext</code>. It the object does not exist, nothing will
+ * be done.
+ *
+ * @param paintable
+ * The object to be painted.
+ * @param graphics
+ * The context to paint on.
+ */
+ public void deleteShape(Paintable paintable, GraphicsContext graphics);
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/PainterVisitor.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,146 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * Visitor pattern implementation for painters.
+ * </p>
+ *
+ * @author JanDM
+ */
+public class PainterVisitor {
+
+ /**
+ * The context on which all painters registered here should be applied.
+ */
+ private GraphicsContext graphics;
+
+ /**
+ * Dictionary of registered painters. It is possible that more then one
+ * painter is registered for a certain type of object.
+ */
+ private Map<String, List<Painter>> painters;
+
+ /**
+ * This class should always be initialized with a
+ * <code>GraphicsContext</code> object, since all painters registered here
+ * will apply their painting skills on it.
+ *
+ * @param graphics
+ * Implementation of the GraphicsContext interface.
+ */
+ public PainterVisitor(GraphicsContext graphics) {
+ this.graphics = graphics;
+ this.painters = new HashMap<String, List<Painter>>();
+ }
+
+ /**
+ * Register a new painter to this visitor.
+ *
+ * @param className
+ * Each painter is designed to paint a specific type of object.
+ * @param painter
+ * The painter itself.
+ */
+ public void registerPainter(String className, Painter painter) {
+ if (painters.containsKey(className)) {
+ List<Painter> list = painters.remove(className);
+ list.add(painter);
+ this.painters.put(className, list);
+ } else {
+ List<Painter> list = new ArrayList<Painter>();
+ list.add(painter);
+ this.painters.put(className, list);
+ }
+ }
+
+ /**
+ * Unregister an existing painter from this visitor.
+ *
+ * @param className
+ * Each painter is designed to paint a specific type of object.
+ * @param painter
+ * The painter itself.
+ */
+ public void unregisterPainter(String className, Painter painter) {
+ if (painters.containsKey(className)) {
+ List<Painter> list = painters.remove(className);
+ if (list.size() > 1) {
+ list.remove(painter);
+ painters.put(className, list);
+ }
+ }
+ }
+
+ /**
+ * The visitors visit function.
+ *
+ * @param paintable
+ */
+ public void visit(Paintable paintable) {
+ String className = paintable.getClass().getName();
+ if (painters.containsKey(className)) {
+ List<Painter> list = painters.get(className);
+ for (Painter painter : list) {
+ painter.paint(paintable, graphics);
+ }
+ }
+ }
+
+ /**
+ * Remove a paintable object from the graphics.
+ *
+ * @param paintable
+ */
+ public void remove(Paintable paintable) {
+ String className = paintable.getClass().getName();
+ if (painters.containsKey(className)) {
+ List<Painter> list = painters.get(className);
+ for (Painter painter : list) {
+ painter.deleteShape(paintable, graphics);
+ }
+ }
+ }
+
+ /**
+ * Retrieve the full list of painters for a specific type of paintable
+ * object.
+ *
+ * @param paintable The type of object to retrieve painters for.
+ * @return Return a list of painters, or null.
+ */
+ public List<Painter> getPaintersForObject(Paintable paintable) {
+ String className = paintable.getClass().getName();
+ if (painters.containsKey(className)) {
+ return painters.get(className);
+ }
+ return null;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Circle.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Circle.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Circle.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,125 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx.paintable;
+
+import org.geomajas.gwt.client.gfx.Paintable;
+import org.geomajas.gwt.client.gfx.PainterVisitor;
+import org.geomajas.gwt.client.gfx.style.ShapeStyle;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * <p>
+ * A circle that can be drawn onto a <code>GraphicsContext
+ * </p>
+ * . It therefore implements the <code>Paintable</code> interface.
+ *
+ * @author Pieter De Graef
+ */
+public class Circle implements Paintable {
+
+ /**
+ * A preferebly unique ID that identifies the object even after it is
+ * painted. This can later be used to update or delete it from the
+ * <code>GraphicsContext</code>.
+ */
+ private String id;
+
+ /**
+ * A circle needs to be drawn at a certain location.
+ */
+ private Coordinate position;
+
+ /**
+ * Radius of the circle.
+ */
+ private float radius;
+
+ /**
+ * The styling object.
+ */
+ private ShapeStyle style;
+
+ // Constructors:
+
+ /**
+ * constructor setting the id.
+ */
+ public Circle(String id) {
+ this.id = id;
+ }
+
+ // Paintable implementation:
+
+ /**
+ * Everything that can be drawn on the map, must be accessible by a
+ * PainterVisitor!
+ *
+ * @param visitor
+ * A PainterVisitor object. Comes from a MapWidget.
+ * @param bounds
+ * Not used here.
+ * @param recursive
+ * Not used here.
+ */
+ public void accept(PainterVisitor visitor, Envelope bounds,
+ boolean recursive) {
+ visitor.visit(this);
+ }
+
+ // Getters and setters:
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Coordinate getPosition() {
+ return position;
+ }
+
+ public void setPosition(Coordinate position) {
+ this.position = position;
+ }
+
+ public float getRadius() {
+ return radius;
+ }
+
+ public void setRadius(float radius) {
+ this.radius = radius;
+ }
+
+ public ShapeStyle getStyle() {
+ return style;
+ }
+
+ public void setStyle(ShapeStyle style) {
+ this.style = style;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Rectangle.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Rectangle.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/paintable/Rectangle.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,139 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx.paintable;
+
+import org.geomajas.gwt.client.gfx.Paintable;
+import org.geomajas.gwt.client.gfx.PainterVisitor;
+import org.geomajas.gwt.client.gfx.style.ShapeStyle;
+
+import com.vividsolutions.jts.geom.Coordinate;
+import com.vividsolutions.jts.geom.Envelope;
+
+/**
+ * <p>
+ * Implementation of the <code>Paintable</code> interface for drawing
+ * rectangles. It is only usefull as a rendering object, do not use this as a
+ * bounding box.
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public class Rectangle implements Paintable {
+
+ /**
+ * A preferebly unique ID that identifies the object even after it is
+ * painted. This can later be used to update or delete it from the
+ * <code>GraphicsContext</code>.
+ */
+ private String id;
+
+ /**
+ * Every rectangle has a starting point. This is it.
+ */
+ private Coordinate position;
+
+ /**
+ * The rectangle's width.
+ */
+ private int width;
+
+ /**
+ * The rectangle's height.
+ */
+ private int height;
+
+ /**
+ * A style object that determines the look.
+ */
+ private ShapeStyle style;
+
+ // Constructors:
+
+ public Rectangle() {
+ }
+
+ public Rectangle(String id) {
+ this.id = id;
+ }
+
+ // Paintable implementation:
+
+ /**
+ * Everything that can be drawn on the map, must be accessible by a
+ * PainterVisitor!
+ *
+ * @param visitor
+ * A PainterVisitor object. Comes from a MapWidget.
+ * @param bounds
+ * Not used here.
+ * @param recursive
+ * Not used here.
+ */
+ public void accept(PainterVisitor visitor, Envelope bounds,
+ boolean recursive) {
+ visitor.visit(this);
+ }
+
+ // Getters and setters:
+
+ public String getId() {
+ return id;
+ }
+
+ public Coordinate getPosition() {
+ return position;
+ }
+
+ public void setPosition(Coordinate position) {
+ this.position = position;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public void setWidth(int width) {
+ this.width = width;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+ public ShapeStyle getStyle() {
+ return style;
+ }
+
+ public void setStyle(ShapeStyle style) {
+ this.style = style;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/painter/CirclePainter.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/painter/CirclePainter.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/painter/CirclePainter.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx.painter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.geomajas.gwt.client.gfx.GraphicsContext;
+import org.geomajas.gwt.client.gfx.Paintable;
+import org.geomajas.gwt.client.gfx.Painter;
+import org.geomajas.gwt.client.gfx.paintable.Circle;
+
+/**
+ * <p>
+ * Painter implementation for circles.
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public class CirclePainter implements Painter {
+
+ /**
+ * Empty default constructor.
+ */
+ public CirclePainter() {
+ }
+
+ /**
+ * The actual painting function. Draws the circles with the object's id.
+ *
+ * @param object
+ * A Circle object.
+ * @param graphics
+ * A GraphicsContext object, responsible for actual drawing.
+ */
+ public void paint(Paintable paintable, GraphicsContext graphics) {
+ Circle circle = (Circle) paintable;
+ Map<String, Object> options = new HashMap<String, Object>();
+ options.put("id", circle.getId());
+ options.put("style", circle.getStyle());
+ graphics.drawCircle(circle, options);
+ }
+
+ /**
+ * Delete a <code>Paintable</code> object from the given
+ * <code>GraphicsContext</code>. It the object does not exist, nothing will
+ * be done.
+ *
+ * @param paintable
+ * The object to be painted.
+ * @param graphics
+ * The context to paint on.
+ */
+ public void deleteShape(Paintable paintable, GraphicsContext graphics) {
+ graphics.deleteShape(paintable.getId(), false);
+ }
+}
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/FontStyle.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/FontStyle.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/FontStyle.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,155 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx.style;
+
+/**
+ * <p>
+ * Style object used for fonts on the map.
+ * </p>
+ * <p>
+ * TODO: should be an extension of ShapeStyle, because it needs a fill,
+ * fill-opacity, stroke, stroke-opacity,....
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public class FontStyle implements Style {
+
+ /**
+ * The color to be used as background color. Must be an HTML color code (red
+ * = #FF0000).
+ */
+ private String fillColor = null;
+
+ /**
+ * Integer size of the fonts drawn with this style.
+ */
+ private int fontSize = -1;
+
+ /**
+ * Type of font. i.e. "Arial", "Verdana", ...
+ */
+ private String fontFamily = null;
+
+ /**
+ * Either "normal" or "bold".
+ */
+ private String fontWeight = null;
+
+ /**
+ * The style of the font: "normal", "italic", or "underline".
+ */
+ private String fontStyle = null;
+
+ // Constructors:
+
+ /**
+ * Style object for graphics fonts. Initialize it immediatly with all it's
+ * fields.
+ *
+ * @param fillColor
+ * HTML color code determining font color.
+ * @param fontSize
+ * Integer value determining font size.
+ * @param fontFamily
+ * String determining the font.
+ * @param fontWeight
+ * Weight: normal, bold.
+ * @param fontStyle
+ * The font style: normal, italic, underline.
+ */
+ public FontStyle(String fillColor, int fontSize, String fontFamily,
+ String fontWeight, String fontStyle) {
+ this.fillColor = fillColor;
+ this.fontSize = fontSize;
+ this.fontFamily = fontFamily;
+ this.fontWeight = fontWeight;
+ this.fontStyle = fontStyle;
+ }
+
+ /**
+ * Initialize this style object with another, copying it's values.
+ *
+ * @param other
+ * The other style object from who to copy the field values.
+ */
+ public FontStyle(FontStyle other) {
+ this.fillColor = other.fillColor;
+ this.fontSize = other.fontSize;
+ this.fontFamily = other.fontFamily;
+ this.fontWeight = other.fontWeight;
+ this.fontStyle = other.fontStyle;
+ }
+
+ // Other functions:
+
+ /**
+ * Return a clone of this style object.
+ */
+ public Object clone() {
+ return new FontStyle(this);
+ }
+
+ // Getters and setters:
+
+ public String getFillColor() {
+ return fillColor;
+ }
+
+ public void setFillColor(String fillColor) {
+ this.fillColor = fillColor;
+ }
+
+ public int getFontSize() {
+ return fontSize;
+ }
+
+ public void setFontSize(int fontSize) {
+ this.fontSize = fontSize;
+ }
+
+ public String getFontFamily() {
+ return fontFamily;
+ }
+
+ public void setFontFamily(String fontFamily) {
+ this.fontFamily = fontFamily;
+ }
+
+ public String getFontWeight() {
+ return fontWeight;
+ }
+
+ public void setFontWeight(String fontWeight) {
+ this.fontWeight = fontWeight;
+ }
+
+ public String getFontStyle() {
+ return fontStyle;
+ }
+
+ public void setFontStyle(String fontStyle) {
+ this.fontStyle = fontStyle;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/LayerStyleDefinition.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/LayerStyleDefinition.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/LayerStyleDefinition.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,110 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applications.
+ *
+ * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package org.geomajas.gwt.client.gfx.style;
+
+/**
+ * <p>
+ * Styling definition for a layer.
+ * </p>
+ *
+ * @author Pieter De Graef
+ */
+public class LayerStyleDefinition {
+
+ /**
+ * A unique identifier for the style definition.
+ */
+ private int id;
+
+ /**
+ * A label, to be used in the legend.
+ */
+ private String label;
+
+ /**
+ * A filter features must accept.
+ */
+ private String formula;
+
+ /**
+ * The actual style object.
+ */
+ private ShapeStyle style;
+
+ // Constructors:
+
+ /**
+ * @class Configuration object that defines styles for a layer object.
+ * @author Pieter De Graef
+ *
+ * @constructor
+ * @param id
+ * Unique identifier.
+ * @param label
+ * The style's label.
+ * @param style
+ * A Style object.
+ */
+ public LayerStyleDefinition(int id, String label, String formula,
+ ShapeStyle style) {
+ this.id = id;
+ this.label = label;
+ this.formula = formula;
+ this.style = style;
+ }
+
+ // Getters and setters:
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getFormula() {
+ return formula;
+ }
+
+ public void setFormula(String formula) {
+ this.formula = formula;
+ }
+
+ public ShapeStyle getStyle() {
+ return style;
+ }
+
+ public void setStyle(ShapeStyle style) {
+ this.style = style;
+ }
+}
\ No newline at end of file
Added: trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/PictureStyle.java
===================================================================
--- trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/PictureStyle.java (rev 0)
+++ trunk/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/gwt/client/gfx/style/PictureStyle.java 2009-08-25 11:44:58 UTC (rev 3800)
@@ -0,0 +1,83 @@
+/*
+ * This file is part of Geomajas, a component framework for building
+ * rich Internet applications (RIA) with sophisticated capabilities for the
+ * display, analysis and management of geographic information.
+ * It is a building block that allows developers to add maps
+ * and other geographic data capabilities to their web applic...
[truncated message content] |
|
From: <sv...@ge...> - 2009-08-25 20:24:41
|
Author: kristofh
Date: 2009-08-25 14:17:02 +0200 (Tue, 25 Aug 2009)
New Revision: 3801
Removed:
branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/util/CQLFilterUtils.java
Modified:
branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
Log:
cqlfilter niet eerst nog naar toString (voor parseproblemen)
Modified: branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-25 11:44:58 UTC (rev 3800)
+++ branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-25 12:17:02 UTC (rev 3801)
@@ -31,9 +31,6 @@
import org.geomajas.core.aaa.policy.PermissionResult;
import org.geomajas.core.aaa.policy.Resource;
import org.geomajas.core.aaa.policy.SecurityManager;
-import org.geomajas.core.filters.FilterCreator;
-import org.geomajas.core.filters.cql.CQLException;
-import org.geomajas.core.util.CQLFilterUtils;
import org.geomajas.core.util.StringUtils;
/**
@@ -83,8 +80,7 @@
securityFilter = StringUtils.substituteParameters(pr.filter, userContext.getUser()
.getRoleProperties());
if (fltr != null) {
- securityFilter = CQLFilterUtils.toString(FilterCreator.createLogicFilter(CQLFilterUtils.toFilter(fltr), "and",
- CQLFilterUtils.toFilter(securityFilter)));
+ securityFilter = securityFilter + " AND " + fltr;
logger.debug("FilterString: " + securityFilter);
}
setFilter(securityFilter);
@@ -93,9 +89,6 @@
+ iae.getMessage() + ")",
"Failed parsing filter, user does not have a required property: "
+ iae.getMessage());
- } catch (CQLException e) {
- return setErrorResult("Fout bij filteren! (" + this.getClass().getSimpleName() + ")",
- "Failed parsing filter: " + e.getMessage());
}
}
return true;
Deleted: branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/util/CQLFilterUtils.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/util/CQLFilterUtils.java 2009-08-25 11:44:58 UTC (rev 3800)
+++ branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/util/CQLFilterUtils.java 2009-08-25 12:17:02 UTC (rev 3801)
@@ -1,26 +0,0 @@
-package org.geomajas.core.util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.geomajas.core.filters.cql.CQL;
-import org.geomajas.core.filters.cql.CQLException;
-import org.opengis.filter.Filter;
-
-public class CQLFilterUtils {
-
- private static final Log logger = LogFactory.getLog(CQLFilterUtils.class);
-
- private static final String p = "\\[|\\]";
-
- public static final String toString(Filter filter) {
- String value = filter.toString();
- value = value.replaceAll(p, "");
- return value;
- }
-
- public static final Filter toFilter(String expression) throws CQLException {
- if (expression != null && expression.startsWith("[") && expression.endsWith("]"))
- expression = expression.substring(1, expression.length() - 1);
- return CQL.toFilter(expression);
- }
-}
|
|
From: <sv...@ge...> - 2009-08-25 11:47:29
|
Author: anb
Date: 2009-08-25 12:47:41 +0200 (Tue, 25 Aug 2009)
New Revision: 3799
Modified:
branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
Log:
make more robust against override of toString(), should follow standard implementation (returning <classname>@)
Modified: branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-25 09:05:17 UTC (rev 3798)
+++ branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-25 10:47:41 UTC (rev 3799)
@@ -522,7 +522,7 @@
if (cmd == null) { // In case of a lazy loaded object
String tmp = feature.toString();
int pos = tmp.indexOf("@");
- cmd = getSessionFactory().getClassMetadata(tmp.substring(0, pos));
+ if (pos > 0) cmd = getSessionFactory().getClassMetadata(tmp.substring(0, pos));
}
if (cmd == null) { // an embedded object ?
try {
|
Author: joachimvda
Date: 2009-08-25 11:05:17 +0200 (Tue, 25 Aug 2009)
New Revision: 3798
Removed:
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/Map.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/
Modified:
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplicationCatalog.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/AbstractLayer.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultLayerTreeNode.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultRasterImage.java
trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultVectorLayer.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
Log:
MAJ-386 fix compilation problems
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -28,12 +28,12 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.geomajas.configuration.ConfigurationException;
import org.geomajas.core.aaa.policy.hibernate.HibernateUserContextManager;
import org.geomajas.core.application.Application;
import org.geomajas.core.application.ApplicationCatalog;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The <code>ApplicationController</code> is the main command execution center.
@@ -49,8 +49,7 @@
/**
* Logger.
*/
- private static final Log logger = LogFactory
- .getLog(DefaultApplicationController.class.getName());
+ private final Logger log = LoggerFactory.getLogger(DefaultApplicationController.class);
/**
* Bean name in jsp
@@ -117,7 +116,7 @@
* @return
*/
public ApplicationResult execute(String urlParam, ApplicationCommand command)
- throws IOException, ConfigurationException {
+ throws IOException, ConfigurationException {
if (applicationCatalog != null) {
Application application = applicationCatalog
.getApplication(urlParam);
@@ -127,17 +126,15 @@
}
}
- private ApplicationResult execute(Application application,
- ApplicationCommand command) throws IOException,
- ConfigurationException {
+ private ApplicationResult execute(Application application, ApplicationCommand command)
+ throws IOException, ConfigurationException {
Date begin = new Date();
interceptors = application.getCommandInterceptors(); // Quickfix !!
Long id = new Long(++commandCount);
command.setId(id);
this.commands.put(command.getId(), command);
- logger.info("Executing command: " + command + "with id="
- + command.getId());
+ log.info("Executing command: " + command + "with id=" + command.getId());
command.setApplication(application);
// -- interceptor before
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplicationCatalog.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplicationCatalog.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultApplicationCatalog.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -28,11 +28,11 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.geomajas.configuration.ConfigurationException;
import org.geomajas.configuration.ConfigurationParser;
import org.geomajas.configuration.MajasObjectFactory;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
/**
* <p>
@@ -52,7 +52,7 @@
/**
* Logger.
*/
- private static final Log logger = LogFactory.getLog(DefaultApplicationCatalog.class);
+ private final Logger log = LoggerFactory.getLogger(DefaultApplicationCatalog.class);
/**
* Mapping the application url to the application.
@@ -74,7 +74,7 @@
* @return
*/
public void readConfig(String applicationsDir) throws ConfigurationException {
- logger.debug("readConfig() : reading configuration " + applicationsDir);
+ log.debug("readConfig() : reading configuration {}", applicationsDir);
ConfigurationParser parser = new ConfigurationParser(new MajasObjectFactory(),
"org.geomajas.schemas.configuration", "geomajas-application.xsd");
@@ -85,14 +85,14 @@
for (int i = 0; i < files.length; i++) {
File applicationDir = files[i];
File config = new File(applicationDir.getAbsolutePath() + File.separator + "application.xml");
- logger.debug("readConfig() : loading configuration from " + config.getAbsolutePath());
+ log.debug("readConfig() : loading configuration from {}", config.getAbsolutePath());
DefaultApplication app = (DefaultApplication) parser.parseConfiguration(config
.getAbsolutePath());
app.setId(config.getName());
app.setApplicationDir(applicationDir.getAbsolutePath());
parser.finishConfiguration(app, null);
applications.put(app.getUrl(), app);
- logger.debug("readConfig() : application " + app.getName() + " added");
+ log.debug("readConfig() : application {} added", app.getName());
}
}
}
Deleted: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/Map.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/Map.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/Map.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -1,54 +0,0 @@
-/*
- * This file is part of Geomajas, a component framework for building
- * rich Internet applications (RIA) with sophisticated capabilities for the
- * display, analysis and management of geographic information.
- * It is a building block that allows developers to add maps
- * and other geographic data capabilities to their web applications.
- *
- * Copyright 2008-2009 Geosparc, http://www.geosparc.com, Belgium
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package org.geomajas.core.application;
-
-import java.io.IOException;
-
-import org.geomajas.core.application.layertree.Layer;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-
-import com.vividsolutions.jts.geom.GeometryFactory;
-
-public interface Map {
-
- /**
- * Return the <code>Layer</code> that corresponds to the given name.
- *
- * @param layerId
- * @return
- */
- public abstract Layer getLayer(String layerId);
-
- /**
- * Get the <code>LayerManager</code>.
- */
- public abstract LayerManager getLayerManager();
-
- public abstract CoordinateReferenceSystem getDefaultCrs() throws IOException;
-
- public Integer getPrecision();
-
- public String getId();
-
- public GeometryFactory getGeometryFactory();
-}
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/AbstractLayer.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/AbstractLayer.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/AbstractLayer.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -27,7 +27,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.geomajas.core.application.Map;
-import org.geomajas.core.application.layertree.Layer;
import org.geomajas.core.util.GeoUtil;
import org.geomajas.schemas.configuration.BaseLayerInfo;
import org.geomajas.schemas.configuration.BaseLayerInfo.MaxExtent;
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultLayerTreeNode.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultLayerTreeNode.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultLayerTreeNode.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -29,8 +29,6 @@
import org.geomajas.configuration.JAXBConfigurable;
import org.geomajas.core.application.LayerManager;
import org.geomajas.core.application.Map;
-import org.geomajas.core.application.layertree.Layer;
-import org.geomajas.core.application.layertree.LayerTreeNode;
import org.geomajas.core.json.JSON;
import org.geomajas.schemas.configuration.LayerTreeNodeConfig;
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultRasterImage.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultRasterImage.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultRasterImage.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -22,8 +22,6 @@
*/
package org.geomajas.core.application.layertree;
-import org.geomajas.core.application.layertree.RasterImage;
-
import com.vividsolutions.jts.geom.Envelope;
/**
Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultVectorLayer.java
===================================================================
--- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultVectorLayer.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/DefaultVectorLayer.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -32,8 +32,6 @@
import org.slf4j.LoggerFactory;
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.Map;
-import org.geomajas.core.application.layertree.LayerTreeNode;
-import org.geomajas.core.application.layertree.VectorLayer;
import org.geomajas.core.rendering.LayerPaintContextImpl;
import org.geomajas.core.rendering.LayerPaintContext;
import org.geomajas.core.rendering.painters.feature.FeaturePainter;
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-25 09:05:17 UTC (rev 3798)
@@ -1,34 +1,35 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.geomajas.layermodels</groupId>
- <artifactId>geomajas-layermodel-geotools</artifactId>
- <packaging>jar</packaging>
- <name>Geomajas layer model using Geotools</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.geomajas.layermodels</groupId>
+ <artifactId>geomajas-layermodel-geotools</artifactId>
+ <packaging>jar</packaging>
+ <name>Geomajas layer model using Geotools</name>
- <dependencies>
- <dependency>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.geomajas</groupId>
- <artifactId>geomajas-impl</artifactId>
- <version>1.5.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.geotools</groupId>
- <artifactId>gt2-main</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
+ <dependencies>
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-api</artifactId>
+ </dependency>
+ <!-- @todo this dependency should be removed when module split is complete -->
+ <dependency>
+ <groupId>org.geomajas</groupId>
+ <artifactId>geomajas-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.geotools</groupId>
+ <artifactId>gt2-main</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -26,20 +26,20 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.feature.FeatureModel;
import org.geomajas.core.util.GeoUtil;
import org.geomajas.layermodels.shapeinmem.FeatureSourceRetriever;
import org.geotools.data.DataStore;
import org.geotools.feature.Feature;
import org.geotools.feature.IllegalAttributeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.vividsolutions.jts.geom.Geometry;
public class GeotoolsFeatureModel extends FeatureSourceRetriever implements FeatureModel {
- private static final Log log = LogFactory.getLog(GeotoolsFeatureModel.class);
+ private final Logger log = LoggerFactory.getLogger(GeotoolsFeatureModel.class);
private int srid;
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -31,8 +31,6 @@
import java.util.NoSuchElementException;
import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.geomajas.command.interceptor.GeotoolsTransactionInterceptor;
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.LayerModelFactory;
@@ -52,12 +50,14 @@
import org.opengis.filter.FilterFactory;
import org.opengis.filter.Id;
import org.opengis.filter.identity.Identifier;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
import com.vividsolutions.jts.geom.Envelope;
public class GeotoolsLayerModel extends FeatureSourceRetriever implements LayerModel {
- private static final Log logger = LogFactory.getLog(GeotoolsLayerModel.class);
+ private final Logger log = LoggerFactory.getLogger(GeotoolsLayerModel.class);
private FilterFactory filterFactory;
@@ -83,10 +83,10 @@
store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
Set<?> ids = store.addFeatures(col);
String newId = (String) ids.iterator().next();
- logger.debug("Created feature " + newId + " in " + getFeatureSourceName());
+ log.debug("Created feature {} in {}", newId, getFeatureSourceName());
return read(newId);
} else {
- logger.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
+ log.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
+ source.getClass().getName() + " does not implement FeatureStore");
throw new IOException("Create or update not implemented");
}
@@ -112,10 +112,9 @@
store.modifyFeatures(at, attrList.toArray(), (org.geotools.filter.Filter) filter);
store.modifyFeatures(store.getSchema().getDefaultGeometry(), getFeatureModel().getGeometry(
feature), (org.geotools.filter.Filter) filter);
- logger.debug("Updated feature " + filter.getIDs().iterator().next() + " in "
- + getFeatureSourceName());
+ log.debug("Updated feature {} in {}", filter.getIDs().iterator().next(), getFeatureSourceName());
} else {
- logger.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
+ log.error("Don't know how to create or update " + getFeatureSourceName() + ", class "
+ source.getClass().getName() + " does not implement FeatureStore");
throw new IOException("Create or update not implemented");
}
@@ -130,10 +129,9 @@
store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
// TODO: is there a non-deprecated way to delete features ?????
store.removeFeatures((org.geotools.filter.Filter) filter);
- logger.debug("Deleted feature " + filter.getIDs().iterator().next() + " in "
- + getFeatureSourceName());
+ log.debug("Deleted feature {} in {}", filter.getIDs().iterator().next(), getFeatureSourceName());
} else {
- logger.error("Don't know how to delete from " + getFeatureSourceName() + ", class "
+ log.error("Don't know how to delete from " + getFeatureSourceName() + ", class "
+ source.getClass().getName() + " does not implement FeatureStore");
throw new IOException("Delete not implemented");
}
Modified: trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
===================================================================
--- trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-25 08:06:56 UTC (rev 3797)
+++ trunk/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-25 09:05:17 UTC (rev 3798)
@@ -31,8 +31,6 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.AbstractLayerModelFactory;
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.LayerModelFactory;
@@ -44,10 +42,12 @@
import org.geotools.data.jdbc.JDBCDataStore;
import org.geotools.data.postgis.PostgisDataStore;
import org.opengis.filter.Filter;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
public class GeotoolsLayerModelFactory extends AbstractLayerModelFactory {
- private static final Log logger = LogFactory.getLog(GeotoolsLayerModelFactory.class);
+ private final Logger log = LoggerFactory.getLogger(GeotoolsLayerModelFactory.class);
private DataStore store;
@@ -90,7 +90,7 @@
}
public LayerModel createLayerModel(FeatureType featureType) throws IOException {
- logger.debug("createLayerModel() : creating layermodel for " + featureType.getName());
+ log.debug("createLayerModel() : creating layermodel for {}", featureType.getName());
return new GeotoolsLayerModel(this, getDataStore(), featureType);
}
|
Author: joachimvda Date: 2009-08-25 10:06:56 +0200 (Tue, 25 Aug 2009) New Revision: 3797 Modified: trunk/geomajas/geomajas-api/pom.xml trunk/geomajas/geomajas-dojo-client/pom.xml trunk/geomajas/geomajas-impl/pom.xml trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java trunk/geomajas/pom.xml Log: MAJ-386 fixes in dependencies, fix some compilation errors Modified: trunk/geomajas/geomajas-api/pom.xml =================================================================== --- trunk/geomajas/geomajas-api/pom.xml 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-api/pom.xml 2009-08-25 08:06:56 UTC (rev 3797) @@ -1,69 +1,29 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>org.geomajas</groupId> - <artifactId>geomajas</artifactId> - <version>1.5.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <groupId>org.geomajas</groupId> - <artifactId>geomajas-api</artifactId> - <packaging>jar</packaging> - <name>Geomajas Core API</name> - - <dependencies> - <dependency> - <groupId>org.geotools</groupId> - <artifactId>gt2-api</artifactId> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </dependency> - <dependency> - <groupId>com.sun.xml.bind</groupId> - <artifactId>jaxb-impl</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <!-- - for more information on this plugin, see - https://jaxb.dev.java.net/jaxb-maven2-plugin/ - --> - <plugin> - <groupId>com.sun.tools.xjc.maven2</groupId> - <artifactId>maven-jaxb-plugin</artifactId> - <version>1.1</version> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - <configuration> - <generatePackage>org.geomajas.schemas.configuration</generatePackage> - <includeSchemas> - <includeSchema>**/geomajas-application.xsd</includeSchema> - </includeSchemas> - <extension>true</extension> - <verbose>true</verbose> - <args>-Xdefault-value</args> - </configuration> - </execution> - </executions> - <dependencies> - <dependency> - <groupId>org.jvnet.jaxb2_commons</groupId> - <artifactId>default-value-plugin</artifactId> - <version>1.0</version> - </dependency> - </dependencies> - </plugin> - </plugins> - </build> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>org.geomajas</groupId> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-api</artifactId> + <packaging>jar</packaging> + <name>Geomajas Core API</name> + + <dependencies> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-xml-binding</artifactId> + </dependency> + <dependency> + <groupId>org.geotools</groupId> + <artifactId>gt2-api</artifactId> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + </project> Modified: trunk/geomajas/geomajas-dojo-client/pom.xml =================================================================== --- trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-dojo-client/pom.xml 2009-08-25 08:06:56 UTC (rev 3797) @@ -12,6 +12,7 @@ <build> <plugins> + <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> @@ -59,6 +60,7 @@ </execution> </executions> </plugin> + --> </plugins> </build> Modified: trunk/geomajas/geomajas-impl/pom.xml =================================================================== --- trunk/geomajas/geomajas-impl/pom.xml 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-impl/pom.xml 2009-08-25 08:06:56 UTC (rev 3797) @@ -72,6 +72,10 @@ </dependency> <dependency> <groupId>org.geotools</groupId> + <artifactId>gt2-api</artifactId> + </dependency> + <dependency> + <groupId>org.geotools</groupId> <artifactId>gt2-epsg-wkt</artifactId> </dependency> <dependency> Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/DefaultApplicationController.java 2009-08-25 08:06:56 UTC (rev 3797) @@ -82,7 +82,7 @@ * Constructor that requires an application catalog object. This * applicationController is apllicationCatalog aware * - * @param application + * @param applicationCatalog */ public DefaultApplicationController(ApplicationCatalog applicationCatalog) { this(); Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileCommand.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileCommand.java 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileCommand.java 2009-08-25 08:06:56 UTC (rev 3797) @@ -90,7 +90,7 @@ /** * Renderer type (vml or svg) * - * @see RENDERER_VML, RENDERER_SVG + * @see @RENDERER_VML, @RENDERER_SVG */ private String renderer; @@ -122,8 +122,9 @@ RenderedTile tile = strategy.paint(this, application); ((RetrieveRenderedTileResult) result).setTile(tile); } catch (Exception e) { - logger.error("Problem occured rendering tile for layer " + layer + ": " + e.getMessage(), e); - result.addErrorMessage("Problem occured rendering tile for layer " + layer + ": " + e.getMessage()); + String msg = "Problem occurred rendering tile for layer " + layer + ": " + e.getMessage(); + log.error(msg, e); + result.addErrorMessage(msg); } } Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-25 08:06:56 UTC (rev 3797) @@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory; import org.geomajas.core.application.feature.FeatureModel; import org.geomajas.core.util.GeoUtil; +import org.geomajas.layermodels.shapeinmem.FeatureSourceRetriever; import org.geotools.data.DataStore; import org.geotools.feature.Feature; import org.geotools.feature.IllegalAttributeException; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-25 08:06:56 UTC (rev 3797) @@ -38,6 +38,7 @@ import org.geomajas.core.application.LayerModelFactory; import org.geomajas.core.application.feature.FeatureModel; import org.geomajas.schemas.configuration.FeatureType; +import org.geomajas.layermodels.shapeinmem.FeatureSourceRetriever; import org.geotools.data.DataStore; import org.geotools.data.DataUtilities; import org.geotools.data.FeatureSource; Modified: trunk/geomajas/pom.xml =================================================================== --- trunk/geomajas/pom.xml 2009-08-25 06:41:20 UTC (rev 3796) +++ trunk/geomajas/pom.xml 2009-08-25 08:06:56 UTC (rev 3797) @@ -86,8 +86,8 @@ </developers> <modules> + <module>geomajas-xml-binding</module> <module>geomajas-api</module> - <module>geomajas-xml-binding</module> <module>geomajas-impl</module> <module>geomajas-dojo-server</module> <module>geomajas-dojo-client</module> @@ -144,8 +144,8 @@ </snapshots> </repository> <repository> - <id>gwt-ext</id> - <url>http://www.gwt-ext.com/maven2/</url> + <id>smartgwt</id> + <url> http://www.smartclient.com/maven2</url> <snapshots> <enabled>false</enabled> </snapshots> |
|
From: <sv...@ge...> - 2009-08-25 07:40:58
|
Author: joachimvda Date: 2009-08-25 08:41:20 +0200 (Tue, 25 Aug 2009) New Revision: 3796 Modified: trunk/geomajas/pom.xml Log: MAJ-312 assure we use the latest gwt/smartgwt Modified: trunk/geomajas/pom.xml =================================================================== --- trunk/geomajas/pom.xml 2009-08-25 06:08:54 UTC (rev 3795) +++ trunk/geomajas/pom.xml 2009-08-25 06:41:20 UTC (rev 3796) @@ -643,8 +643,8 @@ <properties> <geotools-version>2.4.1</geotools-version> - <gwt-version>1.5.3</gwt-version> - <smartgwt-version>1.1</smartgwt-version> + <gwt-version>1.7.0</gwt-version> + <smartgwt-version>1.2</smartgwt-version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> |