geomajas-commits Mailing List for Geomajas (Page 877)
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-21 13:55:50
|
Author: joachimvda Date: 2009-08-21 14:56:06 +0200 (Fri, 21 Aug 2009) New Revision: 3770 Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-application.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-layertree.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-maps.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-toolbar.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-tools.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-application.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-layertree.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-maps.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-policy.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-toolbar.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-tools.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-application.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-layertree.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-maps.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-policy.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-toolbar.xsd trunk/geomajas/geomajas-xml-binding/src/main/resources/geomajas-tools.xsd Removed: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-policy.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-toolbar.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-tools.xsd Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/control/ConfigControl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/SecurityManager.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/ApplicationCatalog.java Log: MAJ-386, planbaten merge Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-application.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-application.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-application.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,153 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" targetNamespace="http://geomajas.org/schemas/configuration/" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation xml:lang="en">Configuration Copyright 2008 DFC NV. All rights reserved.</xsd:documentation> + </xsd:annotation> + + <xsd:include schemaLocation="majas-layertree.xsd" /> + <xsd:include schemaLocation="majas-maps.xsd" /> + <xsd:include schemaLocation="majas-toolbar.xsd" /> + <xsd:include schemaLocation="majas-tools.xsd" /> + + <xsd:element name="applicationConfig" type="applicationConfig" /> + + <!-- ================ APPLICATIONINFO ================ --> + + <xsd:complexType name="applicationConfig"> + <xsd:sequence> + <xsd:element name="url" type="xsd:string"></xsd:element> + + <xsd:element name="name" type="xsd:string"></xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="layerModelFactory" type="layerModelFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to for vector layer models.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="rasterLayerFactory" type="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to create raster layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="layerTrees"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="layerTree" type="layerTreeConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer tree configurations, each with target map and tools.</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maps"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="map" type="mapConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map configurations</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="toolbars"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="toolbar" type="toolbar"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map Toolbars of the application</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="tools"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="tool" type="tool"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Tool set of the applidation</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + + </xsd:complexType> + + + <!-- ================ VECTOR LAYER MODEL FACTORY ================ --> + + <xsd:complexType name="layerModelFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ RASTER LAYER FACTORY ================ --> + + <xsd:complexType name="rasterLayerFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ PARAMETERS ================ --> + + <xsd:complexType name="parameters"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="parameter" maxOccurs="unbounded" minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + + + +</xsd:schema> \ No newline at end of file Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-layertree.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-layertree.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-layertree.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" elementFormDefault="qualified"> + + + + <!-- LAYER TREE --> + + <xsd:complexType name="layerTreeConfig"> + <xsd:sequence> + + <xsd:element name="targetMap" type="xsd:string" /> + + <xsd:element maxOccurs="unbounded" name="toolRef" type="xsd:string" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + + </xsd:complexType> + + +</xsd:schema> \ No newline at end of file Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-maps.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-maps.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-maps.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,964 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns="http://www.w3.org/1999/xhtml" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + + <!-- MAP --> + + <xsd:complexType name="mapConfig"> + + <xsd:sequence> + + <xsd:element name="backgroundColor" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The background color expression. The color is specified using the Hexadecimal RGB value. White, + e.g. is "#FFFFFF" . + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="lineSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a line feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="pointSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a point feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="polygonSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a polygon feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction" /> + + + <xsd:element name="precision" type="precisionType" default="2" minOccurs="0" /> + + <xsd:element name="scaleBarEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the scalebar should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="panButtonsEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the map's panbuttons should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="displayUnitType" type="unitTypeRestriction" default="metric" minOccurs="0" /> + + <xsd:element name="overview" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + For overview maps only. Refers to the target map. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="maximumScale" type="xsd:float"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Maximum scale factor. This determines how far one can zoom in. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="initialBounds"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Initial bounding box for this map.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:attribute name="x" type="xsd:float" use="required" /> + <xsd:attribute name="y" type="xsd:float" use="required" /> + <xsd:attribute name="width" type="xsd:float" use="required" /> + <xsd:attribute name="height" type="xsd:float" use="required" /> + </xsd:complexType> + </xsd:element> + + <xsd:element name="resolutions" maxOccurs="1" minOccurs="0" type="resolutions" /> + + <xsd:element name="layerConfig" type="layerConfig" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + </xsd:complexType> + + + + + <!-- MAP COMPLEX TYPES --> + + <xsd:simpleType name="crsRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a + String that identifies the authority or source for the reference system definition. (TODO: add a string + pattern that values must respect). + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="20" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unitTypeRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + What type of length units should be used? (metric, english, crs) + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="metric" /> + <xsd:enumeration value="english" /> + <xsd:enumeration value="crs" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="layerConfig"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layer" type="baseLayerInfo" /> + <xsd:element name="mapOrder" type="mapOrderConfig" /> + <xsd:element name="layerTree" type="layerTreeNodeConfig" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ MAPORDER ================ --> + + <xsd:complexType name="mapOrderConfig"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerRef" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ LAYERTREENODE ================ --> + + <xsd:complexType name="layerTreeNodeConfig"> + <xsd:sequence> + + <xsd:element name="label" type="xsd:string" /> + <!--xsd:element name="opened" type="xsd:string" minOccurs="0" default="true" /--> + + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerTreeNode" type="layerTreeNodeConfig" /> + + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerRef" type="xsd:string" /> + </xsd:sequence> + + <xsd:attribute name="expanded" type="xsd:string" use="optional" default="true" /> + + </xsd:complexType> + + + <!-- ================ BASE-LAYER ================ --> + + <xsd:complexType name="baseLayerInfo"> + + <xsd:sequence> + + <xsd:element name="label" type="xsd:string" /> + + <xsd:element name="visible" type="xsd:boolean" /> + + <xsd:element name="layerType" type="layerType"> + <xsd:annotation> + <xsd:documentation> + Determines the type of layer (point=2, line=3, polygon=4, multilinestring=6, multipolygon=7 or + raster data = 1) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction" /> + + <xsd:element name="viewScale"> + <xsd:annotation> + <xsd:documentation> + Minimum and maximum scale between which the layer can be visible. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="min" type="xsd:double" /> + <xsd:element name="max" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maxExtent"> + <xsd:annotation> + <xsd:documentation> + The maximum extent of the layer that is visible in the application. The extent is specified by + minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the + crs element. This is used by the quad tree cache. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="minX" type="xsd:double" /> + <xsd:element name="maxX" type="xsd:double" /> + <xsd:element name="minY" type="xsd:double" /> + <xsd:element name="maxY" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maxTileLevel" type="tileLevel"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The maximum level of tiling that makes sense (depends on feature size/distribution vs maximum + extent). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:string" use="required" /> + + </xsd:complexType> + + + + + + <!-- ================ RASTER-LAYER ================ --> + + <xsd:complexType name="rasterLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"></xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="rasterLayerFactoryRef" type="xsd:string" /> + <xsd:element name="layerName" type="xsd:string" /> + <xsd:element name="tileWidth" type="tileDimension" /> + <xsd:element name="tileHeight" type="tileDimension" /> + <xsd:element name="style" type="xsd:string" /> + <xsd:element name="resolutions" maxOccurs="1" minOccurs="0" type="resolutions" /> + <xsd:element name="styles" type="xsd:string" maxOccurs="1" minOccurs="0" default=""> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Comma separated list of styles as defined in the wms specification. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="tileDimension"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="10000000" /> + </xsd:restriction> + </xsd:simpleType> + + <!-- ================ RASTER RESOLUTIONS ================ --> + + <xsd:complexType name="resolutions"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + These resolutions conform to the definition in + http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="resolution" type="xsd:double" maxOccurs="unbounded" minOccurs="1" /> + </xsd:sequence> + </xsd:complexType> + + + + + <!-- ================ VECTOR-LAYER ================ --> + + <xsd:complexType name="vectorLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Vectorlayers are directly associated with feature types. They do not have child layers. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + + <xsd:element name="layerDefinition" type="layerDefinition" /> + + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <!-- ================ LAYERDEFINITION ================ --> + + + <xsd:simpleType name="layerType"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="1" /> + <xsd:maxInclusive value="7" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="tileLevel"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="1000" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="precisionType"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="-100" /> + <xsd:maxInclusive value="100" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="layerDefinition"> + <xsd:annotation> + <xsd:documentation xml:lang="en">General definition of a layer.</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + + <xsd:element name="layerFactory" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Fully Qualified Classname of a layerfactory.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="label" type="LabelType"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Label configuration type.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="filter" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + A possible initial filter string. No filter if empty. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation> + Determines what kind of edit operations are allowed on this layer. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="featureType" type="FeatureType" /> + + <xsd:element name="snappingRules" type="snappingRules"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The (ordered) list of snapping rules that are applicable when features are edited. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="styleDefs"> + <xsd:annotation> + <xsd:documentation> + The styling information for the layer. It consists of a list of StyleDefs. + </xsd:documentation> + </xsd:annotation> + + <xsd:complexType> + <xsd:sequence> + <xsd:element maxOccurs="unbounded" name="styleDef" type="styleDefinition"> + <xsd:annotation> + <xsd:documentation> + This element describes a single styling for a set of features. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + + </xsd:complexType> + + + <xsd:complexType name="LabelType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="labelAttribute" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Name of the attribute to be used as label.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="fontStyle" type="styleInfo" minOccurs="0"> + <xsd:annotation> + <xsd:documentation xml:lang="en">The CSS expression for the label text.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="backgroundStyle" type="styleInfo" minOccurs="0"> + <xsd:annotation> + <xsd:documentation xml:lang="en">The CSS expression for the label's background.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="editPermissionsType"> + <xsd:sequence> + <xsd:element name="creatingAllowed" type="xsd:boolean" /> + <xsd:element name="updatingAllowed" type="xsd:boolean" /> + <xsd:element name="deletingAllowed" type="xsd:boolean" /> + </xsd:sequence> + </xsd:complexType> + + + <xsd:complexType name="FeatureType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="layerModelFactoryRef" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the feature type (the table name for generated types)</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="identifier" type="identifierAttribute"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="sort" type="sortAttribute" minOccurs="0"> + <xsd:annotation> + <xsd:documentation>Sort attribute of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="geometryType" type="geometricAttribute"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the feature type (primitive or association). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="extends" type="xsd:string" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Name of the feature type of which this feature type is an extension + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ ATTRIBUTES ================ --> + <xsd:complexType name="attributes"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="primitiveAttribute" /> + <xsd:element name="association" type="associationAttribute" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ BASE ATTRIBUTE ================ --> + + <xsd:complexType name="baseAttribute"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editable" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation>Is this attribute editable or not?</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="identifying" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation>Is this attribute one of the identifying attributes or not?</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + + <!-- ================ GEOMETRIC ATTRIBUTE ================ --> + + <xsd:complexType name="geometricAttribute"> + <xsd:sequence> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction"> + <xsd:annotation> + <xsd:documentation>Spatial reference id or EPSG code of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editable" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation> + Determines whether or not the geometric attribute for a featuretype is editable. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + + <!-- ================ PRIMITIVE ATTRIBUTE ================ --> + + <xsd:complexType name="identifierAttribute"> + <xsd:sequence> + + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="sortAttribute"> + <xsd:sequence> + + <xsd:element name="type" type="sortType"> + <xsd:annotation> + <xsd:documentation>The type of sort for this attribute (ASC, DESC).</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store on which is sorted (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="primitiveAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of primitive type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="validator" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to true. Geometrical validation expressions are + not allowed here. For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraints" type="xsd:string" /> + <xsd:element name="required" type="xsd:boolean" /> + <xsd:element name="promptMessage" type="xsd:string" minOccurs="0" /> + <xsd:element name="invalidMessage" type="xsd:string" minOccurs="0" /> + <xsd:element name="rangeMessage" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="primitiveType"> + <xsd:annotation> + <xsd:documentation>Primitive attribute type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="boolean" /> + <xsd:enumeration value="short" /> + <xsd:enumeration value="integer" /> + <xsd:enumeration value="long" /> + <xsd:enumeration value="float" /> + <xsd:enumeration value="double" /> + <xsd:enumeration value="string" /> + <xsd:enumeration value="date" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="sortType"> + <xsd:annotation> + <xsd:documentation>Sort attribute type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="ASC" /> + <xsd:enumeration value="DESC" /> + </xsd:restriction> + </xsd:simpleType> + + <!-- ================ ASSOCIATION ATTRIBUTE ================ --> + + <xsd:complexType name="associationAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of association type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="associationType"> + <xsd:annotation> + <xsd:documentation>The type of the association</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="validator" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to true. Geometrical validation expressions are + not allowed here. For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="required" type="xsd:boolean" /> + <xsd:element name="promptMessage" type="xsd:string" minOccurs="0" /> + <xsd:element name="invalidMessage" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:choice> + <xsd:element name="feature" type="xsd:string" /> + <xsd:element name="object" type="objectType" /> + </xsd:choice> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="nonEmptyString"> + <xsd:restriction base="xsd:string"> + <xsd:minLength value="1" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="associationType"> + <xsd:annotation> + <xsd:documentation>Association type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="many-to-one" /> + <xsd:enumeration value="one-to-many" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="objectType"> + <xsd:annotation> + <xsd:documentation>A type that can be used in an association</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the object type (the table name for generated types)</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="identifier" type="identifierAttribute"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of object type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the object type (currently supports primitive). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + <!-- ================ SNAPPING RULES ================ --> + + <xsd:complexType name="snappingRules"> + <xsd:sequence> + <xsd:element maxOccurs="unbounded" minOccurs="0" name="snappingRule"> + <xsd:complexType> + <xsd:sequence> + + <xsd:element name="distance" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The search distance in meter.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="layer" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + Identifies the layer to which features are snapped. Use the layerName, not the ID. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="type" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + Only one type known at this time, i.e. snapping to vertices (=1). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + <xsd:attribute name="mode" type="xsd:long" use="optional" default="1" /> + </xsd:complexType> + + + + + + + <!-- ================ STYLE DEFINITION ================ --> + + <xsd:complexType name="styleDefinition"> + <xsd:sequence> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name that is given in the map legend to the set of features that are styled according to + this styleDef. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="formula" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The criteria expression that defines the set of features that is labeled according to this + styleDef. If empty, the this styleDef will be applied to all features in the layer. Geometrical + expressions are not allowed here. For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="style" type="styleInfo"> + <xsd:annotation> + <xsd:documentation>CSS Style object.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:long" use="required" /> + + </xsd:complexType> + + + <xsd:complexType name="styleInfo"> + <xsd:sequence> + + <xsd:element name="fillColor" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="fillOpacity" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="strokeColor" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="strokeOpacity" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="strokeWidth" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="dashArray" type="nonEmptyString" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="symbol" type="symbolInfo" minOccurs="0" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <!-- ================ symbol info (point symbol styles) ================ --> + + <xsd:complexType name="symbolInfo"> + <xsd:annotation> + <xsd:documentation>One of the predefined styles for point symbols</xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element name="circle" type="circleInfo" /> + <xsd:element name="rect" type="rectInfo" /> + </xsd:choice> + </xsd:complexType> + + <xsd:complexType name="circleInfo"> + <xsd:annotation> + <xsd:documentation>Circle with fixed radius(r)</xsd:documentation> + </xsd:annotation> + <xsd:attribute name="r" type="xsd:float" use="required" /> + </xsd:complexType> + + <xsd:complexType name="rectInfo"> + <xsd:annotation> + <xsd:documentation> + Rectangle with fixed width (w) and height (h), optionally filled with image url (src) + </xsd:documentation> + </xsd:annotation> + <xsd:attribute name="w" type="xsd:float" use="required" /> + <xsd:attribute name="h" type="xsd:float" use="required" /> + <xsd:attribute name="src" type="xsd:string" use="optional" /> + </xsd:complexType> + +</xsd:schema> \ No newline at end of file Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-toolbar.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-toolbar.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-toolbar.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + elementFormDefault="qualified"> + + + + <!-- TOOLBAR --> + + <xsd:complexType name="toolbar"> + <xsd:sequence> + + <xsd:element name="targetMap" type="xsd:string" /> + + <xsd:element maxOccurs="unbounded" name="toolRef" type="xsd:string" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + + </xsd:complexType> + +</xsd:schema> \ No newline at end of file Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-tools.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-tools.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-tools.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + elementFormDefault="qualified"> + + <!-- TOOL --> + + <xsd:complexType name="tool"> + <xsd:sequence> + + <xsd:element name="parameter" maxOccurs="unbounded" minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + + </xsd:complexType> + +</xsd:schema> \ No newline at end of file Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-application.xsd (from rev 3769, trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-application.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-application.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" targetNamespace="http://geomajas.org/schemas/configuration/" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation xml:lang="en">Configuration Copyright 2008 DFC NV. All rights reserved.</xsd:documentation> + </xsd:annotation> + + <xsd:include schemaLocation="geomajas-layertree.xsd" /> + <xsd:include schemaLocation="geomajas-maps.xsd" /> + <xsd:include schemaLocation="geomajas-toolbar.xsd" /> + <xsd:include schemaLocation="geomajas-tools.xsd" /> + + <xsd:element name="applicationConfig" type="applicationConfig" /> + + <!-- ================ APPLICATIONINFO ================ --> + + <xsd:complexType name="applicationConfig"> + <xsd:sequence> + <xsd:element name="url" type="xsd:string"></xsd:element> + + <xsd:element name="name" type="xsd:string"></xsd:element> + + <xsd:element name="interceptors" minOccurs="0" maxOccurs="1"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="interceptor" type="commandInterceptor"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Command interceptors for this application</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="layerModelFactory" type="layerModelFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to for vector layer models.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="rasterLayerFactory" type="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to create raster layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + + <xsd:element name="layerTrees"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="layerTree" type="layerTreeConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer tree configurations, each with target map and tools.</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maps"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="map" type="mapConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map configurations</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="toolbars"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="toolbar" type="toolbar"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map Toolbars of the application</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="tools"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="tool" type="tool"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Tool set of the applidation</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + + </xsd:complexType> + + + <!-- ================ VECTOR LAYER MODEL FACTORY ================ --> + + <xsd:complexType name="layerModelFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ RASTER LAYER FACTORY ================ --> + + <xsd:complexType name="rasterLayerFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ Command interceptor ================ --> + + <xsd:complexType name="commandInterceptor"> + <xsd:sequence> + <xsd:element name="interceptorClass" type="xsd:string" /> + <xsd:element name="parameterMap" type="parameters" minOccurs="0" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ PARAMETERS ================ --> + + <xsd:complexType name="parameters"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="parameter" maxOccurs="unbounded" minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + + + +</xsd:schema> \ No newline at end of file Property changes on: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-application.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-layertree.xsd (from rev 3769, trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-layertree.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-layertree.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" elementFormDefault="qualified"> + + + + <!-- LAYER TREE --> + + <xsd:complexType name="layerTreeConfig"> + <xsd:sequence> + + <xsd:element name="targetMap" type="xsd:string" /> + + <xsd:element maxOccurs="unbounded" name="toolRef" type="xsd:string" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + + </xsd:complexType> + + +</xsd:schema> \ No newline at end of file Property changes on: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-layertree.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-maps.xsd (from rev 3769, trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-maps.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/geomajas-maps.xsd 2009-08-21 12:56:06 UTC (rev 3770) @@ -0,0 +1,1028 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + ~ 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/>. + --> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns="http://www.w3.org/1999/xhtml" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + + <!-- MAP --> + + <xsd:complexType name="mapConfig"> + + <xsd:sequence> + + <xsd:element name="backgroundColor" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The background color expression. The color is specified using the Hexadecimal RGB value. White, + e.g. is "#FFFFFF" . + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="lineSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a line feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="pointSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a point feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="polygonSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a polygon feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction" /> + + + <xsd:element name="precision" type="precisionType" default="2" minOccurs="0" /> + + <xsd:element name="scaleBarEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the scalebar should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="panButtonsEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the map's panbuttons should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="displayUnitType" type="unitTypeRestriction" default="metric" minOccurs="0" /> + + <xsd:element name="overview" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + For overview maps only. Refers to the target map. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="maximumScale" type="xsd:float"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Maximum scale factor. This determines how far one can zoom in. + </xsd:documen... [truncated message content] |
Author: joachimvda Date: 2009-08-21 14:43:18 +0200 (Fri, 21 Aug 2009) New Revision: 3769 Added: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-policy.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-toolbar.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-tools.xsd Removed: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-application.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-layertree.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-maps.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-policy.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-toolbar.xsd trunk/geomajas/geomajas-impl/src/main/resources/majas-tools.xsd Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/FilterCreator.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/TransformerVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java trunk/geomajas/geomajas-xml-binding/pom.xml Log: MAJ-386, planbaten merge Deleted: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd 2009-08-21 11:52:26 UTC (rev 3768) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -1,57 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ BASE-LAYER ================ --> - <xsd:complexType name="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="layerFactory" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Name of the feature type (e.g. table name) or the WMS layer name or ....</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="label" type="xsd:string" /> - - <xsd:element name="crs" type="crsRestriction" /> - <xsd:element name="maxExtent"> - <xsd:annotation> - <xsd:documentation> - The maximum extent of the layer that is visible in the application. The extent is specified by - minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the - crs element. This is used by the quad tree cache. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="minX" type="xsd:double" /> - <xsd:element name="maxX" type="xsd:double" /> - <xsd:element name="minY" type="xsd:double" /> - <xsd:element name="maxY" type="xsd:double" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" use="required" /> - </xsd:complexType> - - <!-- ================ CRS-RESTRICTION ================ --> - <xsd:simpleType name="crsRestriction"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a - String that identifies the authority or source for the reference system definition. (TODO: add a string - pattern that values must respect). - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:maxLength value="20" /> - </xsd:restriction> - </xsd:simpleType> -</xsd:schema> \ No newline at end of file Deleted: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd 2009-08-21 11:52:26 UTC (rev 3768) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -1,30 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ RASTER-LAYER ================ --> - - <xsd:complexType name="rasterLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en"></xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="tileWidth" type="tileDimension" minOccurs="0"/> - <xsd:element name="tileHeight" type="tileDimension" minOccurs="0"/> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - <xsd:simpleType name="tileDimension"> - <xsd:restriction base="xsd:integer"> - <xsd:minInclusive value="0" /> - <xsd:maxInclusive value="10000000" /> - </xsd:restriction> - </xsd:simpleType> - -</xsd:schema> \ No newline at end of file Deleted: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd 2009-08-21 11:52:26 UTC (rev 3768) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -1,129 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" - targetNamespace="http://geomajas.org/schemas/configuration/" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" - jxb:extensionBindingPrefixes="xjc" jxb:version="1.0" - xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"> - - <xsd:annotation> - <xsd:documentation xml:lang="en">Configuration - Copyright 2009 GeoSparc NV. All rights reserved.</xsd:documentation> - </xsd:annotation> - <xsd:annotation> - <xsd:appinfo> - <jxb:globalBindings> - <xjc:serializable uid="12343" /> - </jxb:globalBindings> - </xsd:appinfo> - </xsd:annotation> - - <xsd:include schemaLocation="majas-baselayer.xsd" /> - <xsd:include schemaLocation="majas-vectorlayer.xsd" /> - <xsd:include schemaLocation="majas-rasterlayer.xsd" /> - - <xsd:element name="serverConfig" type="serverConfig" /> - - <!-- ================ SERVERCONFIG ================ --> - <xsd:complexType name="serverConfig"> - <xsd:sequence> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="vectorLayerFactory" type="vectorLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Factories - to refer to for vector layers.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="rasterLayerFactory" type="rasterLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Factories - to refer to create raster layers.</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:choice> - <xsd:element name="layers"> - <xsd:complexType> - <xsd:sequence minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="layer" type="baseLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer configurations</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ BASE LAYER FACTORY ================ --> - <xsd:complexType name="baseLayerFactory"> - <xsd:sequence minOccurs="1" maxOccurs="1"> - <xsd:element name="factoryClass" type="xsd:string" /> - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" - type="parameters" /> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:ID" /> - </xsd:complexType> - - - <!-- ================ VECTOR LAYER FACTORY ================ --> - <xsd:complexType name="vectorLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer factory for - vector layers.</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerFactory"> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ RASTER LAYER FACTORY ================ --> - <xsd:complexType name="rasterLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer factory for - raster layers.</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerFactory"> - <xsd:sequence> - <xsd:element name="resolutions" type="resolutions" - minOccurs="0" /> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ PARAMETERS ================ --> - <xsd:complexType name="parameters"> - <xsd:annotation> - <xsd:documentation></xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="parameter" maxOccurs="unbounded" - minOccurs="0"> - <xsd:complexType> - <xsd:attribute name="name" type="xsd:string" /> - <xsd:attribute name="value" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ RASTER RESOLUTIONS ================ --> - <xsd:complexType name="resolutions"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - These resolutions - conform to the definition in - http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles - </xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="resolution" type="xsd:double" - maxOccurs="unbounded" minOccurs="1" /> - </xsd:sequence> - </xsd:complexType> -</xsd:schema> \ No newline at end of file Deleted: trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd 2009-08-21 11:52:26 UTC (rev 3768) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -1,415 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ VECTOR-LAYER ================ --> - <xsd:complexType name="vectorLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - Vectorlayers are - directly associated with feature types. They do not have child - layers. - </xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="layerType" type="layerType"> - <xsd:annotation> - <xsd:documentation>Determines the type of layer: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="filter" type="xsd:string"> - <xsd:annotation> - <xsd:documentation xml:lang="en">A possible initial - filter string. No filter if empty.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="editPermissions" type="editPermissionsType"> - <xsd:annotation> - <xsd:documentation>Determines what kind of edit - operations are allowed on this layer.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="layerModel" type="layerModelType" /> - <xsd:element name="renderingStrategies" maxOccurs="1" minOccurs="0"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="renderingStrategy" maxOccurs="unbounded" minOccurs="0" type="renderingStrategyInfo" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - - <!-- ================ LAYERDEFINITION ================ --> - - <xsd:simpleType name="layerType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="POINT" /> - <xsd:enumeration value="LINESTRING" /> - <xsd:enumeration value="POLYGON" /> - <xsd:enumeration value="MULTIPOINT" /> - <xsd:enumeration value="MULTILINESTRING" /> - <xsd:enumeration value="MULTIPOLYGON" /> - </xsd:restriction> - </xsd:simpleType> - - - - <!-- ================ LAYER MODEL ================ --> - - <xsd:complexType name="layerModelType"> - <xsd:sequence minOccurs="1" maxOccurs="1"> - <xsd:element name="identifier" type="identifierType"> - <xsd:annotation> - <xsd:documentation>Identifier attribute of the feature - type</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="geometry" type="geometricAttribute"> - <xsd:annotation> - <xsd:documentation> - Name of the default geometry (the column name - for generated types) - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="attributes" type="attributes"> - <xsd:annotation> - <xsd:documentation> - The list of additional attributes of the feature - type (primitive or association). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - - - <!-- ================ EDITING PERMISSIONS ================ --> - - <xsd:complexType name="editPermissionsType"> - <xsd:sequence> - <xsd:element name="creatingAllowed" type="xsd:boolean" /> - <xsd:element name="updatingAllowed" type="xsd:boolean" /> - <xsd:element name="deletingAllowed" type="xsd:boolean" /> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ IDENTIFIER TYPE ================ --> - <xsd:complexType name="identifierType"> - <xsd:sequence> - <xsd:element name="label" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name that is used in the application for - this attribute.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation> - The name of the attribute in the data store (the - column name for generated types). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="type" type="primitiveType"> - <xsd:annotation> - <xsd:documentation>The type of the attribute</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ ATTRIBUTES ================ --> - <xsd:complexType name="attributes"> - <xsd:sequence> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="attribute" type="primitiveAttribute" /> - <xsd:element name="association" type="associationAttribute" /> - </xsd:choice> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ BASE ATTRIBUTE ================ --> - <xsd:complexType name="baseAttribute"> - <xsd:sequence> - <xsd:element name="label" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name that is used in the application for - this attribute.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name of the attribute in the data store - (the column name for generated types).</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="editPermissions" type="editPermissionsType"> - <xsd:annotation> - <xsd:documentation>Is this attribute editable or not? - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ PRIMITIVE ATTRIBUTE ================ --> - <xsd:complexType name="primitiveAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">attribute of - primitive type</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="type" type="primitiveType"> - <xsd:annotation> - <xsd:documentation>The type of the attribute - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="constraints" minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - Validation expression that must validate to - true. Geometrical validation expressions are - not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="constraint" type="constraint" - minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - <!-- ================ GEOMETRIC ATTRIBUTE ================ --> - <xsd:complexType name="geometricAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Geometric - attribute</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="precisionModel" type="precisionModel" /> - <xsd:element name="constraints" minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - Validation expression that must validate to - true. Geometrical validation expressions are - not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="constraint" type="constraint" - minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ ASSOCIATION ATTRIBUTE ================ --> - <xsd:complexType name="associationAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">attribute of - association type</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="type" type="associationType"> - <xsd:annotation> - <xsd:documentation>The type of the association - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:choice> - <xsd:element name="feature" type="xsd:string" /> - <xsd:element name="object" type="objectType" /> - </xsd:choice> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - <xsd:simpleType name="associationType"> - <xsd:annotation> - <xsd:documentation>Association type</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="many-to-one" /> - <xsd:enumeration value="one-to-many" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="objectType"> - <xsd:annotation> - <xsd:documentation>A type that can be used in an association - </xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Name of the object type (the table name for - generated types)</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="identifier" type="identifierType"> - <xsd:annotation> - <xsd:documentation>Identifier attribute of object type - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="attributes" type="attributes"> - <xsd:annotation> - <xsd:documentation> - The list of additional attributes of the object - type (currently supports primitive). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="primitiveType"> - <xsd:annotation> - <xsd:documentation>Primitive attribute type - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="boolean" /> - <xsd:enumeration value="short" /> - <xsd:enumeration value="integer" /> - <xsd:enumeration value="long" /> - <xsd:enumeration value="float" /> - <xsd:enumeration value="double" /> - <xsd:enumeration value="string" /> - <xsd:enumeration value="date" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="precisionModel"> - <xsd:annotation> - <xsd:documentation>Determines the precision model of the - geometry</xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="type" type="precisionModelType"> - <xsd:annotation> - <xsd:documentation>Name of the precision model - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="scale" type="xsd:double" minOccurs="0"> - <xsd:annotation> - <xsd:documentation>Amount by which to multiply a coordinate - after subtracting the offset, to obtain a precise coordinate - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="precisionModelType"> - <xsd:annotation> - <xsd:documentation>Precision model types (see JTS doc) - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="FLOATING" /> - <xsd:enumeration value="FLOATING_SINGLE" /> - <xsd:enumeration value="FIXED" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="constraint"> - <xsd:annotation> - <xsd:documentation>Validation expression that must validate - to true. Geometrical validation expressions are not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:choice> - <xsd:element name="type" type="constraintType"> - <xsd:annotation> - <xsd:documentation>Type of constraint</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" - type="parameters" /> - </xsd:choice> - </xsd:complexType> - <xsd:simpleType name="constraintType"> - <xsd:annotation> - <xsd:documentation>Constraint types</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="regexp" /> - <xsd:enumeration value="range" /> - <xsd:enumeration value="not-null" /> - <xsd:enumeration value="user" /> - </xsd:restriction> - </xsd:simpleType> - - - - - - <!-- ================ RENDERING STRATEGIES ================ --> - - <xsd:complexType name="renderingStrategyInfo"> - <xsd:annotation> - <xsd:documentation>Strategy for rendering a vector layer.</xsd:documentation> - </xsd:annotation> - <xsd:sequence> - - <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The name of the Java class that should execute the rendering strategy.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> - - <xsd:element name="rule" type="renderingStrategyRule" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The rule that defines when this strategy should be considered.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="renderingStrategyRule"> - <xsd:annotation> - <xsd:documentation></xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The name of the Java class that implements the rule.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> - </xsd:sequence> - </xsd:complexType> - -</xsd:schema> \ No newline at end of file Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd (from rev 3767, trunk/geomajas/geomajas-impl/src/main/resources/majas-application.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -0,0 +1,178 @@ +<?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/>. + +--> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" targetNamespace="http://geomajas.org/schemas/configuration/" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation xml:lang="en">Configuration Copyright 2008 DFC NV. All rights reserved.</xsd:documentation> + </xsd:annotation> + + <xsd:include schemaLocation="majas-layertree.xsd" /> + <xsd:include schemaLocation="majas-maps.xsd" /> + <xsd:include schemaLocation="majas-toolbar.xsd" /> + <xsd:include schemaLocation="majas-tools.xsd" /> + + <xsd:element name="applicationConfig" type="applicationConfig" /> + + <!-- ================ APPLICATIONINFO ================ --> + + <xsd:complexType name="applicationConfig"> + <xsd:sequence> + <xsd:element name="url" type="xsd:string"></xsd:element> + + <xsd:element name="name" type="xsd:string"></xsd:element> + + <xsd:element name="interceptors" minOccurs="0" maxOccurs="1"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="interceptor" type="commandInterceptor"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Command interceptors for this application</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="layerModelFactory" type="layerModelFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to for vector layer models.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element maxOccurs="unbounded" minOccurs="0" name="rasterLayerFactory" type="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories to refer to create raster layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + + <xsd:element name="layerTrees"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="layerTree" type="layerTreeConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer tree configurations, each with target map and tools.</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maps"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="map" type="mapConfig"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map configurations</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="toolbars"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="toolbar" type="toolbar"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Map Toolbars of the application</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="tools"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="tool" type="tool"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Tool set of the applidation</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + + </xsd:complexType> + + + <!-- ================ VECTOR LAYER MODEL FACTORY ================ --> + + <xsd:complexType name="layerModelFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ RASTER LAYER FACTORY ================ --> + + <xsd:complexType name="rasterLayerFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + <!-- ================ Command interceptor ================ --> + + <xsd:complexType name="commandInterceptor"> + <xsd:sequence> + <xsd:element name="interceptorClass" type="xsd:string" /> + <xsd:element name="parameterMap" type="parameters" minOccurs="0" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ PARAMETERS ================ --> + + <xsd:complexType name="parameters"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="parameter" maxOccurs="unbounded" minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + + + +</xsd:schema> \ No newline at end of file Property changes on: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-application.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd (from rev 3767, trunk/geomajas/geomajas-impl/src/main/resources/majas-layertree.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -0,0 +1,48 @@ +<?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/>. + +--> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" elementFormDefault="qualified"> + + + + <!-- LAYER TREE --> + + <xsd:complexType name="layerTreeConfig"> + <xsd:sequence> + + <xsd:element name="targetMap" type="xsd:string" /> + + <xsd:element maxOccurs="unbounded" name="toolRef" type="xsd:string" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + + </xsd:complexType> + + +</xsd:schema> \ No newline at end of file Property changes on: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-layertree.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd (from rev 3767, trunk/geomajas/geomajas-impl/src/main/resources/majas-maps.xsd) =================================================================== --- trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd (rev 0) +++ trunk/geomajas/geomajas-api/src/main/resources/xml/1.6/majas-maps.xsd 2009-08-21 12:43:18 UTC (rev 3769) @@ -0,0 +1,1031 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- + + 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/>. + +--> +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:ns="http://www.w3.org/1999/xhtml" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" + xmlns="http://geomajas.org/schemas/configuration/" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + + <!-- MAP --> + + <xsd:complexType name="mapConfig"> + + <xsd:sequence> + + <xsd:element name="backgroundColor" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The background color expression. The color is specified using the Hexadecimal RGB value. White, + e.g. is "#FFFFFF" . + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="lineSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a line feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="pointSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a point feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="polygonSelectStyle" type="styleInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The CSS expression applied when a polygon feature is selected. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction" /> + + + <xsd:element name="precision" type="precisionType" default="2" minOccurs="0" /> + + <xsd:element name="scaleBarEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the scalebar should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="panButtonsEnabled" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Determines whether or not the map's panbuttons should be visible on startup. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="displayUnitType" type="unitTypeRestriction" default="metric" minOccurs="0" /> + + <xsd:element name="overview" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + For overview maps only. Refers to the target map. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="maximumScale" type="xsd:float"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Maximum scale factor. This determines how far one can zoom in. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="initialBounds"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Initial bounding box for this map.</xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:attribute name="x" type="xsd:float" use="required" /> + <xsd:attribute name="y" type="xsd:float" use="required" /> + <xsd:attribute name="width" type="xsd:float" use="required" /> + <xsd:attribute name="height" type="xsd:float" use="required" /> + </xsd:complexType> + </xsd:element> + + <xsd:element name="resolutions" maxOccurs="1" minOccurs="0" type="resolutions" /> + + <xsd:element name="layerConfig" type="layerConfig" /> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:ID" use="required" /> + </xsd:complexType> + + + + + <!-- MAP COMPLEX TYPES --> + + <xsd:simpleType name="crsRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a + String that identifies the authority or source for the reference system definition. (TODO: add a string + pattern that values must respect). + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="20" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="unitTypeRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + What type of length units should be used? (metric, english, crs) + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="metric" /> + <xsd:enumeration value="english" /> + <xsd:enumeration value="crs" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="layerConfig"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layer" type="baseLayerInfo" /> + <xsd:element name="mapOrder" type="mapOrderConfig" /> + <xsd:element name="layerTree" type="layerTreeNodeConfig" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ MAPORDER ================ --> + + <xsd:complexType name="mapOrderConfig"> + <xsd:sequence> + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerRef" type="xsd:string" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ LAYERTREENODE ================ --> + + <xsd:complexType name="layerTreeNodeConfig"> + <xsd:sequence> + + <xsd:element name="label" type="xsd:string" /> + <!--xsd:element name="opened" type="xsd:string" minOccurs="0" default="true" /--> + + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerTreeNode" type="layerTreeNodeConfig" /> + + <xsd:element minOccurs="0" maxOccurs="unbounded" name="layerRef" type="xsd:string" /> + </xsd:sequence> + + <xsd:attribute name="expanded" type="xsd:string" use="optional" default="true" /> + + </xsd:complexType> + + + <!-- ================ BASE-LAYER ================ --> + + <xsd:complexType name="baseLayerInfo"> + + <xsd:sequence> + + <xsd:element name="label" type="xsd:string" /> + + <xsd:element name="visible" type="xsd:boolean" /> + + <xsd:element name="layerType" type="layerType"> + <xsd:annotation> + <xsd:documentation> + Determines the type of layer (point=2, line=3, polygon=4, multilinestring=6, multipolygon=7 or + raster data = 1) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction" /> + + <xsd:element name="viewScale"> + <xsd:annotation> + <xsd:documentation> + Minimum and maximum scale between which the layer can be visible. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="min" type="xsd:double" /> + <xsd:element name="max" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maxExtent"> + <xsd:annotation> + <xsd:documentation> + The maximum extent of the layer that is visible in the application. The extent is specified by + minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the + crs element. This is used by the quad tree cache. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="minX" type="xsd:double" /> + <xsd:element name="maxX" type="xsd:double" /> + <xsd:element name="minY" type="xsd:double" /> + <xsd:element name="maxY" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="maxTileLevel" type="tileLevel"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The maximum level of tiling that makes sense (depends on feature size/distribution vs maximum + extent). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + + <xsd:attribute name="id" type="xsd:string" use="required" /> + + </xsd:complexType> + + + + + + <!-- ================ RASTER-LAYER ================ --> + + <xsd:complexType name="rasterLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"></xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="rasterLayerFactoryRef" type="xsd:string" /> + <xsd:element name="layerName" type="xsd:string" /> + <xsd:element name="tileWidth" type="tileDimension" /> + <xsd:element name="tileHeight" type="tileDimension" /> + <xsd:element name="style" type="xsd:string" /> + <xsd:element name="resolutions" maxOccurs="1" minOccurs="0" type="resolutions" /> + <xsd:element name="styles" type="xsd:string" maxOccurs="1" minOccurs="0" default=""> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Comma separated list of styles as defined in the wms specification. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="tileDimension"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="10000000" /> + </xsd:restriction> + </xsd:simpleType> + + <!-- ================ RASTER RESOLUTIONS ================ --> + + <xsd:complexType name="resolutions"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + These resolutions conform to the definition in + http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="resolution" type="xsd:double" maxOccurs="unbounded" minOccurs="1" /> + </xsd:sequence> + </xsd:complexType> + + + + + <!-- ================ VECTOR-LAYER ================ --> + + <xsd:complexType name="vectorLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Vectorlayers are directly associated with feature types. They do not have child layers. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + + <xsd:element name="layerDefinition" type="layerDefinition" /> + + <xsd:element name="renderingStrategies" maxOccurs="1" minOccurs="0"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="renderingStrategy" maxOccurs="unbounded" minOccurs="0" type="renderingStrategyInfo" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <!-- ================ LAYERDEFINITION ================ --> + + + <xsd:simpleType name="layerType"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="1" /> + <xsd:maxInclusive value="7" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="tileLevel"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="1000" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="precisionType"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="-100" /> + <xsd:maxInclusive value="100" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="layerDefinition"> + <xsd:annotation> + <xsd:documentation xml:lang="en">General definition of a layer.</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + + <xsd:element name="layerFactory" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Fully Qualified Classname of a layerfactory.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="label" type="LabelType"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Label configuration type.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="filter" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + A possible initial filter string. No filter if empty. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation> + Determines what kind of edit operations are allowed on this layer. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="featureType" type="FeatureType" /> + + <xsd:element name="snappingRules" type="snappingRules"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The (ordered) list of snapping rules that are applicable when features are edited. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="styleDefs"> + <xsd:annotation> + <xsd:documentation> + The styling information for the layer. It consists of a list of StyleDefs. + </xsd:documentation> + </xsd:annotation> + + <xsd:complexType> + <xsd:sequence> + <xsd:element maxOccurs="unbounded" name="styleDef" type="styleDefinition"> + <xsd:annotation> + <xsd:documentation> + This element describes a single styling for a set of features. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + + </xsd:complexType> + + + <xsd:complexType name="LabelType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="labelAttribute" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Name of the attribute to be used as label.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="fontStyle" type="styleInfo" minOccurs="0"> + <xsd:annotation> + <xsd:documentation xml:lang="en">The CSS expression for the label text.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="backgroundStyle" type="styleInfo" minOccurs="0"> + <xsd:annotation> + <xsd:documentation xml:lang="en">The CSS expression for the label's background.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="editPermissionsType"> + <xsd:sequence> + <xsd:element name="creatingAllowed" type="xsd:boolean" /> + <xsd:element name="updatingAllowed" type="xsd:boolean" /> + <xsd:element name="deletingAllowed" type="xsd:boolean" /> + </xsd:sequence> + </xsd:complexType> + + + <xsd:complexType name="FeatureType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="layerModelFactoryRef" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the feature type (the table name for generated types)</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="identifier" type="identifierAttribute"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="sort" type="sortAttribute" minOccurs="0"> + <xsd:annotation> + <xsd:documentation>Sort attribute of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="geometryType" type="geometricAttribute"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the feature type (primitive or association). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="extends" type="xsd:string" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Name of the feature type of which this feature type is an extension + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ ATTRIBUTES ================ --> + <xsd:complexType name="attributes"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="primitiveAttribute" /> + <xsd:element name="association" type="associationAttribute" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ BASE ATTRIBUTE ================ --> + + <xsd:complexType name="baseAttribute"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editable" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation>Is this attribute editable or not?</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="identifying" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation>Is this attribute one of the identifying attributes or not?</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + + <!-- ================ GEOMETRIC ATTRIBUTE ================ --> + + <xsd:complexType name="geometricAttribute"> + <xsd:sequence> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="crs" type="crsRestriction"> + <xsd:annotation> + <xsd:documentation>Spatial reference id or EPSG code of the feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="editable" type="xsd:boolean"> + <xsd:annotation> + <xsd:documentation> + Determines whether or not the geometric attribute for a featuretype is editable. + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + + <!-- ================ PRIMITIVE ATTRIBUTE ================ --> + + <xsd:complexType name="identifierAttribute"> + <xsd:sequence> + + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="sortAttribute"> + <xsd:sequence> + + <xsd:element name="type" type="sortType"> + <xsd:annotation> + <xsd:documentation>The type of sort for this attribute (ASC, DESC).</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store on which is sorted (the column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="primitiveAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of primitive type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="validator" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to true. Geometrical validation expressions are + not allowed here. For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraints" type="xsd:string" /> + <xsd:element name="required" type="xsd:boolean" /> + <xsd:element name="promptMessage" type="xsd:string" minOccurs="0" /> + <xsd:element name="invalidMessage" type="xsd:string" minOccurs="0" /> + <xsd:element name="rangeMessage" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="primitiveType"> + <xsd:annotation> + <xsd:documentation>Primitive attribute type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="boolean" /> + <xsd:enumeration value="short" /> + <xsd:enumeration value="integer" /> + <xsd:enumeration value="long" /> + <xsd:enumeration value="float" /> + <xsd:enumeration value="double" /> + <xsd:enumeration value="string" /> + <xsd:enumeration value="date" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="sortType"> + <xsd:annotation> + <xsd:documentation>Sort attribute type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="ASC" /> + <xsd:enumeration value="DESC" /> + </xsd:restriction> + </xsd:simpleType> + + <!-- ================ ASSOCIATION ATTRIBUTE ================ --> + + <xsd:complexType name="associationAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of association type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="associationType"> + <xsd:annotation> + <xsd:documentation>The type of the association</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="validator" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to true. Geometrical validation expressions are + not allowed here. For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="required" type="xsd:boolean" /> + <xsd:element... [truncated message content] |
Author: joachimvda Date: 2009-08-21 13:52:26 +0200 (Fri, 21 Aug 2009) New Revision: 3768 Removed: trunk/geomajas/geomajas-impl/src/main/java/META-INF/MANIFEST.MF Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractApplicationCommand.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/AddStyleCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationController.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/CommandInterceptor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GeometryUnionCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GeometryUnionResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetAssociationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetAssociationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetConfigurationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetConfigurationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeatureByCoordinateResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetLayerTreeConfigurationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetLayerTreeConfigurationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetMapUnitLengthCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetMapUnitLengthResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetProgressCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetProgressResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetTemplatePrintCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetTemplatePrintResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetToolbarConfigurationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GetToolbarConfigurationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ListPrintTemplatesCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ListPrintTemplatesResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/LogCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/MergePolygonCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/MergePolygonResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/NoopCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/PersistFeatureTransactionCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/PersistFeatureTransactionResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/PrintCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/PrintResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RemoveStyleCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RemoveStyleResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveBoundingBoxCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveBoundingBoxResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRasterDataCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRasterDataResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/RetrieveRenderedTileResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SavePrintTemplateCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SavePrintTemplateResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SearchFeaturesCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SearchFeaturesResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SplitPolygonCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/SplitPolygonResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserLoginResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/UserMaximumExtentResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ValidationCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ValidationResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/interceptor/GeotoolsTransactionInterceptor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/interceptor/HibernateTransactionInterceptor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/interceptor/UserContextInterceptor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/AABBox.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/BigNumberSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/ColorSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/Coordinate.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/FontSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/GeometrySerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/MapExtent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/RectangleSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/jsondata/SearchCriterion.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/progress/ProgressTask.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/progress/ProgressTaskContainer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/proxy/GetAttributesCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/proxy/GetAttributesResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/proxy/GetGeometryCommand.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/proxy/GetGeometryResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/ColorAdapter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/ConfigurationException.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/ConfigurationParser.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/FontAdapter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/JAXBConfigurable.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/LoggingListener.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/MajasObjectFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/RectangleAdapter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/control/ConfigControl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/configuration/control/ConfigurationServlet.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/Profile.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/User.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/UserContext.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/UserContextAware.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/UserContextImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/UserContextManager.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/OperationType.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/PermissionResult.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/PolicyRule.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/Resource.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/aaa/policy/SecurityManager.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/hibernate/HibernateUserContextManager.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/hibernate/Profile.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/hibernate/PropertyMapType.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/hibernate/User.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/Role.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/SecurityManager.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/aaa/policy/xml/User.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/AbstractLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/Application.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/ApplicationCatalog.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/DefaultLayerFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/DefaultMap.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerFactory.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/LayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/LayerModelFactory.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/Map.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/TransformerException.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/feature/FeatureModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/feature/FeatureModelRegistry.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/feature/FeatureTransaction.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/feature/RenderedFeature.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/feature/VectorFeature.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/DefaultVectorLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/Layer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/LayerTreeNode.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/LayerType.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/RasterImage.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/RasterLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/layertree/VectorLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/style/StyleFilter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/style/StyleFilterImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/tile/RasterTile.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/tile/RenderedTile.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/tile/TileCode.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/application/tile/VectorTile.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/CacheIOException.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/CacheUtil.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/RetrieveImageServlet.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/TileCacheService.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/algorithm/CachingAlgorithm.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/algorithm/RoundRobinCachingAlgorithm.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/broker/Broker.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/broker/CacheBroker.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/broker/RealTimeBroker.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/store/ContentStore.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/store/FileContentStore.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/store/MetaRenderContent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/cache/store/RenderContent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/ExtendedFilterFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/ExtendedIsEqualsToImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/ExtendedLikeFilterImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/FeatureModelPropertyAccessorFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/FilterCreator.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/TransformerVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/BuildResultStack.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/CQL.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/CQLCompiler.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/CQLException.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/PeriodNode.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/Result.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/filters/cql/Util.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/global/GGISJSONServlet.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/global/MajasAuthorityFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/global/MajasConstants.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/global/MajasContextListener.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/global/RESTServlet.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/hibernate/GenericDAO.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/hibernate/GenericHibernateDAO.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/hibernate/HibernateUtil.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/AnnotatedBeanSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/EnumSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/JSON.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/JSONObjectWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/Writable.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/json/WritableSerializer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/PDFContainer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/PDFContext.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/PDFServlet.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/BaseComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/BaseLayerComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/ImageComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/LabelComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/LayoutConstraint.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/LegendComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/LegendIconComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/LegendItemComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/MapComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/PageComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/PrintComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/PrintComponentVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/RasterLayerComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/ScaleBarComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/TopDownVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/VectorLayerComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/component/ViewPortComponent.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/DefaultConfigurationVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/HibernatePrintTemplateDAO.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/InMemoryPrintTemplateDAO.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/MapConfigurationVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/PrintConfiguration.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/PrintTemplate.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/configuration/PrintTemplateDAO.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/document/AbstractDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/document/DefaultDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/pdf/document/SinglePageDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/DefaultSVGDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/DefaultVMLDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/GraphicsDocument.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/LayerPaintContext.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/LayerPaintContextImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/MapPaintContext.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/image/LabelStyle.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/image/MapImageCreator.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/image/RasterUrlBuilder.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/image/Style2DFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/feature/AbstractFeaturePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/feature/FeaturePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/feature/FeaturePainterImpl.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/feature/TiledFeaturePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/image/FeatureImagePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/image/GeometryImagePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/image/LabelImagePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/tile/RasterTilePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/tile/TilePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/painters/tile/VectorTilePainter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/ExternalWMSRendering.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/ImageRendering.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/RenderingStrategy.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/RenderingStrategyFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/VectorRendering.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/rule/RenderBetweenScales.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/rule/RenderingStrategyRule.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/strategy/rule/RenderingTrueRule.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/GraphicsWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/SVGFeatureScreenWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/SVGFeatureTileWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/SVGLabelTileWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/EnvelopeWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/GeometryCollectionWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/LineStringWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/MultiLineStringWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/MultiPointWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/MultiPolygonWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/PathWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/PointWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/svg/geometry/PolygonWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/VMLFeatureScreenWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/VMLLabelTileWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/VMLVectorTileWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/GeometryCollectionWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/LineStringWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/MultiLineStringWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/MultiPointWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/MultiPolygonWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/PathWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/PointWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/rendering/writers/vml/geometry/PolygonWriter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/CQLFilterUtils.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/CaseInsensitiveComparator.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/CollectionUtils.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/CompositeListener.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/Construction.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/GeoUtil.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/ImportExportTemplate.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/ListDateFormatter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/MortonCode.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/StringColorTransformer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/StringTrimmerListener.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/StringUtils.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/TileGrid.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/TypeConverter.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/ExtendedDataStore.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.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/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/NonTypedFIDMapperFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/geotools/postgis/NonTypedPostgisFIDMapperFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/google/GoogleLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/google/GoogleLayerFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/CriteriaVisitor.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerUtil.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/maxcoordsimplifier/MaxCoordSimplifierFeatureModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/maxcoordsimplifier/MaxCoordSimplifierLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/maxcoordsimplifier/MaxCoordSimplifierLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/osm/OSMLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/osm/OSMLayerFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/readonlysimplifier/ReadOnlySimplifierLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/readonlysimplifier/ReadOnlySimplifierLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wkt/WKTLayerModel.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wkt/WKTLayerModelFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wms/GetMapRequest.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wms/WMSLayer.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wms/WMSLayerFactory.java trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/layermodels/wms/WMSRequest.java Log: MAJ-377 assure correct copyright Deleted: trunk/geomajas/geomajas-impl/src/main/java/META-INF/MANIFEST.MF =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/META-INF/MANIFEST.MF 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/META-INF/MANIFEST.MF 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractApplicationCommand.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractApplicationCommand.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractApplicationCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; 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-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractBasicSecurityApplicationCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; 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-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractDataFilterSecurityApplicationCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; 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-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AbstractRoleSecurityApplicationCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleCommand.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleCommand.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleResult.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleResult.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/AddStyleResult.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationCommand.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationController.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationController.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationController.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationResult.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationResult.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/ApplicationResult.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/CommandInterceptor.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/CommandInterceptor.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/CommandInterceptor.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * 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 2008-2009 Geosparc, http://www.geosparc.com, Belgium * - * Copyright 2009 Geosparc, http://www.geosparc.com, Belgium - * This file is part of Geomajas. + * 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. + * 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/>. + * 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.command; Modified: trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GeometryUnionCommand.java =================================================================== --- trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GeometryUnionCommand.java 2009-08-21 11:13:09 UTC (rev 3767) +++ trunk/geomajas/geomajas-impl/src/main/java/org/geomajas/command/GeometryUnionCommand.java 2009-08-21 11:52:26 UTC (rev 3768) @@ -1,25 +1,24 @@ -/** - * 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 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. * - * This program is free software: you can redistribute it and/or modify - * it under the terms ... [truncated message content] |
|
From: <sv...@ge...> - 2009-08-21 12:20:43
|
Author: joachimvda Date: 2009-08-21 13:13:09 +0200 (Fri, 21 Aug 2009) New Revision: 3767 Added: trunk/geomajas/geomajas-dojo-client/src/main/ trunk/geomajas/geomajas-impl/src/main/ Removed: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/ branches/1.3.x_planbaten_pre1.5/majas-js/src/main/ Log: integration of changes from planbaten branch Property changes on: trunk/geomajas/geomajas-dojo-client/src/main ___________________________________________________________________ Added: svn:mergeinfo + Property changes on: trunk/geomajas/geomajas-impl/src/main ___________________________________________________________________ Added: svn:mergeinfo + |
|
From: <sv...@ge...> - 2009-08-21 12:08:46
|
Author: joachimvda Date: 2009-08-21 13:09:03 +0200 (Fri, 21 Aug 2009) New Revision: 3766 Added: trunk/geomajas/geomajas-dojo-client/src/main-ref/ trunk/geomajas/geomajas-impl/src/main-ref/ Removed: trunk/geomajas/geomajas-dojo-client/src/main/ trunk/geomajas/geomajas-impl/src/main/ Log: integration of changes from planbaten branch Property changes on: trunk/geomajas/geomajas-dojo-client/src/main-ref ___________________________________________________________________ Added: svn:mergeinfo + Property changes on: trunk/geomajas/geomajas-impl/src/main-ref ___________________________________________________________________ Added: svn:mergeinfo + |
|
From: <sv...@ge...> - 2009-08-21 12:04:15
|
Author: joachimvda Date: 2009-08-21 13:04:30 +0200 (Fri, 21 Aug 2009) New Revision: 3765 Added: trunk/ Removed: branches/1.5.x/ Log: MAJ-398 move 1.5 branch to trunk Property changes on: trunk ___________________________________________________________________ Added: svn:mergeinfo + |
|
From: <sv...@ge...> - 2009-08-21 09:36:24
|
Author: joachimvda Date: 2009-08-21 10:36:38 +0200 (Fri, 21 Aug 2009) New Revision: 3764 Added: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-baselayer.xsd branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-rasterlayer.xsd branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-server.xsd branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-vectorlayer.xsd Log: MAJ-386 new module/dir structure, move schema (still temp in xml-binding) Copied: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd (from rev 3750, branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-baselayer.xsd) =================================================================== --- branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,57 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ BASE-LAYER ================ --> + <xsd:complexType name="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="layerFactory" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the feature type (e.g. table name) or the WMS layer name or ....</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="label" type="xsd:string" /> + + <xsd:element name="crs" type="crsRestriction" /> + <xsd:element name="maxExtent"> + <xsd:annotation> + <xsd:documentation> + The maximum extent of the layer that is visible in the application. The extent is specified by + minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the + crs element. This is used by the quad tree cache. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="minX" type="xsd:double" /> + <xsd:element name="maxX" type="xsd:double" /> + <xsd:element name="minY" type="xsd:double" /> + <xsd:element name="maxY" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:string" use="required" /> + </xsd:complexType> + + <!-- ================ CRS-RESTRICTION ================ --> + <xsd:simpleType name="crsRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a + String that identifies the authority or source for the reference system definition. (TODO: add a string + pattern that values must respect). + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="20" /> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema> \ No newline at end of file Property changes on: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-baselayer.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd (from rev 3750, branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-rasterlayer.xsd) =================================================================== --- branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,30 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ RASTER-LAYER ================ --> + + <xsd:complexType name="rasterLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"></xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="tileWidth" type="tileDimension" minOccurs="0"/> + <xsd:element name="tileHeight" type="tileDimension" minOccurs="0"/> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="tileDimension"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="10000000" /> + </xsd:restriction> + </xsd:simpleType> + +</xsd:schema> \ No newline at end of file Property changes on: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-rasterlayer.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd (from rev 3750, branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-server.xsd) =================================================================== --- branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,129 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" + targetNamespace="http://geomajas.org/schemas/configuration/" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" + jxb:extensionBindingPrefixes="xjc" jxb:version="1.0" + xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation xml:lang="en">Configuration + Copyright 2009 GeoSparc NV. All rights reserved.</xsd:documentation> + </xsd:annotation> + <xsd:annotation> + <xsd:appinfo> + <jxb:globalBindings> + <xjc:serializable uid="12343" /> + </jxb:globalBindings> + </xsd:appinfo> + </xsd:annotation> + + <xsd:include schemaLocation="majas-baselayer.xsd" /> + <xsd:include schemaLocation="majas-vectorlayer.xsd" /> + <xsd:include schemaLocation="majas-rasterlayer.xsd" /> + + <xsd:element name="serverConfig" type="serverConfig" /> + + <!-- ================ SERVERCONFIG ================ --> + <xsd:complexType name="serverConfig"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="vectorLayerFactory" type="vectorLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories + to refer to for vector layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="rasterLayerFactory" type="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories + to refer to create raster layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:choice> + <xsd:element name="layers"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="layer" type="baseLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer configurations</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ BASE LAYER FACTORY ================ --> + <xsd:complexType name="baseLayerFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" + type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + + <!-- ================ VECTOR LAYER FACTORY ================ --> + <xsd:complexType name="vectorLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer factory for + vector layers.</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerFactory"> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ RASTER LAYER FACTORY ================ --> + <xsd:complexType name="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer factory for + raster layers.</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerFactory"> + <xsd:sequence> + <xsd:element name="resolutions" type="resolutions" + minOccurs="0" /> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ PARAMETERS ================ --> + <xsd:complexType name="parameters"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="parameter" maxOccurs="unbounded" + minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ RASTER RESOLUTIONS ================ --> + <xsd:complexType name="resolutions"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + These resolutions + conform to the definition in + http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="resolution" type="xsd:double" + maxOccurs="unbounded" minOccurs="1" /> + </xsd:sequence> + </xsd:complexType> +</xsd:schema> \ No newline at end of file Property changes on: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-server.xsd ___________________________________________________________________ Added: svn:mergeinfo + Copied: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd (from rev 3750, branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-vectorlayer.xsd) =================================================================== --- branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,415 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ VECTOR-LAYER ================ --> + <xsd:complexType name="vectorLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Vectorlayers are + directly associated with feature types. They do not have child + layers. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="layerType" type="layerType"> + <xsd:annotation> + <xsd:documentation>Determines the type of layer: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="filter" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">A possible initial + filter string. No filter if empty.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation>Determines what kind of edit + operations are allowed on this layer.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="layerModel" type="layerModelType" /> + <xsd:element name="renderingStrategies" maxOccurs="1" minOccurs="0"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="renderingStrategy" maxOccurs="unbounded" minOccurs="0" type="renderingStrategyInfo" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + + <!-- ================ LAYERDEFINITION ================ --> + + <xsd:simpleType name="layerType"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="POINT" /> + <xsd:enumeration value="LINESTRING" /> + <xsd:enumeration value="POLYGON" /> + <xsd:enumeration value="MULTIPOINT" /> + <xsd:enumeration value="MULTILINESTRING" /> + <xsd:enumeration value="MULTIPOLYGON" /> + </xsd:restriction> + </xsd:simpleType> + + + + <!-- ================ LAYER MODEL ================ --> + + <xsd:complexType name="layerModelType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="identifier" type="identifierType"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of the feature + type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="geometry" type="geometricAttribute"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name + for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the feature + type (primitive or association). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ EDITING PERMISSIONS ================ --> + + <xsd:complexType name="editPermissionsType"> + <xsd:sequence> + <xsd:element name="creatingAllowed" type="xsd:boolean" /> + <xsd:element name="updatingAllowed" type="xsd:boolean" /> + <xsd:element name="deletingAllowed" type="xsd:boolean" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ IDENTIFIER TYPE ================ --> + <xsd:complexType name="identifierType"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for + this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the + column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ ATTRIBUTES ================ --> + <xsd:complexType name="attributes"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="primitiveAttribute" /> + <xsd:element name="association" type="associationAttribute" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ BASE ATTRIBUTE ================ --> + <xsd:complexType name="baseAttribute"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for + this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name of the attribute in the data store + (the column name for generated types).</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation>Is this attribute editable or not? + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ PRIMITIVE ATTRIBUTE ================ --> + <xsd:complexType name="primitiveAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of + primitive type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="constraints" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to + true. Geometrical validation expressions are + not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" + minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <!-- ================ GEOMETRIC ATTRIBUTE ================ --> + <xsd:complexType name="geometricAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Geometric + attribute</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="precisionModel" type="precisionModel" /> + <xsd:element name="constraints" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to + true. Geometrical validation expressions are + not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" + minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ ASSOCIATION ATTRIBUTE ================ --> + <xsd:complexType name="associationAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of + association type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="associationType"> + <xsd:annotation> + <xsd:documentation>The type of the association + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:choice> + <xsd:element name="feature" type="xsd:string" /> + <xsd:element name="object" type="objectType" /> + </xsd:choice> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + <xsd:simpleType name="associationType"> + <xsd:annotation> + <xsd:documentation>Association type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="many-to-one" /> + <xsd:enumeration value="one-to-many" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="objectType"> + <xsd:annotation> + <xsd:documentation>A type that can be used in an association + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the object type (the table name for + generated types)</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="identifier" type="identifierType"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of object type + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the object + type (currently supports primitive). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:simpleType name="primitiveType"> + <xsd:annotation> + <xsd:documentation>Primitive attribute type + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="boolean" /> + <xsd:enumeration value="short" /> + <xsd:enumeration value="integer" /> + <xsd:enumeration value="long" /> + <xsd:enumeration value="float" /> + <xsd:enumeration value="double" /> + <xsd:enumeration value="string" /> + <xsd:enumeration value="date" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="precisionModel"> + <xsd:annotation> + <xsd:documentation>Determines the precision model of the + geometry</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="type" type="precisionModelType"> + <xsd:annotation> + <xsd:documentation>Name of the precision model + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="scale" type="xsd:double" minOccurs="0"> + <xsd:annotation> + <xsd:documentation>Amount by which to multiply a coordinate + after subtracting the offset, to obtain a precise coordinate + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:simpleType name="precisionModelType"> + <xsd:annotation> + <xsd:documentation>Precision model types (see JTS doc) + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="FLOATING" /> + <xsd:enumeration value="FLOATING_SINGLE" /> + <xsd:enumeration value="FIXED" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="constraint"> + <xsd:annotation> + <xsd:documentation>Validation expression that must validate + to true. Geometrical validation expressions are not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element name="type" type="constraintType"> + <xsd:annotation> + <xsd:documentation>Type of constraint</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" + type="parameters" /> + </xsd:choice> + </xsd:complexType> + <xsd:simpleType name="constraintType"> + <xsd:annotation> + <xsd:documentation>Constraint types</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="regexp" /> + <xsd:enumeration value="range" /> + <xsd:enumeration value="not-null" /> + <xsd:enumeration value="user" /> + </xsd:restriction> + </xsd:simpleType> + + + + + + <!-- ================ RENDERING STRATEGIES ================ --> + + <xsd:complexType name="renderingStrategyInfo"> + <xsd:annotation> + <xsd:documentation>Strategy for rendering a vector layer.</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + + <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The name of the Java class that should execute the rendering strategy.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + + <xsd:element name="rule" type="renderingStrategyRule" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The rule that defines when this strategy should be considered.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="renderingStrategyRule"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The name of the Java class that implements the rule.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> \ No newline at end of file Property changes on: branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/majas-vectorlayer.xsd ___________________________________________________________________ Added: svn:mergeinfo + Added: branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-baselayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-baselayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-baselayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,57 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ BASE-LAYER ================ --> + <xsd:complexType name="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="layerFactory" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the feature type (e.g. table name) or the WMS layer name or ....</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="label" type="xsd:string" /> + + <xsd:element name="crs" type="crsRestriction" /> + <xsd:element name="maxExtent"> + <xsd:annotation> + <xsd:documentation> + The maximum extent of the layer that is visible in the application. The extent is specified by + minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the + crs element. This is used by the quad tree cache. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="minX" type="xsd:double" /> + <xsd:element name="maxX" type="xsd:double" /> + <xsd:element name="minY" type="xsd:double" /> + <xsd:element name="maxY" type="xsd:double" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:string" use="required" /> + </xsd:complexType> + + <!-- ================ CRS-RESTRICTION ================ --> + <xsd:simpleType name="crsRestriction"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a + String that identifies the authority or source for the reference system definition. (TODO: add a string + pattern that values must respect). + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:maxLength value="20" /> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema> \ No newline at end of file Added: branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-rasterlayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-rasterlayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-rasterlayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,30 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ RASTER-LAYER ================ --> + + <xsd:complexType name="rasterLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"></xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="tileWidth" type="tileDimension" minOccurs="0"/> + <xsd:element name="tileHeight" type="tileDimension" minOccurs="0"/> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <xsd:simpleType name="tileDimension"> + <xsd:restriction base="xsd:integer"> + <xsd:minInclusive value="0" /> + <xsd:maxInclusive value="10000000" /> + </xsd:restriction> + </xsd:simpleType> + +</xsd:schema> \ No newline at end of file Added: branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-server.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-server.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-server.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,129 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" + targetNamespace="http://geomajas.org/schemas/configuration/" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" + jxb:extensionBindingPrefixes="xjc" jxb:version="1.0" + xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"> + + <xsd:annotation> + <xsd:documentation xml:lang="en">Configuration + Copyright 2009 GeoSparc NV. All rights reserved.</xsd:documentation> + </xsd:annotation> + <xsd:annotation> + <xsd:appinfo> + <jxb:globalBindings> + <xjc:serializable uid="12343" /> + </jxb:globalBindings> + </xsd:appinfo> + </xsd:annotation> + + <xsd:include schemaLocation="majas-baselayer.xsd" /> + <xsd:include schemaLocation="majas-vectorlayer.xsd" /> + <xsd:include schemaLocation="majas-rasterlayer.xsd" /> + + <xsd:element name="serverConfig" type="serverConfig" /> + + <!-- ================ SERVERCONFIG ================ --> + <xsd:complexType name="serverConfig"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="vectorLayerFactory" type="vectorLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories + to refer to for vector layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="rasterLayerFactory" type="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Factories + to refer to create raster layers.</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:choice> + <xsd:element name="layers"> + <xsd:complexType> + <xsd:sequence minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="layer" type="baseLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer configurations</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ BASE LAYER FACTORY ================ --> + <xsd:complexType name="baseLayerFactory"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="factoryClass" type="xsd:string" /> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" + type="parameters" /> + </xsd:sequence> + <xsd:attribute name="id" type="xsd:ID" /> + </xsd:complexType> + + + <!-- ================ VECTOR LAYER FACTORY ================ --> + <xsd:complexType name="vectorLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer factory for + vector layers.</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerFactory"> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ RASTER LAYER FACTORY ================ --> + <xsd:complexType name="rasterLayerFactory"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Layer factory for + raster layers.</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerFactory"> + <xsd:sequence> + <xsd:element name="resolutions" type="resolutions" + minOccurs="0" /> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ PARAMETERS ================ --> + <xsd:complexType name="parameters"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="parameter" maxOccurs="unbounded" + minOccurs="0"> + <xsd:complexType> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="value" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ RASTER RESOLUTIONS ================ --> + <xsd:complexType name="resolutions"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + These resolutions + conform to the definition in + http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="resolution" type="xsd:double" + maxOccurs="unbounded" minOccurs="1" /> + </xsd:sequence> + </xsd:complexType> +</xsd:schema> \ No newline at end of file Added: branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-vectorlayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-vectorlayer.xsd (rev 0) +++ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/resources/majas-vectorlayer.xsd 2009-08-21 08:36:38 UTC (rev 3764) @@ -0,0 +1,415 @@ +<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" + xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" + xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" + elementFormDefault="qualified"> + + <!-- ================ VECTOR-LAYER ================ --> + <xsd:complexType name="vectorLayerInfo"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Vectorlayers are + directly associated with feature types. They do not have child + layers. + </xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseLayerInfo"> + <xsd:sequence> + <xsd:element name="layerType" type="layerType"> + <xsd:annotation> + <xsd:documentation>Determines the type of layer: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="filter" type="xsd:string"> + <xsd:annotation> + <xsd:documentation xml:lang="en">A possible initial + filter string. No filter if empty.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation>Determines what kind of edit + operations are allowed on this layer.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="layerModel" type="layerModelType" /> + <xsd:element name="renderingStrategies" maxOccurs="1" minOccurs="0"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="renderingStrategy" maxOccurs="unbounded" minOccurs="0" type="renderingStrategyInfo" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + + <!-- ================ LAYERDEFINITION ================ --> + + <xsd:simpleType name="layerType"> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="POINT" /> + <xsd:enumeration value="LINESTRING" /> + <xsd:enumeration value="POLYGON" /> + <xsd:enumeration value="MULTIPOINT" /> + <xsd:enumeration value="MULTILINESTRING" /> + <xsd:enumeration value="MULTIPOLYGON" /> + </xsd:restriction> + </xsd:simpleType> + + + + <!-- ================ LAYER MODEL ================ --> + + <xsd:complexType name="layerModelType"> + <xsd:sequence minOccurs="1" maxOccurs="1"> + <xsd:element name="identifier" type="identifierType"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of the feature + type</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="geometry" type="geometricAttribute"> + <xsd:annotation> + <xsd:documentation> + Name of the default geometry (the column name + for generated types) + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the feature + type (primitive or association). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + + + <!-- ================ EDITING PERMISSIONS ================ --> + + <xsd:complexType name="editPermissionsType"> + <xsd:sequence> + <xsd:element name="creatingAllowed" type="xsd:boolean" /> + <xsd:element name="updatingAllowed" type="xsd:boolean" /> + <xsd:element name="deletingAllowed" type="xsd:boolean" /> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ IDENTIFIER TYPE ================ --> + <xsd:complexType name="identifierType"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for + this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation> + The name of the attribute in the data store (the + column name for generated types). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute</xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ ATTRIBUTES ================ --> + <xsd:complexType name="attributes"> + <xsd:sequence> + <xsd:choice minOccurs="0" maxOccurs="unbounded"> + <xsd:element name="attribute" type="primitiveAttribute" /> + <xsd:element name="association" type="associationAttribute" /> + </xsd:choice> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ BASE ATTRIBUTE ================ --> + <xsd:complexType name="baseAttribute"> + <xsd:sequence> + <xsd:element name="label" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name that is used in the application for + this attribute.</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>The name of the attribute in the data store + (the column name for generated types).</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="editPermissions" type="editPermissionsType"> + <xsd:annotation> + <xsd:documentation>Is this attribute editable or not? + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + + <!-- ================ PRIMITIVE ATTRIBUTE ================ --> + <xsd:complexType name="primitiveAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of + primitive type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="primitiveType"> + <xsd:annotation> + <xsd:documentation>The type of the attribute + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="constraints" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to + true. Geometrical validation expressions are + not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" + minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + <!-- ================ GEOMETRIC ATTRIBUTE ================ --> + <xsd:complexType name="geometricAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">Geometric + attribute</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="precisionModel" type="precisionModel" /> + <xsd:element name="constraints" minOccurs="0"> + <xsd:annotation> + <xsd:documentation> + Validation expression that must validate to + true. Geometrical validation expressions are + not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="constraint" type="constraint" + minOccurs="0" /> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + + + <!-- ================ ASSOCIATION ATTRIBUTE ================ --> + <xsd:complexType name="associationAttribute"> + <xsd:annotation> + <xsd:documentation xml:lang="en">attribute of + association type</xsd:documentation> + </xsd:annotation> + <xsd:complexContent> + <xsd:extension base="baseAttribute"> + <xsd:sequence> + <xsd:element name="type" type="associationType"> + <xsd:annotation> + <xsd:documentation>The type of the association + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:choice> + <xsd:element name="feature" type="xsd:string" /> + <xsd:element name="object" type="objectType" /> + </xsd:choice> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + <xsd:simpleType name="associationType"> + <xsd:annotation> + <xsd:documentation>Association type</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="many-to-one" /> + <xsd:enumeration value="one-to-many" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="objectType"> + <xsd:annotation> + <xsd:documentation>A type that can be used in an association + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="name" type="xsd:string"> + <xsd:annotation> + <xsd:documentation>Name of the object type (the table name for + generated types)</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="identifier" type="identifierType"> + <xsd:annotation> + <xsd:documentation>Identifier attribute of object type + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="attributes" type="attributes"> + <xsd:annotation> + <xsd:documentation> + The list of additional attributes of the object + type (currently supports primitive). + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:simpleType name="primitiveType"> + <xsd:annotation> + <xsd:documentation>Primitive attribute type + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="boolean" /> + <xsd:enumeration value="short" /> + <xsd:enumeration value="integer" /> + <xsd:enumeration value="long" /> + <xsd:enumeration value="float" /> + <xsd:enumeration value="double" /> + <xsd:enumeration value="string" /> + <xsd:enumeration value="date" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="precisionModel"> + <xsd:annotation> + <xsd:documentation>Determines the precision model of the + geometry</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="type" type="precisionModelType"> + <xsd:annotation> + <xsd:documentation>Name of the precision model + </xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="scale" type="xsd:double" minOccurs="0"> + <xsd:annotation> + <xsd:documentation>Amount by which to multiply a coordinate + after subtracting the offset, to obtain a precise coordinate + </xsd:documentation> + </xsd:annotation> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + <xsd:simpleType name="precisionModelType"> + <xsd:annotation> + <xsd:documentation>Precision model types (see JTS doc) + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="FLOATING" /> + <xsd:enumeration value="FLOATING_SINGLE" /> + <xsd:enumeration value="FIXED" /> + </xsd:restriction> + </xsd:simpleType> + <xsd:complexType name="constraint"> + <xsd:annotation> + <xsd:documentation>Validation expression that must validate + to true. Geometrical validation expressions are not allowed here. + For more information consult the Configuration Manual. + </xsd:documentation> + </xsd:annotation> + <xsd:choice> + <xsd:element name="type" type="constraintType"> + <xsd:annotation> + <xsd:documentation>Type of constraint</xsd:documentation> + </xsd:annotation> + </xsd:element> + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" + type="parameters" /> + </xsd:choice> + </xsd:complexType> + <xsd:simpleType name="constraintType"> + <xsd:annotation> + <xsd:documentation>Constraint types</xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:enumeration value="regexp" /> + <xsd:enumeration value="range" /> + <xsd:enumeration value="not-null" /> + <xsd:enumeration value="user" /> + </xsd:restriction> + </xsd:simpleType> + + + + + + <!-- ================ RENDERING STRATEGIES ================ --> + + <xsd:complexType name="renderingStrategyInfo"> + <xsd:annotation> + <xsd:documentation>Strategy for rendering a vector layer.</xsd:documentation> + </xsd:annotation> + <xsd:sequence> + + <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The name of the Java class that should execute the rendering strategy.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + + <xsd:element name="rule" type="renderingStrategyRule" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The rule that defines when this strategy should be considered.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="renderingStrategyRule"> + <xsd:annotation> + <xsd:documentation></xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> + <xsd:annotation> + <xsd:documentation>The name of the Java class that implements the rule.</xsd:documentation> + </xsd:annotation> + </xsd:element> + + <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> + </xsd:sequence> + </xsd:complexType> + +</xsd:schema> \ No newline at end of file |
|
From: <sv...@ge...> - 2009-08-21 09:22:48
|
Author: joachimvda Date: 2009-08-21 10:23:05 +0200 (Fri, 21 Aug 2009) New Revision: 3763 Removed: branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-baselayer.xsd branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-rasterlayer.xsd branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-server.xsd branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-vectorlayer.xsd Log: MAJ-386 new module/dir structure, move schema to correct dir Deleted: branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-baselayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-baselayer.xsd 2009-08-21 08:21:55 UTC (rev 3762) +++ branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-baselayer.xsd 2009-08-21 08:23:05 UTC (rev 3763) @@ -1,57 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ BASE-LAYER ================ --> - <xsd:complexType name="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="layerFactory" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Id of the layer model factory that contains this feature type</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Name of the feature type (e.g. table name) or the WMS layer name or ....</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="label" type="xsd:string" /> - - <xsd:element name="crs" type="crsRestriction" /> - <xsd:element name="maxExtent"> - <xsd:annotation> - <xsd:documentation> - The maximum extent of the layer that is visible in the application. The extent is specified by - minX, maxX, minY and maxY. The units are in the coordinate reference system identified in the - crs element. This is used by the quad tree cache. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="minX" type="xsd:double" /> - <xsd:element name="maxX" type="xsd:double" /> - <xsd:element name="minY" type="xsd:double" /> - <xsd:element name="maxY" type="xsd:double" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" use="required" /> - </xsd:complexType> - - <!-- ================ CRS-RESTRICTION ================ --> - <xsd:simpleType name="crsRestriction"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - Specifies a coordinate reference system. E.g. "EPSG:31300" (Belgian Lambert 72). It must start with a - String that identifies the authority or source for the reference system definition. (TODO: add a string - pattern that values must respect). - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:maxLength value="20" /> - </xsd:restriction> - </xsd:simpleType> -</xsd:schema> \ No newline at end of file Deleted: branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-rasterlayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-rasterlayer.xsd 2009-08-21 08:21:55 UTC (rev 3762) +++ branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-rasterlayer.xsd 2009-08-21 08:23:05 UTC (rev 3763) @@ -1,30 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ RASTER-LAYER ================ --> - - <xsd:complexType name="rasterLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en"></xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="tileWidth" type="tileDimension" minOccurs="0"/> - <xsd:element name="tileHeight" type="tileDimension" minOccurs="0"/> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - <xsd:simpleType name="tileDimension"> - <xsd:restriction base="xsd:integer"> - <xsd:minInclusive value="0" /> - <xsd:maxInclusive value="10000000" /> - </xsd:restriction> - </xsd:simpleType> - -</xsd:schema> \ No newline at end of file Deleted: branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-server.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-server.xsd 2009-08-21 08:21:55 UTC (rev 3762) +++ branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-server.xsd 2009-08-21 08:23:05 UTC (rev 3763) @@ -1,129 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" - targetNamespace="http://geomajas.org/schemas/configuration/" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" - jxb:extensionBindingPrefixes="xjc" jxb:version="1.0" - xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" elementFormDefault="qualified"> - - <xsd:annotation> - <xsd:documentation xml:lang="en">Configuration - Copyright 2009 GeoSparc NV. All rights reserved.</xsd:documentation> - </xsd:annotation> - <xsd:annotation> - <xsd:appinfo> - <jxb:globalBindings> - <xjc:serializable uid="12343" /> - </jxb:globalBindings> - </xsd:appinfo> - </xsd:annotation> - - <xsd:include schemaLocation="majas-baselayer.xsd" /> - <xsd:include schemaLocation="majas-vectorlayer.xsd" /> - <xsd:include schemaLocation="majas-rasterlayer.xsd" /> - - <xsd:element name="serverConfig" type="serverConfig" /> - - <!-- ================ SERVERCONFIG ================ --> - <xsd:complexType name="serverConfig"> - <xsd:sequence> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="vectorLayerFactory" type="vectorLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Factories - to refer to for vector layers.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="rasterLayerFactory" type="rasterLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Factories - to refer to create raster layers.</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:choice> - <xsd:element name="layers"> - <xsd:complexType> - <xsd:sequence minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="layer" type="baseLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer configurations</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ BASE LAYER FACTORY ================ --> - <xsd:complexType name="baseLayerFactory"> - <xsd:sequence minOccurs="1" maxOccurs="1"> - <xsd:element name="factoryClass" type="xsd:string" /> - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" - type="parameters" /> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:ID" /> - </xsd:complexType> - - - <!-- ================ VECTOR LAYER FACTORY ================ --> - <xsd:complexType name="vectorLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer factory for - vector layers.</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerFactory"> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ RASTER LAYER FACTORY ================ --> - <xsd:complexType name="rasterLayerFactory"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Layer factory for - raster layers.</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerFactory"> - <xsd:sequence> - <xsd:element name="resolutions" type="resolutions" - minOccurs="0" /> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ PARAMETERS ================ --> - <xsd:complexType name="parameters"> - <xsd:annotation> - <xsd:documentation></xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="parameter" maxOccurs="unbounded" - minOccurs="0"> - <xsd:complexType> - <xsd:attribute name="name" type="xsd:string" /> - <xsd:attribute name="value" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ RASTER RESOLUTIONS ================ --> - <xsd:complexType name="resolutions"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - These resolutions - conform to the definition in - http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation#Global_Profiles - </xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="resolution" type="xsd:double" - maxOccurs="unbounded" minOccurs="1" /> - </xsd:sequence> - </xsd:complexType> -</xsd:schema> \ No newline at end of file Deleted: branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-vectorlayer.xsd =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-vectorlayer.xsd 2009-08-21 08:21:55 UTC (rev 3762) +++ branches/1.5.x/geomajas/geomajas-impl/src/main/resources/majas-vectorlayer.xsd 2009-08-21 08:23:05 UTC (rev 3763) @@ -1,415 +0,0 @@ -<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="http://www.w3.org/1999/xhtml" - xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty" xmlns="http://geomajas.org/schemas/configuration/" - xmlns:jxb="http://java.sun.com/xml/ns/jaxb" jxb:version="1.0" - elementFormDefault="qualified"> - - <!-- ================ VECTOR-LAYER ================ --> - <xsd:complexType name="vectorLayerInfo"> - <xsd:annotation> - <xsd:documentation xml:lang="en"> - Vectorlayers are - directly associated with feature types. They do not have child - layers. - </xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseLayerInfo"> - <xsd:sequence> - <xsd:element name="layerType" type="layerType"> - <xsd:annotation> - <xsd:documentation>Determines the type of layer: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="filter" type="xsd:string"> - <xsd:annotation> - <xsd:documentation xml:lang="en">A possible initial - filter string. No filter if empty.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="editPermissions" type="editPermissionsType"> - <xsd:annotation> - <xsd:documentation>Determines what kind of edit - operations are allowed on this layer.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="layerModel" type="layerModelType" /> - <xsd:element name="renderingStrategies" maxOccurs="1" minOccurs="0"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="renderingStrategy" maxOccurs="unbounded" minOccurs="0" type="renderingStrategyInfo" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - - <!-- ================ LAYERDEFINITION ================ --> - - <xsd:simpleType name="layerType"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="POINT" /> - <xsd:enumeration value="LINESTRING" /> - <xsd:enumeration value="POLYGON" /> - <xsd:enumeration value="MULTIPOINT" /> - <xsd:enumeration value="MULTILINESTRING" /> - <xsd:enumeration value="MULTIPOLYGON" /> - </xsd:restriction> - </xsd:simpleType> - - - - <!-- ================ LAYER MODEL ================ --> - - <xsd:complexType name="layerModelType"> - <xsd:sequence minOccurs="1" maxOccurs="1"> - <xsd:element name="identifier" type="identifierType"> - <xsd:annotation> - <xsd:documentation>Identifier attribute of the feature - type</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="geometry" type="geometricAttribute"> - <xsd:annotation> - <xsd:documentation> - Name of the default geometry (the column name - for generated types) - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="attributes" type="attributes"> - <xsd:annotation> - <xsd:documentation> - The list of additional attributes of the feature - type (primitive or association). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - - - <!-- ================ EDITING PERMISSIONS ================ --> - - <xsd:complexType name="editPermissionsType"> - <xsd:sequence> - <xsd:element name="creatingAllowed" type="xsd:boolean" /> - <xsd:element name="updatingAllowed" type="xsd:boolean" /> - <xsd:element name="deletingAllowed" type="xsd:boolean" /> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ IDENTIFIER TYPE ================ --> - <xsd:complexType name="identifierType"> - <xsd:sequence> - <xsd:element name="label" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name that is used in the application for - this attribute.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation> - The name of the attribute in the data store (the - column name for generated types). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="type" type="primitiveType"> - <xsd:annotation> - <xsd:documentation>The type of the attribute</xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ ATTRIBUTES ================ --> - <xsd:complexType name="attributes"> - <xsd:sequence> - <xsd:choice minOccurs="0" maxOccurs="unbounded"> - <xsd:element name="attribute" type="primitiveAttribute" /> - <xsd:element name="association" type="associationAttribute" /> - </xsd:choice> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ BASE ATTRIBUTE ================ --> - <xsd:complexType name="baseAttribute"> - <xsd:sequence> - <xsd:element name="label" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name that is used in the application for - this attribute.</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>The name of the attribute in the data store - (the column name for generated types).</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="editPermissions" type="editPermissionsType"> - <xsd:annotation> - <xsd:documentation>Is this attribute editable or not? - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - - <!-- ================ PRIMITIVE ATTRIBUTE ================ --> - <xsd:complexType name="primitiveAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">attribute of - primitive type</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="type" type="primitiveType"> - <xsd:annotation> - <xsd:documentation>The type of the attribute - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="constraints" minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - Validation expression that must validate to - true. Geometrical validation expressions are - not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="constraint" type="constraint" - minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - <!-- ================ GEOMETRIC ATTRIBUTE ================ --> - <xsd:complexType name="geometricAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">Geometric - attribute</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="precisionModel" type="precisionModel" /> - <xsd:element name="constraints" minOccurs="0"> - <xsd:annotation> - <xsd:documentation> - Validation expression that must validate to - true. Geometrical validation expressions are - not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="constraint" type="constraint" - minOccurs="0" /> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - - - <!-- ================ ASSOCIATION ATTRIBUTE ================ --> - <xsd:complexType name="associationAttribute"> - <xsd:annotation> - <xsd:documentation xml:lang="en">attribute of - association type</xsd:documentation> - </xsd:annotation> - <xsd:complexContent> - <xsd:extension base="baseAttribute"> - <xsd:sequence> - <xsd:element name="type" type="associationType"> - <xsd:annotation> - <xsd:documentation>The type of the association - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:choice> - <xsd:element name="feature" type="xsd:string" /> - <xsd:element name="object" type="objectType" /> - </xsd:choice> - </xsd:sequence> - </xsd:extension> - </xsd:complexContent> - </xsd:complexType> - <xsd:simpleType name="associationType"> - <xsd:annotation> - <xsd:documentation>Association type</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="many-to-one" /> - <xsd:enumeration value="one-to-many" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="objectType"> - <xsd:annotation> - <xsd:documentation>A type that can be used in an association - </xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="name" type="xsd:string"> - <xsd:annotation> - <xsd:documentation>Name of the object type (the table name for - generated types)</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="identifier" type="identifierType"> - <xsd:annotation> - <xsd:documentation>Identifier attribute of object type - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="attributes" type="attributes"> - <xsd:annotation> - <xsd:documentation> - The list of additional attributes of the object - type (currently supports primitive). - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="primitiveType"> - <xsd:annotation> - <xsd:documentation>Primitive attribute type - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="boolean" /> - <xsd:enumeration value="short" /> - <xsd:enumeration value="integer" /> - <xsd:enumeration value="long" /> - <xsd:enumeration value="float" /> - <xsd:enumeration value="double" /> - <xsd:enumeration value="string" /> - <xsd:enumeration value="date" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="precisionModel"> - <xsd:annotation> - <xsd:documentation>Determines the precision model of the - geometry</xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="type" type="precisionModelType"> - <xsd:annotation> - <xsd:documentation>Name of the precision model - </xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="scale" type="xsd:double" minOccurs="0"> - <xsd:annotation> - <xsd:documentation>Amount by which to multiply a coordinate - after subtracting the offset, to obtain a precise coordinate - </xsd:documentation> - </xsd:annotation> - </xsd:element> - </xsd:sequence> - </xsd:complexType> - <xsd:simpleType name="precisionModelType"> - <xsd:annotation> - <xsd:documentation>Precision model types (see JTS doc) - </xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="FLOATING" /> - <xsd:enumeration value="FLOATING_SINGLE" /> - <xsd:enumeration value="FIXED" /> - </xsd:restriction> - </xsd:simpleType> - <xsd:complexType name="constraint"> - <xsd:annotation> - <xsd:documentation>Validation expression that must validate - to true. Geometrical validation expressions are not allowed here. - For more information consult the Configuration Manual. - </xsd:documentation> - </xsd:annotation> - <xsd:choice> - <xsd:element name="type" type="constraintType"> - <xsd:annotation> - <xsd:documentation>Type of constraint</xsd:documentation> - </xsd:annotation> - </xsd:element> - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" - type="parameters" /> - </xsd:choice> - </xsd:complexType> - <xsd:simpleType name="constraintType"> - <xsd:annotation> - <xsd:documentation>Constraint types</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="regexp" /> - <xsd:enumeration value="range" /> - <xsd:enumeration value="not-null" /> - <xsd:enumeration value="user" /> - </xsd:restriction> - </xsd:simpleType> - - - - - - <!-- ================ RENDERING STRATEGIES ================ --> - - <xsd:complexType name="renderingStrategyInfo"> - <xsd:annotation> - <xsd:documentation>Strategy for rendering a vector layer.</xsd:documentation> - </xsd:annotation> - <xsd:sequence> - - <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The name of the Java class that should execute the rendering strategy.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> - - <xsd:element name="rule" type="renderingStrategyRule" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The rule that defines when this strategy should be considered.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - </xsd:sequence> - </xsd:complexType> - - <xsd:complexType name="renderingStrategyRule"> - <xsd:annotation> - <xsd:documentation></xsd:documentation> - </xsd:annotation> - <xsd:sequence> - <xsd:element name="className" type="xsd:string" minOccurs="1" maxOccurs="1"> - <xsd:annotation> - <xsd:documentation>The name of the Java class that implements the rule.</xsd:documentation> - </xsd:annotation> - </xsd:element> - - <xsd:element name="parameterMap" maxOccurs="1" minOccurs="1" type="parameters" /> - </xsd:sequence> - </xsd:complexType> - -</xsd:schema> \ No newline at end of file |
|
From: <sv...@ge...> - 2009-08-21 09:21:39
|
Author: pieterdg
Date: 2009-08-21 10:21:55 +0200 (Fri, 21 Aug 2009)
New Revision: 3762
Modified:
branches/1.3.x/majas-js/src/main/webapp/js/geomajas/map/MapModel.js
Log:
Fix for MAJ-329
Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/map/MapModel.js
===================================================================
--- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/map/MapModel.js 2009-08-21 08:19:08 UTC (rev 3761)
+++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/map/MapModel.js 2009-08-21 08:21:55 UTC (rev 3762)
@@ -54,6 +54,8 @@
this.layerOrder = new dojox.collections.ArrayList();
/** @private */
this.mapView = null;
+ this.nrDeferred = 0;
+ this.renderHandlers = [];
this.paintableObjects = new dojox.collections.Dictionary();
},
@@ -65,12 +67,19 @@
}
this.layers.add(layer.getId(),layer);
this.layerOrder.add(layer);
+
+ if (layer instanceof VectorLayer) {
+ this.renderHandlers.push (dojo.connect(layer.featureStore.cache, "onFetchDone", dojo.hitch(this, "_onLayerRendered")));
+ }
},
-
+
destroy : function () {
- // circular references to what ???
this.layers = null;
this.layerOrder = null;
+ for (var i=0; i < this.renderHandlers.length; i++) {
+ dojo.disconnect(this.renderHandlers[i]);
+ }
+ this.renderHandlers = null;
},
// PainterVisitable implementation:
@@ -86,12 +95,14 @@
var layer = layers.item(i);
if (layer.checkVisibility(this.mapView.getCurrentScale())) {
layer.accept(visitor, bbox, recursive);
+ if (layer instanceof VectorLayer) {
+ this.nrDeferred++;
+ }
} else {
// JDM: paint the top part of the layer, if not we loose the map order !!!!!
layer.accept(visitor, bbox, false);
}
}
-
}
// Paint the paintables:
@@ -110,6 +121,13 @@
},
/**
+ * This function is automatically triggered when all the vector layers of
+ * this map have been rendered.
+ */
+ onMapRendered : function (mapId) {
+ },
+
+ /**
* Enables selection of features, by subscribing to a selection-topic.
* @param mapId Name of the map for which selection is meant. The name of
* the selection topic is derived from it.
@@ -590,5 +608,15 @@
}
}
return list;
+ },
+
+ /**
+ * @private
+ */
+ _onLayerRendered : function (layerId) {
+ this.nrDeferred--;
+ if(this.nrDeferred == 0){
+ this.onMapRendered(this.id);
+ }
}
});
\ No newline at end of file
|
|
From: <sv...@ge...> - 2009-08-21 09:18:55
|
Author: joachimvda Date: 2009-08-21 10:19:08 +0200 (Fri, 21 Aug 2009) New Revision: 3761 Added: branches/1.5.x/geomajas/geomajas-api/src/main/resources/ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/ branches/1.5.x/geomajas/geomajas-api/src/main/resources/xml/1.4/ Log: MAJ-386 new module/dir structure |
Author: joachimvda
Date: 2009-08-21 10:15:19 +0200 (Fri, 21 Aug 2009)
New Revision: 3760
Added:
branches/1.5.x/geomajas-dojo-simple/src/main/webapp/
branches/1.5.x/geomajas-dojo-simple/src/main/webapp/WEB-INF/
branches/1.5.x/geomajas-dojo-simple/src/main/webapp/WEB-INF/web.xml
branches/1.5.x/geomajas-gwt-example/src/main/webapp/
branches/1.5.x/geomajas-gwt-example/src/main/webapp/WEB-INF/
branches/1.5.x/geomajas-gwt-example/src/main/webapp/WEB-INF/web.xml
Modified:
branches/1.5.x/geomajas-dojo-example/pom.xml
branches/1.5.x/geomajas-dojo-example/src/main/webapp/WEB-INF/web.xml
branches/1.5.x/geomajas-dojo-simple/pom.xml
branches/1.5.x/geomajas-gwt-example/pom.xml
branches/1.5.x/geomajas-gwt-simple/pom.xml
branches/1.5.x/geomajas-gwt-simple/src/main/webapp/WEB-INF/web.xml
Log:
MAJ-386 new module/dir structure
Modified: branches/1.5.x/geomajas-dojo-example/pom.xml
===================================================================
--- branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -35,10 +35,19 @@
<filtering>true</filtering>
</resource>
</resources>
- <!--
- <plugins>
+ <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-war-plugin</artifactId>
<configuration>
<filters>
@@ -70,16 +79,16 @@
</buildCommand>
</additionalBuildcommands>
</configuration>
- </plugin>
+ </plugin>
+ -->
</plugins>
- -->
</build>
<dependencies>
<dependency>
- <groupId>org.geomajas.core</groupId>
+ <groupId>org.geomajas</groupId>
<artifactId>geomajas-dojo-client</artifactId>
- <version>1.5.0</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
Modified: branches/1.5.x/geomajas-dojo-example/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/1.5.x/geomajas-dojo-example/src/main/webapp/WEB-INF/web.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-dojo-example/src/main/webapp/WEB-INF/web.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -2,7 +2,7 @@
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
- <display-name>Majas Web Application Skeleton</display-name>
+ <display-name>Geomajas dojo face example application</display-name>
<listener>
<listener-class>org.geomajas.core.global.MajasContextListener</listener-class>
</listener>
@@ -40,4 +40,4 @@
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
-</web-app>
\ No newline at end of file
+</web-app>
Modified: branches/1.5.x/geomajas-dojo-simple/pom.xml
===================================================================
--- branches/1.5.x/geomajas-dojo-simple/pom.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-dojo-simple/pom.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -35,10 +35,19 @@
<filtering>true</filtering>
</resource>
</resources>
- <!--
<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-war-plugin</artifactId>
<configuration>
<filters>
@@ -70,16 +79,16 @@
</buildCommand>
</additionalBuildcommands>
</configuration>
- </plugin>
+ </plugin>
+ -->
</plugins>
- -->
</build>
<dependencies>
<dependency>
- <groupId>org.geomajas.core</groupId>
+ <groupId>org.geomajas</groupId>
<artifactId>geomajas-dojo-client</artifactId>
- <version>1.5.0</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
Added: branches/1.5.x/geomajas-dojo-simple/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/1.5.x/geomajas-dojo-simple/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/1.5.x/geomajas-dojo-simple/src/main/webapp/WEB-INF/web.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -0,0 +1,43 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+<web-app>
+ <display-name>Geomajas dojo face simple example application</display-name>
+ <listener>
+ <listener-class>org.geomajas.core.global.MajasContextListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>PDFServlet</servlet-name>
+ <servlet-class>org.geomajas.core.pdf.PDFServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>PDFServlet</servlet-name>
+ <url-pattern>*.document</url-pattern>
+ </servlet-mapping>
+ <servlet>
+ <servlet-name>GGISJSONServlet</servlet-name>
+ <servlet-class>org.geomajas.core.global.GGISJSONServlet</servlet-class>
+ <init-param>
+ <param-name>auto-session-bridge</param-name>
+ <param-value>0</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Resource Servlet</servlet-name>
+ <servlet-class>org.geomajas.core.global.ResourceServlet</servlet-class>
+ <load-on-startup>2</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Resource Servlet</servlet-name>
+ <url-pattern>/modules/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>GGISJSONServlet</servlet-name>
+ <url-pattern>*.do</url-pattern>
+ </servlet-mapping>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
Modified: branches/1.5.x/geomajas-gwt-example/pom.xml
===================================================================
--- branches/1.5.x/geomajas-gwt-example/pom.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-gwt-example/pom.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -52,8 +52,17 @@
<version>${smartgwt-version}</version>
</dependency>
</dependencies>
- <build>
+ <build>
<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>
<!-- configure the GWT-Maven plugin -->
<!--plugin>
<groupId>com.totsp.gwt</groupId>
@@ -143,6 +152,46 @@
</plugins>
</build>
+ <!-- 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>
<gwt-version>1.5.3</gwt-version>
<smartgwt-version>1.1</smartgwt-version>
Added: branches/1.5.x/geomajas-gwt-example/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/1.5.x/geomajas-gwt-example/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/1.5.x/geomajas-gwt-example/src/main/webapp/WEB-INF/web.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -0,0 +1,24 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+<web-app>
+ <display-name>Geomajas GWT face example application</display-name>
+ <listener>
+ <listener-class>org.geomajas.server.global.MajasContextListener
+ </listener-class>
+ </listener>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+ <servlet>
+ <servlet-name>shell</servlet-name>
+ <servlet-class>com.google.gwt.dev.shell.GWTShellServlet
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>shell</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
+
Modified: branches/1.5.x/geomajas-gwt-simple/pom.xml
===================================================================
--- branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -11,7 +11,13 @@
<groupId>org.geomajas</groupId>
<artifactId>geomajas-gwt-client</artifactId>
<version>${project.version}</version>
- </dependency>
+ </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>com.google.gwt</groupId>
@@ -54,6 +60,15 @@
</dependencies>
<build>
<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>
<!-- configure the GWT-Maven plugin -->
<!--plugin>
<groupId>com.totsp.gwt</groupId>
@@ -143,6 +158,46 @@
</plugins>
</build>
+ <!-- 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>
<gwt-version>1.5.3</gwt-version>
<smartgwt-version>1.1</smartgwt-version>
Modified: branches/1.5.x/geomajas-gwt-simple/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/1.5.x/geomajas-gwt-simple/src/main/webapp/WEB-INF/web.xml 2009-08-21 07:56:12 UTC (rev 3759)
+++ branches/1.5.x/geomajas-gwt-simple/src/main/webapp/WEB-INF/web.xml 2009-08-21 08:15:19 UTC (rev 3760)
@@ -2,7 +2,7 @@
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
- <display-name>Majas Web Application Skeleton</display-name>
+ <display-name>Geomajas GWT face simple example application</display-name>
<listener>
<listener-class>org.geomajas.server.global.MajasContextListener
</listener-class>
|
|
From: <sv...@ge...> - 2009-08-21 08:55:58
|
Author: pieterdg
Date: 2009-08-21 09:56:12 +0200 (Fri, 21 Aug 2009)
New Revision: 3759
Modified:
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerManager.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerModelRegistry.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java
Log:
Fix for MAJ-384
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerManager.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerManager.java 2009-08-21 07:40:30 UTC (rev 3758)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerManager.java 2009-08-21 07:56:12 UTC (rev 3759)
@@ -56,6 +56,7 @@
* @created 21-Mar-2006 9:06:50 AM
*/
public class LayerManager extends LayerConfig implements JAXBConfigurable {
+
private static final Log logger = LogFactory.getLog(LayerManager.class);
private java.util.Map<String, Layer> layersById = new HashMap<String, Layer>();
@@ -80,8 +81,7 @@
return map;
}
- public void finishConfiguration(Object parent)
- throws ConfigurationException {
+ public void finishConfiguration(Object parent) throws ConfigurationException {
map = (Map) parent;
verifyFeatureAssociation();
initLayers();
@@ -94,8 +94,7 @@
for (BaseLayerInfo base : getLayer()) {
if (base instanceof VectorLayerInfo) {
VectorLayerInfo vector = (VectorLayerInfo) base;
- allTypes.add(vector.getLayerDefinition().getFeatureType()
- .getName());
+ allTypes.add(vector.getLayerDefinition().getFeatureType().getName());
}
}
for (BaseLayerInfo base : getLayer()) {
@@ -104,27 +103,21 @@
FeatureType type = vector.getLayerDefinition().getFeatureType();
if (type.getExtends() != null) {
if (!allTypes.contains(type.getExtends())) {
- throw new ConfigurationException(
- "Missing feature type " + type.getExtends()
- + " extended by feature type of layer "
- + base.getId());
+ throw new ConfigurationException("Missing feature type " + type.getExtends()
+ + " extended by feature type of layer " + base.getId());
} else if (type.getExtends().equals(type.getName())) {
- throw new ConfigurationException("Feature type "
- + type.getName() + " of layer " + base.getId()
- + " cannot extend itself");
+ throw new ConfigurationException("Feature type " + type.getName() + " of layer "
+ + base.getId() + " cannot extend itself");
}
}
- for (BaseAttribute attr : type.getAttributes()
- .getAttributeOrAssociation()) {
+ for (BaseAttribute attr : type.getAttributes().getAttributeOrAssociation()) {
if (attr instanceof AssociationAttribute) {
AssociationAttribute association = (AssociationAttribute) attr;
if (association.getFeature() != null) {
if (!allTypes.contains(association.getFeature())) {
- throw new ConfigurationException(
- "Missing feature type "
- + association.getFeature()
- + " associated to feature type of layer "
- + base.getId());
+ throw new ConfigurationException("Missing feature type "
+ + association.getFeature() + " associated to feature type of layer "
+ + base.getId());
}
}
}
@@ -140,69 +133,60 @@
for (String layerRef : getMapOrder().getLayerRef()) {
String globalId = map.getId() + "." + layerRef;
if (resolved.contains(globalId)) {
- throw new ConfigurationException("Duplicate layer " + layerRef
- + " in maporder of " + map.getId());
+ throw new ConfigurationException("Duplicate layer " + layerRef + " in maporder of "
+ + map.getId());
} else if (!unResolved.contains(globalId)) {
- throw new ConfigurationException("Unknown layer " + layerRef
- + " in maporder of " + map.getId());
+ throw new ConfigurationException("Unknown layer " + layerRef + " in maporder of "
+ + map.getId());
} else {
resolved.add(globalId);
unResolved.remove(globalId);
}
}
if (unResolved.size() > 0) {
- throw new ConfigurationException("Layer " + unResolved.get(0)
- + " missing in maporder of " + map.getId());
+ throw new ConfigurationException("Layer " + unResolved.get(0) + " missing in maporder of "
+ + map.getId());
}
}
private void initLayers() throws ConfigurationException {
for (BaseLayerInfo layerInfo : getLayer()) {
if (layersById.containsKey(map.getId() + "." + layerInfo.getId())) {
- throw new ConfigurationException("Duplicate layer id "
- + layerInfo.getId() + " in map " + map.getId());
+ throw new ConfigurationException("Duplicate layer id " + layerInfo.getId() + " in map "
+ + map.getId());
}
Layer layer = createLayer(layerInfo);
layersById.put(layer.getId(), layer);
}
}
- private Layer createLayer(BaseLayerInfo nodeInfo)
- throws ConfigurationException {
+ private Layer createLayer(BaseLayerInfo nodeInfo) throws ConfigurationException {
if (nodeInfo instanceof VectorLayerInfo) {
VectorLayerInfo vectorInfo = (VectorLayerInfo) nodeInfo;
- LayerFactory layerFactory = createVectorLayerFactory(vectorInfo
- .getLayerDefinition().getLayerFactory());
+ LayerFactory layerFactory = createVectorLayerFactory(vectorInfo.getLayerDefinition()
+ .getLayerFactory());
try {
- logger.debug("createLayer() : creating vector layer "
- + vectorInfo.getId());
+ logger.debug("createLayer() : creating vector layer " + vectorInfo.getId());
return layerFactory.createLayer(vectorInfo, map);
} catch (IOException e) {
- logger.error("LayerManager() : could not create vector layer "
+ logger.error("LayerManager() : could not create vector layer " + vectorInfo.getId(), e);
+ throw new ConfigurationException("LayerManager() : could not create vector layer "
+ vectorInfo.getId(), e);
- throw new ConfigurationException(
- "LayerManager() : could not create vector layer "
- + vectorInfo.getId(), e);
}
} else if (nodeInfo instanceof RasterLayerInfo) {
RasterLayerInfo leafyInfo = (RasterLayerInfo) nodeInfo;
- LayerFactory layerFactory = createRasterLayerFactory(leafyInfo
- .getRasterLayerFactoryRef());
+ LayerFactory layerFactory = createRasterLayerFactory(leafyInfo.getRasterLayerFactoryRef());
try {
- logger.debug("createLayer() : creating raster layer "
- + leafyInfo.getId());
+ logger.debug("createLayer() : creating raster layer " + leafyInfo.getId());
return layerFactory.createLayer(leafyInfo, map);
} catch (IOException e) {
- logger.error("LayerManager() : could not create raster layer "
+ logger.error("LayerManager() : could not create raster layer " + leafyInfo.getId(), e);
+ throw new ConfigurationException("LayerManager() : could not create raster layer "
+ leafyInfo.getId(), e);
- throw new ConfigurationException(
- "LayerManager() : could not create raster layer "
- + leafyInfo.getId(), e);
}
} else {
// must be a bug, throw anyhow...
- throw new ConfigurationException("Unknown layer-info for layer "
- + nodeInfo.getId());
+ throw new ConfigurationException("Unknown layer-info for layer " + nodeInfo.getId());
}
}
@@ -210,51 +194,40 @@
for (Layer layer : layersById.values()) {
if (layer.getInfo() instanceof VectorLayerInfo) {
VectorLayerInfo vectorInfo = (VectorLayerInfo) layer.getInfo();
- for (SnappingRule rule : vectorInfo.getLayerDefinition()
- .getSnappingRules().getSnappingRule()) {
+ for (SnappingRule rule : vectorInfo.getLayerDefinition().getSnappingRules().getSnappingRule()) {
String layerId = map.getId() + "." + rule.getLayer();
- if (!(layersById.containsKey(layerId) || rule.getLayer()
- .equals(vectorInfo.getId()))) {
- throw new ConfigurationException(
- "Snapping rule contains non-existent layer name "
- + rule.getLayer());
+ if (!(layersById.containsKey(layerId) || rule.getLayer().equals(vectorInfo.getId()))) {
+ throw new ConfigurationException("Snapping rule contains non-existent layer name "
+ + rule.getLayer());
}
}
}
}
}
- private LayerFactory createVectorLayerFactory(String factory)
- throws ConfigurationException {
+ private LayerFactory createVectorLayerFactory(String factory) throws ConfigurationException {
factory = factory.trim();
- logger
- .debug("createLayerFactory() : creating layer factory "
- + factory);
+ logger.debug("createLayerFactory() : creating layer factory " + factory);
if (factory == null || factory.length() == 0) {
return new DefaultLayerFactory();
}
try {
- Class factoryClass = Class.forName(factory);
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ Class<?> factoryClass = classloader.loadClass(factory);
return (LayerFactory) factoryClass.newInstance();
} catch (Exception e) {
- logger
- .error(
- "createVectorLayerFactory() : could not create vector layer factory",
- e);
+ logger.error("createVectorLayerFactory() : could not create vector layer factory", e);
throw new ConfigurationException(
- "createVectorLayerFactory() : could not create vector layer factory "
- + factory);
+ "createVectorLayerFactory() : could not create vector layer factory " + factory);
}
}
- private LayerFactory createRasterLayerFactory(String factory)
- throws ConfigurationException {
+ private LayerFactory createRasterLayerFactory(String factory) throws ConfigurationException {
RasterLayerRegistry reg = RasterLayerRegistry.getRegistry();
LayerFactory layerFactory = reg.lookup(factory);
if (layerFactory == null) {
- throw new ConfigurationException("RasterLayerFactory " + factory
- + " is not defined");
+ throw new ConfigurationException("RasterLayerFactory " + factory + " is not defined");
} else {
return layerFactory;
}
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerModelRegistry.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerModelRegistry.java 2009-08-21 07:40:30 UTC (rev 3758)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/LayerModelRegistry.java 2009-08-21 07:56:12 UTC (rev 3759)
@@ -34,9 +34,9 @@
import org.apache.commons.logging.LogFactory;
public class LayerModelRegistry {
- private static final Log logger = LogFactory
- .getLog(LayerModelRegistry.class);
+ private static final Log logger = LogFactory.getLog(LayerModelRegistry.class);
+
private static LayerModelRegistry instance;
private Map<String, LayerModelFactory> factories = new HashMap<String, LayerModelFactory>();
@@ -52,7 +52,7 @@
return factories.get(name);
}
- public List<LayerModelFactory> lookup(Class clazz) {
+ public List<LayerModelFactory> lookup(Class<?> clazz) {
List<LayerModelFactory> result = new ArrayList<LayerModelFactory>();
for (LayerModelFactory factory : factories.values()) {
if (factory.getClass().equals(clazz)) {
@@ -62,64 +62,49 @@
return result;
}
- public LayerModelFactory register(String name, String className,
- Map parameters) {
+ public LayerModelFactory register(String name, String className, Map<?, ?> parameters) {
logger.debug("register() : " + name);
if (!factories.containsKey(name)) {
if (!className.contains(".")) {
// assume this package to ease configuration
// prepend with model type
if (className.endsWith("LayerModelFactory")) {
- className = className.substring(0,
- className.indexOf("LayerModelFactory"))
- .toLowerCase()
+ className = className.substring(0, className.indexOf("LayerModelFactory")).toLowerCase()
+ "." + className;
}
className = "org.geomajas.layermodels." + className;
}
try {
- Class factoryClass = Class.forName(className);
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ Class<?> factoryClass = classloader.loadClass(className);
LayerModelFactory factory = null;
try {
- logger
- .debug("lookupByJavaClass() : trying (id,map) constructor");
- Constructor c = factoryClass.getConstructor(String.class,
- Map.class);
- factory = (LayerModelFactory) c.newInstance(name,
- parameters);
+ logger.debug("lookupByJavaClass() : trying (id,map) constructor");
+ Constructor<?> c = factoryClass.getConstructor(String.class, Map.class);
+ factory = (LayerModelFactory) c.newInstance(name, parameters);
} catch (NoSuchMethodException nsme) {
- logger
- .debug("lookupByJavaClass() : trying (id) constructor");
- Constructor c = factoryClass.getConstructor(String.class);
+ logger.debug("lookupByJavaClass() : trying (id) constructor");
+ Constructor<?> c = factoryClass.getConstructor(String.class);
factory = (LayerModelFactory) c.newInstance(name);
}
factories.put(name, factory);
} catch (InvocationTargetException e) {
- logger.error("Could not create instance of " + className, e
- .getCause());
- throw new IllegalArgumentException(
- "Could not create instance of " + className, e);
+ logger.error("Could not create instance of " + className, e.getCause());
+ throw new IllegalArgumentException("Could not create instance of " + className, e);
} catch (ClassNotFoundException e) {
- logger.error("register() : class " + className + " not found",
- e);
+ logger.error("register() : class " + className + " not found", e);
throw new IllegalArgumentException("class not found");
} catch (IllegalAccessException e) {
- logger.error("register() : class " + className
- + " cannot be accessed", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " cannot be accessed", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
} catch (InstantiationException e) {
- logger.error(
- "register() : class " + className + " is abstract", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " is abstract", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
} catch (NoSuchMethodException e) {
- logger.error("register() : class " + className
- + " has no suitable constructor", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " has no suitable constructor", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
}
}
return factories.get(name);
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java 2009-08-21 07:40:30 UTC (rev 3758)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/application/RasterLayerRegistry.java 2009-08-21 07:56:12 UTC (rev 3759)
@@ -23,7 +23,6 @@
*/
package org.geomajas.core.application;
-
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
@@ -31,12 +30,11 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
public class RasterLayerRegistry {
- private static final Log logger = LogFactory
- .getLog(LayerModelRegistry.class);
+ private static final Log logger = LogFactory.getLog(LayerModelRegistry.class);
+
private static RasterLayerRegistry instance;
private Map<String, LayerFactory> factories = new HashMap<String, LayerFactory>();
@@ -52,32 +50,29 @@
return factories.get(name);
}
- public LayerFactory register(String name, String className, Map parameters) {
+ public LayerFactory register(String name, String className, Map<?, ?> parameters) {
logger.debug("register() : " + name);
if (!factories.containsKey(name)) {
if (!className.contains(".")) {
// assume this package to ease configuration
// prepend with model type
- if (className.endsWith("LayerFactory")) {
- className = className.substring(0,
- className.indexOf("LayerFactory"))
- .toLowerCase()
- + "." + className;
- }
+ if (className.endsWith("LayerFactory")) {
+ className = className.substring(0, className.indexOf("LayerFactory")).toLowerCase() + "."
+ + className;
+ }
className = "org.geomajas.layermodels." + className;
}
try {
- Class factoryClass = Class.forName(className);
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ Class<?> factoryClass = classloader.loadClass(className);
LayerFactory factory = null;
try {
- logger
- .debug("lookupByJavaClass() : trying map constructor");
- Constructor c = factoryClass.getConstructor(Map.class);
+ logger.debug("lookupByJavaClass() : trying map constructor");
+ Constructor<?> c = factoryClass.getConstructor(Map.class);
factory = (LayerFactory) c.newInstance(parameters);
} catch (NoSuchMethodException nsme) {
- logger
- .debug("lookupByJavaClass() : trying empty constructor");
- Constructor c = factoryClass.getConstructor();
+ logger.debug("lookupByJavaClass() : trying empty constructor");
+ Constructor<?> c = factoryClass.getConstructor();
factory = (LayerFactory) c.newInstance();
}
@@ -86,25 +81,18 @@
logger.error("Could not create instance of " + className, e);
throw new IllegalArgumentException("class not found");
} catch (ClassNotFoundException e) {
- logger.error("register() : class " + className + " not found",
- e);
+ logger.error("register() : class " + className + " not found", e);
throw new IllegalArgumentException("class not found");
} catch (IllegalAccessException e) {
- logger.error("register() : class " + className
- + " cannot be accessed", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " cannot be accessed", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
} catch (InstantiationException e) {
- logger.error(
- "register() : class " + className + " is abstract", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " is abstract", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
} catch (NoSuchMethodException e) {
- logger.error("register() : class " + className
- + " has no suitable constructor", e);
- throw new IllegalArgumentException("register() : class "
- + className + " is abstract");
+ logger.error("register() : class " + className + " has no suitable constructor", e);
+ throw new IllegalArgumentException("register() : class " + className + " is abstract");
}
}
return factories.get(className);
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-21 07:40:30 UTC (rev 3758)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateFeatureModel.java 2009-08-21 07:56:12 UTC (rev 3759)
@@ -57,16 +57,13 @@
import com.vividsolutions.jts.geom.Geometry;
-public class HibernateFeatureModel extends HibernateLayerUtil implements
- FeatureModel {
+public class HibernateFeatureModel extends HibernateLayerUtil implements FeatureModel {
- private static final Log log = LogFactory
- .getLog(HibernateFeatureModel.class);
+ private static final Log log = LogFactory.getLog(HibernateFeatureModel.class);
private DateFormat dateFormat;
- public HibernateFeatureModel(FeatureType type,
- HibernateLayerModelFactory factory) {
+ public HibernateFeatureModel(FeatureType type, HibernateLayerModelFactory factory) {
super(type, factory);
dateFormat = new SimpleDateFormat("dd/MM/yyyy");
}
@@ -117,7 +114,7 @@
public Object getAttribute(Object feature, String name) throws IOException {
try {
Object value = getPropertyValueRecursive(feature, name);
- if (value instanceof Collection) { // Transform Collections to
+ if (value instanceof Collection<?>) { // Transform Collections to
// arrays.
Collection<?> manyValue = (Collection<?>) value;
Object result[] = new Object[manyValue.size()];
@@ -130,19 +127,16 @@
return value;
}
} catch (Exception e) {
- log
- .error("Getting attribute " + name + " failed for "
- + feature, e);
- throw new IOException("Getting attribute " + name + " failed for "
- + feature + ". Reason: " + e.getMessage());
+ log.error("Getting attribute " + name + " failed for " + feature, e);
+ throw new IOException("Getting attribute " + name + " failed for " + feature + ". Reason: "
+ + e.getMessage());
}
}
public Map<String, Object> getAttributes(Object feature) throws IOException {
try {
Map<String, Object> attribs = new HashMap<String, Object>();
- for (BaseAttribute attribute : type.getAttributes()
- .getAttributeOrAssociation()) {
+ for (BaseAttribute attribute : type.getAttributes().getAttributeOrAssociation()) {
String name = attribute.getName();
if (name != getGeometryAttributeName()) {
Object value = this.getAttribute(feature, name);
@@ -152,8 +146,7 @@
return attribs;
} catch (Exception e) {
log.error("Getting all attributes failed ", e);
- throw new IOException("Getting all attributes failed for "
- + feature);
+ throw new IOException("Getting all attributes failed for " + feature);
}
}
@@ -163,9 +156,7 @@
Geometry geom = (Geometry) obj;
return (Geometry) geom.clone();
} else {
- throw new IOException("property "
- + type.getGeometryType().getName()
- + " is not of type Geometry");
+ throw new IOException("property " + type.getGeometryType().getName() + " is not of type Geometry");
}
}
@@ -174,8 +165,7 @@
}
public String getId(Object feature) throws IOException {
- return getEntityMetadata().getIdentifier(feature, EntityMode.POJO)
- .toString();
+ return getEntityMetadata().getIdentifier(feature, EntityMode.POJO).toString();
}
public String getCrs() throws IOException {
@@ -186,47 +176,38 @@
try {
return getEntityMetadata().instantiate(null, EntityMode.POJO);
} catch (Exception e) {
- log.error("Unexpected failure to create a POJO for entity "
- + type.getName(), e);
- throw new IOException(
- "Unexpected failure to create a POJO for entity "
- + type.getName());
+ log.error("Unexpected failure to create a POJO for entity " + type.getName(), e);
+ throw new IOException("Unexpected failure to create a POJO for entity " + type.getName());
}
}
public Object newInstance(String id) throws IOException {
try {
- Serializable ser = (Serializable) TypeConverter.convertFromString(
- id, getEntityMetadata().getIdentifierType()
- .getReturnedClass());
+ Serializable ser = (Serializable) TypeConverter.convertFromString(id, getEntityMetadata()
+ .getIdentifierType().getReturnedClass());
return getEntityMetadata().instantiate(ser, EntityMode.POJO);
} catch (Exception e) {
- log.error("Unexpected failure to create a POJO for entity "
- + type.getName(), e);
- throw new IOException(
- "Unexpected failure to create a POJO for entity "
- + type.getName());
+ log.error("Unexpected failure to create a POJO for entity " + type.getName(), e);
+ throw new IOException("Unexpected failure to create a POJO for entity " + type.getName());
}
}
public Class<?> getSuperClass() throws IOException {
if (type.getExtends() != null) {
try {
- return Class.forName(type.getExtends());
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ return classloader.loadClass(type.getExtends());
} catch (ClassNotFoundException e) {
- throw new IOException("Superclass " + type.getExtends()
- + " not found");
+ throw new IOException("Superclass " + type.getExtends() + " not found");
}
} else {
return null;
}
}
- public void setAttributes(Object feature, Map<String, Object> attributes)
- throws IOException {
+ public void setAttributes(Object feature, Map<String, Object> attributes) throws IOException {
try {
- for (BaseAttribute attribute : type.getAttributes()
- .getAttributeOrAssociation()) {
+ for (BaseAttribute attribute : type.getAttributes().getAttributeOrAssociation()) {
String name = attribute.getName();
Object value = attributes.get(name);
setAttribute(attribute, feature, value);
@@ -234,19 +215,16 @@
} catch (Exception e) {
log.error("Failed to set attributes for " + type.getName(), e);
- throw new IOException("Failed to set attributes for "
- + type.getName());
+ throw new IOException("Failed to set attributes for " + type.getName());
}
}
- private void setAttribute(BaseAttribute attribute, Object parent,
- Object value) throws IOException {
+ private void setAttribute(BaseAttribute attribute, Object parent, Object value) throws IOException {
if (attribute.isEditable()) {
if (attribute instanceof PrimitiveAttribute) {
PrimitiveAttribute prim = (PrimitiveAttribute) attribute;
PrimitiveType type = prim.getType();
- NameValuePair pair = getPropertyNameValuePair(parent, attribute
- .getName());
+ NameValuePair pair = getPropertyNameValuePair(parent, attribute.getName());
String name = pair.getName();
Object realParent = pair.getValue();
if (value != null) {
@@ -271,23 +249,19 @@
break;
}
}
- getMetadata(realParent.getClass()).setPropertyValue(realParent,
- name, value, EntityMode.POJO);
+ getMetadata(realParent.getClass()).setPropertyValue(realParent, name, value, EntityMode.POJO);
} else if (attribute instanceof AssociationAttribute) {
AssociationAttribute aso = (AssociationAttribute) attribute;
String name = attribute.getName();
if (aso.getType().value().equals("many-to-one")) {
- getMetadata(parent.getClass()).setPropertyValue(parent,
- name, value, EntityMode.POJO);
+ getMetadata(parent.getClass()).setPropertyValue(parent, name, value, EntityMode.POJO);
} else if (aso.getType().value().equals("one-to-many")) {
- Type type = getMetadata(parent.getClass()).getPropertyType(
- name);
+ Type type = getMetadata(parent.getClass()).getPropertyType(name);
if (type.isCollectionType() && value instanceof Object[]) {
Object[] array = (Object[]) value;
- copyArrayToPersistentCollection(array, aso.getObject(),
- parent, (Collection<?>) getMetadata(
- parent.getClass()).getPropertyValue(
- parent, name, EntityMode.POJO));
+ copyArrayToPersistentCollection(array, aso.getObject(), parent,
+ (Collection<?>) getMetadata(parent.getClass()).getPropertyValue(parent, name,
+ EntityMode.POJO));
}
}
}
@@ -295,9 +269,8 @@
}
@SuppressWarnings("unchecked")
- private void copyArrayToPersistentCollection(Object[] array,
- ObjectType type, Object parent, Collection<?> collection)
- throws IOException {
+ private void copyArrayToPersistentCollection(Object[] array, ObjectType type, Object parent,
+ Collection<?> collection) throws IOException {
ClassMetadata childMetaData = getMetadata(type.getName());
// find the parent property
Type[] types = childMetaData.getPropertyTypes();
@@ -312,25 +285,20 @@
Collection toAdd = new ArrayList();
for (int i = 0; i < array.length; i++) {
Object newChild = array[i];
- Serializable newId = childMetaData.getIdentifier(newChild,
- EntityMode.POJO);
+ Serializable newId = childMetaData.getIdentifier(newChild, EntityMode.POJO);
if (newId == null) {
toAdd.add(newChild);
if (parentName != null) {
- childMetaData.setPropertyValue(newChild, parentName,
- parent, EntityMode.POJO);
+ childMetaData.setPropertyValue(newChild, parentName, parent, EntityMode.POJO);
}
} else {
for (Object oldChild : collection) {
- Serializable oldId = childMetaData.getIdentifier(oldChild,
- EntityMode.POJO);
+ Serializable oldId = childMetaData.getIdentifier(oldChild, EntityMode.POJO);
if (oldId.equals(newId)) {
- List<BaseAttribute> attribs = type.getAttributes()
- .getAttributeOrAssociation();
+ List<BaseAttribute> attribs = type.getAttributes().getAttributeOrAssociation();
for (BaseAttribute attrib : attribs) {
- setAttribute(attrib, oldChild, childMetaData
- .getPropertyValue(newChild, attrib
- .getName(), EntityMode.POJO));
+ setAttribute(attrib, oldChild, childMetaData.getPropertyValue(newChild, attrib
+ .getName(), EntityMode.POJO));
}
}
}
@@ -339,13 +307,11 @@
// delete
Collection toDelete = new ArrayList();
for (Object oldChild : collection) {
- Serializable oldId = childMetaData.getIdentifier(oldChild,
- EntityMode.POJO);
+ Serializable oldId = childMetaData.getIdentifier(oldChild, EntityMode.POJO);
boolean found = false;
for (int i = 0; i < array.length; i++) {
Object newChild = array[i];
- Serializable newId = childMetaData.getIdentifier(newChild,
- EntityMode.POJO);
+ Serializable newId = childMetaData.getIdentifier(newChild, EntityMode.POJO);
if (oldId.equals(newId)) {
found = true;
}
@@ -359,8 +325,7 @@
collection.removeAll(toDelete);
}
- public void setGeometry(Object feature, Geometry geometry)
- throws IOException {
+ public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
String name = type.getGeometryType().getName();
@@ -368,20 +333,17 @@
name = pair.getName();
Object realFeature = pair.getValue();
- getSessionFactory().getClassMetadata(realFeature.getClass())
- .setPropertyValue(realFeature, name, geometry,
- EntityMode.POJO);
+ getSessionFactory().getClassMetadata(realFeature.getClass()).setPropertyValue(realFeature, name,
+ geometry, EntityMode.POJO);
} catch (Exception e) {
log.error("Failed to set geometry for " + type.getName(), e);
- throw new IOException("Failed to set geometry for "
- + type.getName());
+ throw new IOException("Failed to set geometry for " + type.getName());
}
}
public boolean canHandle(Object feature) {
try {
- return getEntityMetadata().getEntityName().equals(
- feature.getClass().getName());
+ return getEntityMetadata().getEntityName().equals(feature.getClass().getName());
} catch (IOException e) {
return false;
}
@@ -400,31 +362,25 @@
protected void setPersistentAssociations(Object feature) throws IOException {
try {
Map<String, Object> attributes = getAttributes(feature);
- for (BaseAttribute attribute : type.getAttributes()
- .getAttributeOrAssociation()) {
+ for (BaseAttribute attribute : type.getAttributes().getAttributeOrAssociation()) {
if (attribute instanceof AssociationAttribute) {
String name = attribute.getName();
Object value = attributes.get(name);
if (value != null) { // what would be the point? :-)
AssociationAttribute aso = (AssociationAttribute) attribute;
- Session session = HibernateTransactionInterceptor
- .getSession(this.factory);
- ClassMetadata meta = getSessionFactory()
- .getClassMetadata(aso.getObject().getName());
+ Session session = HibernateTransactionInterceptor.getSession(this.factory);
+ ClassMetadata meta = getSessionFactory().getClassMetadata(aso.getObject().getName());
if (aso.getType().value().equals("many-to-one")) {
- Serializable id = meta.getIdentifier(value,
- EntityMode.POJO);
+ Serializable id = meta.getIdentifier(value, EntityMode.POJO);
value = session.load(aso.getObject().getName(), id);
- getEntityMetadata().setPropertyValue(feature, name,
- value, EntityMode.POJO);
+ getEntityMetadata().setPropertyValue(feature, name, value, EntityMode.POJO);
} else if (aso.getType().value().equals("one-to-many")) {
// Get the reflection property name:
String refPropName = null;
Type[] types = meta.getPropertyTypes();
for (int i = 0; i < types.length; i++) {
String name1 = types[i].getName();
- String name2 = feature.getClass()
- .getCanonicalName();
+ String name2 = feature.getClass().getCanonicalName();
if (name1.equals(name2)) {
refPropName = meta.getPropertyNames()[i];
}
@@ -432,47 +388,36 @@
// This should be a collection:
Object[] array = (Object[]) value;
- Type type = getEntityMetadata().getPropertyType(
- name);
+ Type type = getEntityMetadata().getPropertyType(name);
CollectionType colType = (CollectionType) type;
- Collection<Object> col = (Collection<Object>) colType
- .instantiate(0);
+ Collection<Object> col = (Collection<Object>) colType.instantiate(0);
for (int i = 0; i < array.length; i++) {
- Serializable id = meta.getIdentifier(array[i],
- EntityMode.POJO);
+ Serializable id = meta.getIdentifier(array[i], EntityMode.POJO);
if (id != null) {
- Object persistent = session.load(aso
- .getObject().getName(), id);
+ Object persistent = session.load(aso.getObject().getName(), id);
String[] props = meta.getPropertyNames();
for (int j = 0; j < props.length; j++) {
if (!(props[j].equals(refPropName))) {
- Object propVal = meta
- .getPropertyValue(array[i],
- props[j],
- EntityMode.POJO);
- meta.setPropertyValue(persistent,
- props[j], propVal,
+ Object propVal = meta.getPropertyValue(array[i], props[j],
EntityMode.POJO);
+ meta.setPropertyValue(persistent, props[j], propVal,
+ EntityMode.POJO);
}
}
array[i] = persistent;
} else {
- meta.setPropertyValue(array[i],
- refPropName, feature,
- EntityMode.POJO);
+ meta.setPropertyValue(array[i], refPropName, feature, EntityMode.POJO);
}
col.add(array[i]);
}
- getEntityMetadata().setPropertyValue(feature, name,
- col, EntityMode.POJO);
+ getEntityMetadata().setPropertyValue(feature, name, col, EntityMode.POJO);
}
}
}
}
} catch (Exception e) {
log.error("Failed to set attributes for " + type.getName(), e);
- throw new IOException("Failed to set attributes for "
- + type.getName());
+ throw new IOException("Failed to set attributes for " + type.getName());
}
}
@@ -490,8 +435,7 @@
Class clazz = tempFeature.getClass();
ClassMetadata cmd = getSessionFactory().getClassMetadata(clazz);
- tempFeature = cmd.getPropertyValue(tempFeature, list[0],
- EntityMode.POJO);
+ tempFeature = cmd.getPropertyValue(tempFeature, list[0], EntityMode.POJO);
// If a number is given, get n'th element out of collection
if (list.length > 1) {
@@ -513,8 +457,7 @@
}
@SuppressWarnings("unchecked")
- private Object getPropertyValueRecursive(Object feature, String name)
- throws IOException {
+ private Object getPropertyValueRecursive(Object feature, String name) throws IOException {
if (feature == null) {
log.error("Feature is null !!!!");
return null;
@@ -528,16 +471,13 @@
tempFeature = getId(feature);
} else {
// Get attribute through metadata info:
- ClassMetadata cmd = getSessionFactory().getClassMetadata(
- feature.getClass());
+ ClassMetadata cmd = getSessionFactory().getClassMetadata(feature.getClass());
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));
+ cmd = getSessionFactory().getClassMetadata(tmp.substring(0, pos));
}
- tempFeature = cmd.getPropertyValue(feature, list[0],
- EntityMode.POJO);
+ tempFeature = cmd.getPropertyValue(feature, list[0], EntityMode.POJO);
}
// Detect if the property is a collection
@@ -583,6 +523,7 @@
}
private class NameValuePair {
+
private String name;
private Object value;
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java 2009-08-21 07:40:30 UTC (rev 3758)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/hibernate/HibernateLayerModelFactory.java 2009-08-21 07:56:12 UTC (rev 3759)
@@ -55,9 +55,9 @@
import com.vividsolutions.jts.geom.Geometry;
public class HibernateLayerModelFactory extends AbstractLayerModelFactory {
- private static final Log logger = LogFactory
- .getLog(HibernateLayerModelFactory.class);
+ private static final Log logger = LogFactory.getLog(HibernateLayerModelFactory.class);
+
private AnnotationConfiguration configuration;
private SessionFactory sessionFactory;
@@ -77,13 +77,11 @@
this(id, "hibernate.cfg.xml");
}
- public LayerModel createLayerModel(FeatureType featureType)
- throws IOException {
+ public LayerModel createLayerModel(FeatureType featureType) throws IOException {
try {
- logger.debug("Creating Hibernate layer model: "+featureType.getName());
+ logger.debug("Creating Hibernate layer model: " + featureType.getName());
- HibernateLayerModel layermodel = new HibernateLayerModel(
- featureType, this);
+ HibernateLayerModel layermodel = new HibernateLayerModel(featureType, this);
if (!classExists(featureType.getName())) {
generatedTypes.add(featureType);
}
@@ -131,63 +129,59 @@
}
}
- private Class createClass(final FeatureType type) {
+ private Class<?> createClass(final FeatureType type) {
// generate the class
BeanGenerator gen = new BeanGenerator();
// need to set this (it seems to reuse the previous class otherwise)
gen.setUseCache(false);
// TODO: is this the better way to set the class name ?
gen.setNamingPolicy(new NamingPolicy() {
- public String getClassName(String prefix, String source,
- Object key, Predicate names) {
+
+ public String getClassName(String prefix, String source, Object key, Predicate names) {
return type.getName();
}
});
if (type.getExtends() != null) {
String superName = allTypes.get(type.getExtends()).getName();
- Class superClass = null;
+ Class<?> superClass = null;
if (!classExists(superName)) {
superClass = createClass(allTypes.get(type.getExtends()));
} else {
try {
- superClass = Class.forName(superName);
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ superClass = classloader.loadClass(superName);
} catch (ClassNotFoundException e) {
// cannot happen
}
}
gen.setSuperclass(superClass);
}
- gen.addProperty(type.getIdentifier().getName(), TypeFactory
- .heuristicType(type.getIdentifier().getType().value())
- .getReturnedClass());
- for (BaseAttribute base : type.getAttributes()
- .getAttributeOrAssociation()) {
+ gen.addProperty(type.getIdentifier().getName(), TypeFactory.heuristicType(
+ type.getIdentifier().getType().value()).getReturnedClass());
+ for (BaseAttribute base : type.getAttributes().getAttributeOrAssociation()) {
if (base instanceof PrimitiveAttribute) {
PrimitiveAttribute primitive = (PrimitiveAttribute) base;
- gen.addProperty(primitive.getName(), TypeFactory.heuristicType(
- primitive.getType().value()).getReturnedClass());
+ gen.addProperty(primitive.getName(), TypeFactory.heuristicType(primitive.getType().value())
+ .getReturnedClass());
} else if (base instanceof AssociationAttribute) {
AssociationAttribute association = (AssociationAttribute) base;
if (association.getType() == AssociationType.MANY_TO_ONE) {
- Class clazz = null;
+ Class<?> clazz = null;
if (association.getFeature() != null) {
if (allTypes.containsKey(association.getFeature())) {
- String className = allTypes.get(
- association.getFeature()).getName();
+ String className = allTypes.get(association.getFeature()).getName();
if (classExists(className)) {
try {
- clazz = Class.forName(className);
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ clazz = classloader.loadClass(className);
} catch (ClassNotFoundException e) {
// cannot happen
}
} else {
- clazz = createClass(allTypes.get(association
- .getFeature()));
+ clazz = createClass(allTypes.get(association.getFeature()));
}
} else {
- throw new IllegalArgumentException(
- "missing feature "
- + association.getFeature());
+ throw new IllegalArgumentException("missing feature " + association.getFeature());
}
} else {
clazz = createClass(association.getObject());
@@ -197,11 +191,11 @@
}
}
gen.addProperty(type.getGeometryType().getName(), Geometry.class);
- Class c = (Class) gen.createClass();
+ Class<?> c = (Class<?>) gen.createClass();
return c;
}
- private Class createClass(final ObjectType type) {
+ private Class<?> createClass(final ObjectType type) {
// generate the class
BeanGenerator gen = new BeanGenerator();
// need to set this (it seems to reuse the previous class otherwise)
@@ -209,23 +203,21 @@
// TODO: is this the better way to set the class name ?
gen.setNamingPolicy(new NamingPolicy() {
- public String getClassName(String prefix, String source,
- Object key, Predicate names) {
+
+ public String getClassName(String prefix, String source, Object key, Predicate names) {
return type.getName();
}
});
- gen.addProperty(type.getIdentifier().getName(), TypeFactory
- .heuristicType(type.getIdentifier().getType().value())
- .getReturnedClass());
- for (BaseAttribute base : type.getAttributes()
- .getAttributeOrAssociation()) {
+ gen.addProperty(type.getIdentifier().getName(), TypeFactory.heuristicType(
+ type.getIdentifier().getType().value()).getReturnedClass());
+ for (BaseAttribute base : type.getAttributes().getAttributeOrAssociation()) {
if (base instanceof PrimitiveAttribute) {
PrimitiveAttribute primitive = (PrimitiveAttribute) base;
- gen.addProperty(primitive.getName(), TypeFactory.heuristicType(
- primitive.getType().value()).getReturnedClass());
+ gen.addProperty(primitive.getName(), TypeFactory.heuristicType(primitive.getType().value())
+ .getReturnedClass());
}
}
- Class c = (Class) gen.createClass();
+ Class<?> c = (Class<?>) gen.createClass();
return c;
}
@@ -234,40 +226,32 @@
Document document = DocumentHelper.createDocument();
Element root = document.addElement("hibernate-mapping");
- Element classElement = root.addElement("class").addAttribute("name",
- type.getName());
+ Element classElement = root.addElement("class").addAttribute("name", type.getName());
- Element id = classElement.addElement("id").addAttribute("name",
- type.getIdentifier().getName()).addAttribute("type",
- type.getIdentifier().getType().value());
+ Element id = classElement.addElement("id").addAttribute("name", type.getIdentifier().getName())
+ .addAttribute("type", type.getIdentifier().getType().value());
id.addElement("generator").addAttribute("class", "increment");
- for (BaseAttribute base : type.getAttributes()
- .getAttributeOrAssociation()) {
+ for (BaseAttribute base : type.getAttributes().getAttributeOrAssociation()) {
if (base instanceof PrimitiveAttribute) {
PrimitiveAttribute primitive = (PrimitiveAttribute) base;
- classElement.addElement("property").addAttribute("name",
- primitive.getName()).addAttribute("type",
- primitive.getType().value());
+ classElement.addElement("property").addAttribute("name", primitive.getName()).addAttribute(
+ "type", primitive.getType().value());
} else if (base instanceof AssociationAttribute) {
AssociationAttribute association = (AssociationAttribute) base;
if (association.getType() == AssociationType.MANY_TO_ONE) {
- classElement.addElement("many-to-one").addAttribute("name",
- association.getName());
+ classElement.addElement("many-to-one").addAttribute("name", association.getName());
if (association.getFeature() != null) {
- classElement.addAttribute("type", allTypes.get(
- association.getFeature()).getName());
+ classElement.addAttribute("type", allTypes.get(association.getFeature()).getName());
} else {
- classElement.addAttribute("type", association
- .getObject().getName());
+ classElement.addAttribute("type", association.getObject().getName());
}
}
}
}
- classElement.addElement("property").addAttribute("name",
- type.getGeometryType().getName()).addAttribute("type",
- "org.hibernatespatial.GeometryUserType");
+ classElement.addElement("property").addAttribute("name", type.getGeometryType().getName())
+ .addAttribute("type", "org.hibernatespatial.GeometryUserType");
DocumentType docType = new DefaultDocumentType("hibernate-mapping",
"-//Hibernate/Hibernate Mapping DTD 3.0//EN",
@@ -279,11 +263,15 @@
private boolean classExists(String name) {
try {
- Class.forName(name);
- return true;
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ Class<?> clazz = classloader.loadClass(name);
+ if (clazz != null) {
+ return true;
+ }
} catch (Throwable t) {
return false;
}
+ return false;
}
}
|
|
From: <sv...@ge...> - 2009-08-21 08:40:17
|
Author: pieterdg
Date: 2009-08-21 09:40:30 +0200 (Fri, 21 Aug 2009)
New Revision: 3758
Modified:
branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/attributes/AttributeEditorFactory.js
Log:
Fix for MAJ-335: instead of undefined, false will be returned.
Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/attributes/AttributeEditorFactory.js
===================================================================
--- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/attributes/AttributeEditorFactory.js 2009-08-21 07:18:15 UTC (rev 3757)
+++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/attributes/AttributeEditorFactory.js 2009-08-21 07:40:30 UTC (rev 3758)
@@ -97,7 +97,10 @@
}
return parseFloat(value);
} else if (atDef.getType() == "boolean") {
- return widget.checked;
+ if (widget.checked) { // widget.checked can be undefined.
+ return true;
+ }
+ return false;
} else if (atDef.getType() == "date") {
return value;
} else if(atDef.getType() == "many-to-one"){
|
Author: joachimvda
Date: 2009-08-21 09:18:15 +0200 (Fri, 21 Aug 2009)
New Revision: 3757
Added:
branches/1.3.x_planbaten_pre1.5/
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/LogCommand.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFilterTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/wkt/
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/wkt/WKTLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shx
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/fr/
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/pt/
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/activityDiv.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/attributes.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/downloadDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/legend.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/scaleSelect.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/styleWidgets.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/activityDiv.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/attributes.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/downloadDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/legend.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/scaleSelect.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/styleWidgets.js
Removed:
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonResult.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFilterTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/wkt/WKTLayerModelTest.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shx
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/activityDiv.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/attributes.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/downloadDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/legend.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/scaleSelect.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/styleWidgets.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/activityDiv.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/attributes.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/downloadDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureTableTooltip.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/legend.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/printDialog.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/scaleSelect.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/styleWidgets.js
Modified:
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/en/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/action/nls/tooltips.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/io/CommandDispatcher.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/map/MapModel.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/DefaultPrintWidget.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/ExtendedFeatureListTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailEditor.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailTable.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/FontStyleWidget.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/LineStringStyleWidget.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/DefaultPrintWidget.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/ExtendedFeatureListTable.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailEditor.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailTable.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidget.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidgetH.html
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/en/styleWidgets.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/styleWidgets.js
branches/1.3.x_planbaten_pre1.5/majas-js/src/main/webapp/js/geomajas/widget/nls/styleWidgets.js
branches/1.3.x_planbaten_pre1.5/majas-maven/pom.xml
Log:
integrate changes in 1.3.x since 1.4 release to prepare for 1.5 merge
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonCommand.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -79,7 +79,7 @@
private MultiPolygon polygon;
public void execute() {
- result = new GetFeaturesByPolygonResult();
+ result = new SearchFeaturesResult();
try {
// create the bbox filter
@@ -91,6 +91,8 @@
.getGeometryType().getName();
Filter f = FilterCreator.createIntersectsFilter(polygon, geomName);
+<<<<<<< .working
+<<<<<<< .working
try {
if (filter != null)
f = FilterCreator.createLogicFilter(f, "and", CQL.toFilter(filter));
@@ -101,22 +103,47 @@
}
List<String> ids = new ArrayList<String>();
+=======
+ FeatureRenderer painter = new FeatureRenderer();
+ map
+ .paint(painter, new String[] { layer }, new Filter[] { f },
+ null);
+ List<Feature> features = new ArrayList<Feature>();
+>>>>>>> .merge-right.r3756
+=======
+ FeatureRenderer painter = new FeatureRenderer();
+ map
+ .paint(painter, new String[] { layer }, new Filter[] { f },
+ null);
+ List<Feature> features = new ArrayList<Feature>();
+>>>>>>> .merge-right.r3756
+<<<<<<< .working
FeaturePainter painter = new FeaturePainterImpl();
vectorLayer.paint(painter, f, null, map.getDefaultCrs());
List<RenderedFeature> features = new ArrayList<RenderedFeature>();
for (RenderedFeature feature : features) {
Geometry geometry = vectorLayer.getLayerModel().getFeatureModel().getGeometry(feature);
+=======
+ while (iterator.hasNext()) {
+ Feature feature = iterator.next();
+<<<<<<< .working
+ Geometry geometry = feature.getGeometry();
+>>>>>>> .merge-right.r3756
+=======
+ Geometry geometry = feature.getGeometry();
+>>>>>>> .merge-right.r3756
double area = geometry.getArea();
Geometry intersection = geometry.intersection(polygon);
double interArea = intersection.getArea();
float geomPercentage = (float) (interArea / area);
if (geomPercentage > percentage) {
- ids.add(feature.getLocalId());
+ features.add(feature);
}
}
- ((GetFeaturesByPolygonResult) result).addAll(ids);
+ result = new SearchFeaturesResult(layer, features
+ .toArray(new Feature[] {}));
} catch (IOException e) {
logger.error("execute() : problem accessing layer", e);
result.addErrorMessage("problem accessing layer");
Deleted: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonResult.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonResult.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/GetFeaturesByPolygonResult.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -1,48 +0,0 @@
-/**
- * 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/>.
- */
-package org.geomajas.command;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class GetFeaturesByPolygonResult extends ApplicationResult {
-
- private List<String> ids;
-
- // Constructors:
-
- public GetFeaturesByPolygonResult() {
- ids = new ArrayList<String>();
- }
-
- // Getters and setters:
-
- public List<String> getIds() {
- return ids;
- }
-
- public void addAll(List<String> ids) {
- this.ids.addAll(ids);
- }
-}
Copied: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/LogCommand.java (from rev 3756, branches/1.3.x/majas-core/src/main/java/org/geomajas/command/LogCommand.java)
===================================================================
--- branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/LogCommand.java (rev 0)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/command/LogCommand.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -0,0 +1,58 @@
+package org.geomajas.command;
+
+import org.apache.log4j.Logger;
+import org.geomajas.command.AbstractApplicationCommand;
+import org.geomajas.command.ApplicationResult;
+
+public class LogCommand extends AbstractApplicationCommand {
+
+ private static final int LEVEL_DEBUG = 0;
+
+ private static final int LEVEL_INFO = 1;
+
+ private static final int LEVEL_WARN = 2;
+
+ private static final int LEVEL_ERROR = 3;
+
+ private static final Logger logger = Logger.getLogger(LogCommand.class);
+
+ private String statement;
+
+ private int level = 1;
+
+ // ApplicationCommand implementation:
+
+ public void execute() {
+ switch (level) {
+ case LEVEL_DEBUG:
+ logger.debug(statement);
+ break;
+ case LEVEL_INFO:
+ logger.info(statement);
+ break;
+ case LEVEL_WARN:
+ logger.warn(statement);
+ break;
+ case LEVEL_ERROR:
+ logger.error(statement);
+ break;
+ }
+ result = new ApplicationResult();
+ }
+
+ public String getStatement() {
+ return statement;
+ }
+
+ public void setStatement(String statement) {
+ this.statement = statement;
+ }
+
+ public int getLevel() {
+ return level;
+ }
+
+ public void setLevel(int level) {
+ this.level = level;
+ }
+}
\ No newline at end of file
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -109,9 +109,17 @@
} else if (comparator.equals("==")) {
return ff.equals(attrib, val);
} else if (comparator.equals("<>")) {
+<<<<<<< .working
+<<<<<<< .working
return ff.notEqual(attrib, val, false); // XXX ff.notEqual
// -->(expr1,epr2,
- // matchCase)
+ // matchCase)
+=======
+ return ff.notEqual(attrib, val, false); // XXX ff.notEqual -->(expr1,epr2, matchCase)
+>>>>>>> .merge-right.r3756
+=======
+ return ff.notEqual(attrib, val, false); // XXX ff.notEqual -->(expr1,epr2, matchCase)
+>>>>>>> .merge-right.r3756
} else {
throw new IllegalArgumentException("Could not interprete compare filter. Argument (" + value
+ ") not known.");
@@ -174,25 +182,57 @@
Id filter = ff.id(ids);
return filter;
}
-
+
+ /**
+ * Creates a filter with all the geometries that contain the parameterized geometry (including the
+ * geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createContainsFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().contains(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that lie completely within the parameterized geometry (including the
+ * geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createWithinFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().within(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that have a non-empty intersection (overlap or touching) with the
+ * parameterized geometry (including the geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createIntersectsFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().intersects(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that touch the
+ * parameterized geometry.
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createTouchesFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
@@ -204,16 +244,42 @@
.getMaxY(), epsg);
}
- public static Filter createOverlapsFilter(String geomName1, String geomName2) {
- Expression attrib1 = ff.property(geomName1);
- Expression attrib2 = ff.property(geomName2);
- return getGeoToolsFactory().overlaps(attrib1, attrib2);
+<<<<<<< .working
+<<<<<<< .working
+ public static Filter createOverlapsFilter(Geometry geom, String geomName) {
+ Expression attrib = ff.property(geomName);
+ Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
+ return getGeoToolsFactory().overlaps(attrib, geo);
}
public static Filter createTransformedFilter(Filter f, MathTransform transform, String targetCRS) {
return (Filter) f.accept(new TransformerVisitor(transform, targetCRS), null);
}
+=======
+ public static Filter createOverlapsFilter(Geometry geom, String geomName) {
+ Expression attrib = ff.property(geomName);
+ Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
+ return getGeoToolsFactory().overlaps(attrib, geo);
+ }
+
+ public static Filter createTransformedFilter(Filter f, MathTransform transform, String targetCRS){
+ return (Filter)f.accept(new TransformerVisitor(transform,targetCRS), null);
+ }
+
+>>>>>>> .merge-right.r3756
+=======
+ public static Filter createOverlapsFilter(Geometry geom, String geomName) {
+ Expression attrib = ff.property(geomName);
+ Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
+ return getGeoToolsFactory().overlaps(attrib, geo);
+ }
+
+ public static Filter createTransformedFilter(Filter f, MathTransform transform, String targetCRS){
+ return (Filter)f.accept(new TransformerVisitor(transform,targetCRS), null);
+ }
+
+>>>>>>> .merge-right.r3756
public static Filter createTrueFilter() {
return new Filter() {
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -203,15 +203,69 @@
}
public Object visit(Overlaps filter, Object userData) {
- PropertyName prop1 = (PropertyName) filter.getExpression1();
- PropertyName prop2 = (PropertyName) filter.getExpression2();
- return FilterCreator.createOverlapsFilter(prop1.getPropertyName(), prop2.getPropertyName());
+<<<<<<< .working
+<<<<<<< .working
+=======
+=======
+ try {
+ PropertyName prop = (PropertyName) filter.getExpression1();
+ Literal lit = (Literal) filter.getExpression2();
+ Geometry targetGeom = JTS.transform((Geometry) lit.getValue(),
+ transform);
+ targetGeom.setSRID(GeoUtil.getSRIDFromCRS(targetCRS));
+ return FilterCreator.createOverlapsFilter(targetGeom, prop
+ .getPropertyName());
+ } catch (MismatchedDimensionException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ } catch (TransformException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ }
}
public Object visit(Touches filter, Object userData) {
+>>>>>>> .merge-right.r3756
try {
PropertyName prop = (PropertyName) filter.getExpression1();
Literal lit = (Literal) filter.getExpression2();
+ Geometry targetGeom = JTS.transform((Geometry) lit.getValue(),
+ transform);
+ targetGeom.setSRID(GeoUtil.getSRIDFromCRS(targetCRS));
+ return FilterCreator.createOverlapsFilter(targetGeom, prop
+ .getPropertyName());
+ } catch (MismatchedDimensionException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ } catch (TransformException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ }
+ }
+
+ public Object visit(Touches filter, Object userData) {
+>>>>>>> .merge-right.r3756
+ try {
+ PropertyName prop = (PropertyName) filter.getExpression1();
+ Literal lit = (Literal) filter.getExpression2();
+ Geometry targetGeom = JTS.transform((Geometry) lit.getValue(),
+ transform);
+ targetGeom.setSRID(GeoUtil.getSRIDFromCRS(targetCRS));
+ return FilterCreator.createOverlapsFilter(targetGeom, prop
+ .getPropertyName());
+ } catch (MismatchedDimensionException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ } catch (TransformException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ }
+ }
+
+ public Object visit(Touches filter, Object userData) {
+ try {
+ PropertyName prop = (PropertyName) filter.getExpression1();
+ Literal lit = (Literal) filter.getExpression2();
Geometry targetGeom = JTS.transform((Geometry) lit.getValue(), transform);
targetGeom.setSRID(GeoUtil.getSRIDFromCRS(targetCRS));
return FilterCreator.createTouchesFilter(targetGeom, prop.getPropertyName());
Copied: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java (from rev 3756, branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java)
===================================================================
--- branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java (rev 0)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -0,0 +1,28 @@
+package org.geomajas.core.util;
+
+
+public class WebSafeStringEncoder {
+
+ public static String escapeHTML(String s) {
+ StringBuilder buf = new StringBuilder(s.length());
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+ if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9') {
+ buf.append(c);
+// } else if ((int)c == 32) {
+// buf.append(" ");
+// } else if ((int)c == 34) {
+// buf.append(""");
+// } else if ((int)c == 38) {
+// buf.append("&");
+// } else if ((int)c == 60) {
+// buf.append("<");
+// } else if ((int)c == 62) {
+// buf.append(">");
+ } else {
+ buf.append("&#").append((int) c).append(";");
+ }
+ }
+ return buf.toString();
+ }
+}
\ No newline at end of file
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -27,6 +27,7 @@
import org.geotools.data.DataStore;
import org.geotools.data.FeatureSource;
+import org.geotools.feature.Feature;
import org.geotools.referencing.CRS;
/**
@@ -121,4 +122,13 @@
public String getFeatureSourceCRS() {
return featureSourceCRS;
}
+
+
+ protected Feature asFeature(Object possibleFeature) throws IOException {
+ if (possibleFeature instanceof Feature) {
+ return (Feature) possibleFeature;
+ } else {
+ throw new IOException("Not a legal feature, does not support the \"Feature\" interface.");
+ }
+ }
}
\ No newline at end of file
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -77,7 +77,8 @@
}
public String getId(Object feature) throws IOException {
- return asFeature(feature).getID();
+ Feature featureAsFeature = asFeature(feature);
+ return featureAsFeature.getID().substring(featureAsFeature.getID().lastIndexOf(".") + 1);
}
public String getCrs() throws IOException {
@@ -127,16 +128,6 @@
return feature instanceof Feature;
}
- // Private functions:
-
- private Feature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof Feature) {
- return (Feature) possibleFeature;
- } else {
- throw new IOException("Not a legal feature, does not implement Feature interface");
- }
- }
-
public Class<?> getSuperClass() throws IOException {
return null;
}
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -55,7 +55,6 @@
import com.vividsolutions.jts.geom.Envelope;
-@SuppressWarnings("unchecked")
public class GeotoolsLayerModel extends FeatureSourceRetriever implements LayerModel {
private static final Log logger = LogFactory.getLog(GeotoolsLayerModel.class);
@@ -82,7 +81,7 @@
FeatureStore store = (FeatureStore) source;
FeatureCollection col = DataUtilities.collection(new Feature[] { (Feature) feature });
store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
- Set ids = store.addFeatures(col);
+ Set<?> ids = store.addFeatures(col);
String newId = (String) ids.iterator().next();
logger.debug("Created feature " + newId + " in " + getFeatureSourceName());
return read(newId);
@@ -185,6 +184,8 @@
* @return the bounds of the specified features
*/
public Envelope getBounds(Filter filter) throws IOException {
+<<<<<<< .working
+<<<<<<< .working
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
@@ -202,17 +203,24 @@
}
throw new IOException(t.getCause().getMessage());
}
+=======
+ FeatureCollection fc = getFeatureSource().getFeatures((org.geotools.filter.Filter) filter);
+=======
+ FeatureCollection fc = getFeatureSource().getFeatures((org.geotools.filter.Filter) filter);
+>>>>>>> .merge-right.r3756
+ return fc.getBounds();
+>>>>>>> .merge-right.r3756
}
- public Iterator getElements(Filter filter) throws IOException {
+ public Iterator<?> getElements(Filter filter) throws IOException {
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
}
try {
- FeatureCollection fc = source.getFeatures(filter);
- Iterator it = fc.iterator();
+ FeatureCollection fc = source.getFeatures((org.geotools.filter.Filter) filter);
+ Iterator<?> it = fc.iterator();
GeotoolsTransactionInterceptor.addIterator(fc, it);
return it;
@@ -229,7 +237,7 @@
return this.featureModel;
}
- public Iterator getObjects(String attributeName, Filter filter) throws IOException {
+ public Iterator<?> getObjects(String attributeName, Filter filter) throws IOException {
return Collections.EMPTY_LIST.iterator();
}
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -23,7 +23,11 @@
*/
package org.geomajas.layermodels.geotools;
+import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -32,7 +36,7 @@
import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.AbstractLayerModelFactory;
import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.global.MajasContextListener;
+import org.geomajas.core.application.LayerModelFactory;
import org.geomajas.layermodels.geotools.postgis.NonTypedPostgisFIDMapperFactory;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
@@ -55,15 +59,35 @@
this.parameters = new HashMap<String, String>(parameters);
if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
String url = this.parameters.get("url");
- if (url.startsWith("file:")) {
- url = this.parameters.remove("url");
- String root = MajasContextListener.getWebappRoot().substring(2);
- url = "file:" + root + url.substring(5);
- url = url.replace('\\', '/');
- this.parameters.put("url", url);
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
+ }
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
}
- }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
+ }
+ }
+ }
}
public LayerModel createLayerModel(FeatureType featureType) throws IOException {
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -30,6 +30,7 @@
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.geotools.FeatureSourceRetriever;
import org.geotools.data.DataStore;
import org.geotools.feature.Feature;
@@ -41,20 +42,23 @@
private static final Log logger = LogFactory.getLog(ShapeInMemFeatureModel.class);
+ private int srid;
+
// Constructor:
- public ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName) {
+ public ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, String crs) {
super(dataStore, featureSourceName);
+ this.srid = GeoUtil.getSRIDFromCRS(crs);
}
// FeatureModel implementation:
public Object getAttribute(Object feature, String name) throws IOException {
- return asFeature(feature).getFeature().getAttribute(name);
+ return asFeature(feature).getAttribute(name);
}
public Map<String, Object> getAttributes(Object feature) throws IOException {
- Feature f = asFeature(feature).getFeature();
+ Feature f = asFeature(feature);
HashMap<String, Object> attribs = new HashMap<String, Object>();
for (int i = 0; i < f.getNumberOfAttributes(); i++) {
attribs.put(f.getFeatureType().getAttributeType(i).getLocalName(), f.getAttribute(i));
@@ -63,11 +67,11 @@
}
public String getCrs() throws IOException {
- return getFeatureSourceCRS();
+ return "EPSG:" + srid;
}
public Geometry getGeometry(Object feature) throws IOException {
- Geometry geom = asFeature(feature).getFeature().getDefaultGeometry();
+ Geometry geom = asFeature(feature).getDefaultGeometry();
return (Geometry) geom.clone();
}
@@ -76,12 +80,13 @@
}
public String getId(Object feature) throws IOException {
- return asFeature(feature).getId();
+ Feature realFeature = asFeature(feature);
+ return getLocalId(realFeature.getID());
}
public Object newInstance() throws IOException {
try {
- return new WrappedFeature(getSchema().create(null));
+ return getSchema().create(null);
} catch (IllegalAttributeException e) {
logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
@@ -90,7 +95,7 @@
public Object newInstance(String id) throws IOException {
try {
- return new WrappedFeature(getSchema().create(null, id));
+ return getSchema().create(null, id);
} catch (IllegalAttributeException e) {
logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
@@ -101,7 +106,7 @@
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
try {
if (!entry.getKey().equals(getGeometryAttributeName())) {
- asFeature(feature).getFeature().setAttribute(entry.getKey(), entry.getValue());
+ asFeature(feature).setAttribute(entry.getKey(), entry.getValue());
}
} catch (IllegalAttributeException e) {
throw new IOException("Illegal attribute name/value : " + entry.getKey() + "/"
@@ -112,7 +117,7 @@
public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
- asFeature(feature).getFeature().setDefaultGeometry(geometry);
+ asFeature(feature).setDefaultGeometry(geometry);
} catch (IllegalAttributeException e) {
throw new IOException("Illegal geometry value : " + geometry);
}
@@ -128,11 +133,14 @@
// Private functions:
- private WrappedFeature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof WrappedFeature) {
- return (WrappedFeature) possibleFeature;
- } else {
- throw new IOException("Not a legal feature, is not a WrappedFeature");
+ private String getLocalId(String featureId) {
+ if (featureId != null) {
+ int pos = featureId.lastIndexOf(".");
+ if (pos >= 0) {
+ return featureId.substring(pos + 1);
+ }
+ return featureId;
}
+ return null;
}
}
\ No newline at end of file
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -34,18 +34,21 @@
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.LayerModelFactory;
import org.geomajas.core.application.feature.FeatureModel;
+import org.geomajas.core.filters.FilterCreator;
import org.geomajas.layermodels.geotools.FeatureSourceRetriever;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
+import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureIterator;
import org.opengis.filter.Filter;
+import org.opengis.filter.Id;
import com.vividsolutions.jts.geom.Envelope;
public class ShapeInMemLayerModel extends FeatureSourceRetriever implements LayerModel {
- private Map<String, WrappedFeature> features = new HashMap<String, WrappedFeature>();
+ private Map<String, Feature> features = new HashMap<String, Feature>();
private int nextId = 0;
@@ -57,14 +60,24 @@
FeatureType featureType) throws IOException {
super(dataStore, featureType.getName());
this.factory = factory;
+ featureModel = new ShapeInMemFeatureModel(dataStore, featureType.getName(), featureType
+ .getGeometryType().getCrs());
initFeatures();
- featureModel = new ShapeInMemFeatureModel(dataStore, featureType.getName());
}
public Iterator<?> getElements(Filter filter) throws IOException {
- List<WrappedFeature> filteredList = new ArrayList<WrappedFeature>();
- for (WrappedFeature feature : features.values()) {
- if (filter.evaluate(feature.getFeature())) {
+ Filter realFilter = filter;
+ List<Feature> filteredList = new ArrayList<Feature>();
+ if (filter instanceof Id) {
+ Iterator<?> iterator = ((Id) filter).getIdentifiers().iterator();
+ List<String> identifiers = new ArrayList<String>();
+ while (iterator.hasNext()) {
+ identifiers.add(getFeatureSourceName() + "." + iterator.next());
+ }
+ realFilter = FilterCreator.createFidFilter(identifiers.toArray(new String[] {}));
+ }
+ for (Feature feature : features.values()) {
+ if (realFilter.evaluate(feature)) {
filteredList.add(feature);
}
}
@@ -90,10 +103,13 @@
}
public Object create(Object feature) throws IOException {
- WrappedFeature wrapped = asFeature(feature);
- wrapped.setId(getNextId());
- features.put(wrapped.getId(), wrapped);
- return wrapped;
+ String id = featureModel.getId(feature);
+ if (id != null && !features.containsKey(id)) {
+ Feature realFeature = asFeature(feature);
+ features.put(id, realFeature);
+ return realFeature;
+ }
+ return null;
}
public Object read(String featureId) throws IOException {
@@ -127,14 +143,6 @@
// Private functions:
- private WrappedFeature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof WrappedFeature) {
- return (WrappedFeature) possibleFeature;
- } else {
- throw new IOException("Not a legal feature, is not a WrappedFeature");
- }
- }
-
private synchronized String getNextId() {
String id = nextId + "";
nextId++;
@@ -146,18 +154,14 @@
col = getFeatureSource().getFeatures();
FeatureIterator iterator = col.features();
while (iterator.hasNext()) {
- WrappedFeature feature = new WrappedFeature(iterator.next());
- features.put(feature.getId(), feature);
- trackNextId(feature.getId());
+ Feature feature = iterator.next();
+ String id = featureModel.getId(feature);
+ features.put(id, feature);
+ int intId = new Integer(id).intValue();
+ if (intId > nextId) {
+ nextId = intId;
+ }
}
getNextId();
}
-
- private void trackNextId(String fid) {
- int id = new Integer(fid).intValue();
- if (id > nextId) {
- nextId = id;
- }
- }
-
}
\ No newline at end of file
Modified: branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
===================================================================
--- branches/1.3.x_planbaten/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -1,69 +1,92 @@
-/**
- * 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/>.
- */
-package org.geomajas.layermodels.shapeinmem;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.geomajas.core.application.AbstractLayerModelFactory;
-import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.application.LayerModelFactory;
-import org.geomajas.schemas.configuration.FeatureType;
-import org.geotools.data.DataStore;
-import org.geotools.data.shapefile.ShapefileDataStore;
-import org.hibernatespatial.SpatialRelation;
-
-public class ShapeInMemLayerModelFactory extends AbstractLayerModelFactory {
-
- private Map<String, String> parameters;
-
- public ShapeInMemLayerModelFactory(String id, Map<String, String> parameters) {
- super(id);
- this.parameters = new HashMap<String, String>(parameters);
- if (this.parameters.containsKey("url")) {
- String url = this.parameters.get("url");
- if (url.startsWith("file:")) {
- url = this.parameters.remove("url");
- File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
- url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
- + url.substring(5).replace(File.separator, "/");
- this.parameters.put("url", url);
- }
- }
- }
-
- public LayerModel createLayerModel(FeatureType featureType) throws IOException {
- DataStore dataStore = new ShapefileDataStore(new URL(parameters.get("url")));
- return new ShapeInMemLayerModel(this, dataStore, featureType);
- }
-
- public Map<Object, Object> getRelatedFeatures(SpatialRelation query) throws IOException {
- // TODO Auto-generated method stub
- return null;
- }
-
+/**
+ * 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/>.
+ */
+package org.geomajas.layermodels.shapeinmem;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.geomajas.core.application.AbstractLayerModelFactory;
+import org.geomajas.core.application.LayerModel;
+import org.geomajas.core.application.LayerModelFactory;
+import org.geomajas.schemas.configuration.FeatureType;
+import org.geotools.data.DataStore;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.hibernatespatial.SpatialRelation;
+
+public class ShapeInMemLayerModelFactory extends AbstractLayerModelFactory {
+
+ private Map<String, String> parameters;
+
+ public ShapeInMemLayerModelFactory(String id, Map<String, String> parameters) {
+ super(id);
+ this.parameters = new HashMap<String, String>(parameters);
+
+ if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
+ String url = this.parameters.get("url");
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
+ }
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
+ }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
+ }
+ }
+ }
+ }
+
+ public LayerModel createLayerModel(FeatureType featureType)
+ throws IOException {
+ DataStore dataStore = new ShapefileDataStore(new URL(parameters.get("url")));
+ return new ShapeInMemLayerModel(this, dataStore, featureType);
+ }
+
+ public Map<Object, Object> getRelatedFeatures(SpatialRelation query)
+ throws IOException {
+ return null;
+ }
}
\ No newline at end of file
Deleted: branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
===================================================================
--- branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-21 05:56:39 UTC (rev 3756)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -1,128 +0,0 @@
-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
Copied: branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java (from rev 3756, branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java)
===================================================================
--- branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java (rev 0)
+++ branches/1.3.x_planbaten_pre1.5/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-21 07:18:15 UTC (rev 3757)
@@ -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();
+ }
+ }
+
+ pub...
[truncated message content] |
Author: joachimvda Date: 2009-08-21 07:56:39 +0200 (Fri, 21 Aug 2009) New Revision: 3756 Modified: branches/1.5.x/geomajas-checkstyle/pom.xml branches/1.5.x/geomajas-dojo-example/pom.xml branches/1.5.x/geomajas-dojo-simple/pom.xml branches/1.5.x/geomajas-gwt-example/pom.xml branches/1.5.x/geomajas-gwt-simple/pom.xml branches/1.5.x/geomajas/extensions/geomajas-editing/pom.xml branches/1.5.x/geomajas/extensions/geomajas-printing/pom.xml branches/1.5.x/geomajas/extensions/pom.xml branches/1.5.x/geomajas/geomajas-api/pom.xml branches/1.5.x/geomajas/geomajas-dojo-client/pom.xml branches/1.5.x/geomajas/geomajas-dojo-server/pom.xml branches/1.5.x/geomajas/geomajas-gwt-client/pom.xml branches/1.5.x/geomajas/geomajas-gwt-server/pom.xml branches/1.5.x/geomajas/geomajas-impl/pom.xml branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/pom.xml branches/1.5.x/geomajas/layermodels/pom.xml branches/1.5.x/geomajas/pom.xml Log: MAJ-386 new module/dir structure Modified: branches/1.5.x/geomajas/extensions/geomajas-editing/pom.xml =================================================================== --- branches/1.5.x/geomajas/extensions/geomajas-editing/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/extensions/geomajas-editing/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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.extensions</groupId> + <artifactId>geomajas-editing</artifactId> + <packaging>jar</packaging> + <name>Geomajas extension for editing</name> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/extensions/geomajas-printing/pom.xml =================================================================== --- branches/1.5.x/geomajas/extensions/geomajas-printing/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/extensions/geomajas-printing/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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.extensions</groupId> + <artifactId>geomajas-printing</artifactId> + <packaging>jar</packaging> + <name>Geomajas extensions for printing</name> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/extensions/pom.xml =================================================================== --- branches/1.5.x/geomajas/extensions/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/extensions/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,18 @@ +<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-extensions</artifactId> + <packaging>pom</packaging> + <name>container for extensions which are not layer models</name> + + <modules> + <module>geomajas-editing</module> + <module>geomajas-printing</module> + </modules> + +</project> Modified: branches/1.5.x/geomajas/geomajas-api/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-api/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-api/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -1,8 +1,8 @@ <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>modules</artifactId> - <version>1.5.0</version> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> Modified: branches/1.5.x/geomajas/geomajas-dojo-client/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-dojo-client/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-dojo-client/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -1,15 +1,15 @@ -<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.dojo</groupId> - <artifactId>geomajas-dojo</artifactId> - <packaging>jar</packaging> - <name>Geomajas Dojo Module</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>modules</artifactId> - <version>1.5.0</version> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-dojo-client</artifactId> + <packaging>jar</packaging> + <name>Geomajas dojo face, client side</name> + <build> <plugins> <plugin> Modified: branches/1.5.x/geomajas/geomajas-dojo-server/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-dojo-server/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-dojo-server/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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-dojo-server</artifactId> + <packaging>jar</packaging> + <name>Geomajas dojo face, server side</name> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/geomajas-gwt-client/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-gwt-client/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-gwt-client/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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-gwt-client</artifactId> + <packaging>jar</packaging> + <name>Geomajas gwt face, client side</name> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/geomajas-gwt-server/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-gwt-server/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-gwt-server/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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-gwt-server</artifactId> + <packaging>jar</packaging> + <name>Geomajas gwt face, server side</name> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/geomajas-impl/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-impl/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -1,17 +1,26 @@ <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>modules</artifactId> - <version>1.5.0</version> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas-impl</artifactId> <packaging>jar</packaging> - <name>Geomajas Core Module</name> + <name>Geomajas core implementation</name> <dependencies> <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-api</artifactId> + </dependency> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-xml-binding</artifactId> + </dependency> + + <dependency> <groupId>net.sf</groupId> <artifactId>jts4gwt</artifactId> </dependency> Modified: branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -1,8 +1,8 @@ <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>modules</artifactId> - <version>1.5.0</version> + <artifactId>geomajas</artifactId> + <version>1.5.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> Modified: branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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> + +</project> Modified: branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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> + +</project> Modified: branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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> + +</project> Modified: branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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> + +</project> Modified: branches/1.5.x/geomajas/layermodels/pom.xml =================================================================== --- branches/1.5.x/geomajas/layermodels/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/layermodels/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -0,0 +1,21 @@ +<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-layermodels</artifactId> + <packaging>pom</packaging> + <name>container for layer models</name> + + <modules> + <module>geomajas-layermodel-geotools</module> + <module>geomajas-layermodel-google</module> + <module>geomajas-layermodel-hibernate</module> + <module>geomajas-layermodel-openstreetmaps</module> + <module>geomajas-layermodel-wms</module> + </modules> + +</project> Modified: branches/1.5.x/geomajas/pom.xml =================================================================== --- branches/1.5.x/geomajas/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -2,18 +2,8 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas</artifactId> - <version>1.5.0</version> + <version>1.5.0-SNAPSHOT</version> <packaging>pom</packaging> - <modules> - <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> <name>Geomajas</name> <description> Geomajas is a component framework for building rich Internet applications (RIA) with sophisticated capabilities @@ -95,6 +85,18 @@ </developer> </developers> + <modules> + <module>geomajas-api</module> + <module>geomajas-xml-binding</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> @@ -294,10 +296,15 @@ <dependencyManagement> <dependencies> <dependency> - <groupId>org.geomajas.modules</groupId> - <artifactId>geomajas-core</artifactId> + <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> Modified: branches/1.5.x/geomajas-checkstyle/pom.xml =================================================================== --- branches/1.5.x/geomajas-checkstyle/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas-checkstyle/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -16,5 +16,10 @@ </repository> </distributionManagement> --> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + </project> Modified: branches/1.5.x/geomajas-dojo-example/pom.xml =================================================================== --- branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas-dojo-example</artifactId> - <version>1.5.0</version> + <version>1.5.0-SNAPSHOT</version> <packaging>war</packaging> <name>Geomajas dojo application example</name> @@ -23,10 +23,12 @@ </repository> </repositories> - <build> + <build> + <!-- <filters> <filter>src/main/filters/eclipse.properties</filter> - </filters> + </filters> + --> <resources> <resource> <directory>src/main/resources</directory> @@ -81,4 +83,8 @@ </dependency> </dependencies> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + </project> Modified: branches/1.5.x/geomajas-dojo-simple/pom.xml =================================================================== --- branches/1.5.x/geomajas-dojo-simple/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas-dojo-simple/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas-dojo-simple</artifactId> - <version>1.5.0</version> + <version>1.5.0-SNAPSHOT</version> <packaging>war</packaging> <name>Geomajas simple dojo application demo</name> @@ -23,10 +23,12 @@ </repository> </repositories> - <build> + <build> + <!-- <filters> <filter>src/main/filters/eclipse.properties</filter> - </filters> + </filters> + --> <resources> <resource> <directory>src/main/resources</directory> @@ -81,4 +83,8 @@ </dependency> </dependencies> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + </project> Modified: branches/1.5.x/geomajas-gwt-example/pom.xml =================================================================== --- branches/1.5.x/geomajas-gwt-example/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas-gwt-example/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas-gwt-example</artifactId> - <version>1.5.0</version> + <version>1.5.0-SNAPSHOT</version> <packaging>war</packaging> <name>Geomajas GWT application example</name> @@ -15,17 +15,20 @@ <dependency> <groupId>com.google.gwt</groupId> - <artifactId>gwt-servlet</artifactId> + <artifactId>gwt-servlet</artifactId> + <version>${gwt-version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> + <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> @@ -33,6 +36,7 @@ <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> + <version>${gwt-version}</version> <classifier>${platform}</classifier> <scope>provided</scope> </dependency> @@ -40,10 +44,12 @@ <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> <build> @@ -136,4 +142,11 @@ </plugin> </plugins> </build> + + <properties> + <gwt-version>1.5.3</gwt-version> + <smartgwt-version>1.1</smartgwt-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + </project> Modified: branches/1.5.x/geomajas-gwt-simple/pom.xml =================================================================== --- branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-20 06:55:03 UTC (rev 3755) +++ branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-21 05:56:39 UTC (rev 3756) @@ -2,7 +2,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> <artifactId>geomajas-gwt-simple</artifactId> - <version>1.5.0</version> + <version>1.5.0-SNAPSHOT</version> <packaging>war</packaging> <name>Geomajas simple GWT application demo</name> @@ -15,17 +15,20 @@ <dependency> <groupId>com.google.gwt</groupId> - <artifactId>gwt-servlet</artifactId> + <artifactId>gwt-servlet</artifactId> + <version>${gwt-version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> + <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> @@ -33,6 +36,7 @@ <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> + <version>${gwt-version}</version> <classifier>${platform}</classifier> <scope>provided</scope> </dependency> @@ -40,10 +44,12 @@ <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> <build> @@ -135,5 +141,12 @@ </configuration> </plugin> </plugins> - </build> + </build> + + <properties> + <gwt-version>1.5.3</gwt-version> + <smartgwt-version>1.1</smartgwt-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + </project> |
|
From: <sv...@ge...> - 2009-08-20 07:54:54
|
Author: pieterdg
Date: 2009-08-20 08:55:03 +0200 (Thu, 20 Aug 2009)
New Revision: 3755
Modified:
branches/1.3.x_planbaten/majas-js/src/main/webapp/js/geomajas/controller/ZoomToRectangleController.js
Log:
Fix for RWOPB-109
Modified: branches/1.3.x_planbaten/majas-js/src/main/webapp/js/geomajas/controller/ZoomToRectangleController.js
===================================================================
--- branches/1.3.x_planbaten/majas-js/src/main/webapp/js/geomajas/controller/ZoomToRectangleController.js 2009-08-19 14:17:05 UTC (rev 3754)
+++ branches/1.3.x_planbaten/majas-js/src/main/webapp/js/geomajas/controller/ZoomToRectangleController.js 2009-08-20 06:55:03 UTC (rev 3755)
@@ -96,7 +96,7 @@
var viewBounds = new AABBox(this.rectangle.getPosition().getX(), this.rectangle.getPosition().getY(), this.rectangle.getWidth(), this.rectangle.getHeight());
var trans = new WorldViewTransformation(this.mapWidget.getMapView());
var worldBounds = trans.viewBoundsToWorld(viewBounds);
- this.mapWidget.getMapView().applyAABBox(worldBounds, true, 2); // Option: ZOOM_OPTION_CLOSEST
+ this.mapWidget.getMapView().applyAABBox(worldBounds, true, 1); // Option: ZOOM_OPTION_MUST_CHANGE
}
if (this.rectangle != null) {
|
|
From: <sv...@ge...> - 2009-08-19 15:16:53
|
Author: pieterdg
Date: 2009-08-19 16:17:05 +0200 (Wed, 19 Aug 2009)
New Revision: 3754
Added:
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java
Modified:
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/svg/DefaultSVGDocument.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/vml/DefaultVMLDocument.java
Log:
Fix for MAJ-370
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/svg/DefaultSVGDocument.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/svg/DefaultSVGDocument.java 2009-08-19 12:53:34 UTC (rev 3753)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/svg/DefaultSVGDocument.java 2009-08-19 14:17:05 UTC (rev 3754)
@@ -42,6 +42,7 @@
import org.geomajas.core.rendering.svg.writers.MultiPolygonWriter;
import org.geomajas.core.rendering.svg.writers.PointWriter;
import org.geomajas.core.rendering.svg.writers.PolygonWriter;
+import org.geomajas.core.util.WebSafeStringEncoder;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Envelope;
@@ -150,7 +151,7 @@
}
previous.setNeedsCloseTag(true);
}
- writer.write(text);
+ writer.write(WebSafeStringEncoder.escapeHTML(text));
}
public void writeObject(Object o, boolean asChild) throws IOException {
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/vml/DefaultVMLDocument.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/vml/DefaultVMLDocument.java 2009-08-19 12:53:34 UTC (rev 3753)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/rendering/vml/DefaultVMLDocument.java 2009-08-19 14:17:05 UTC (rev 3754)
@@ -41,6 +41,7 @@
import org.geomajas.core.rendering.vml.writers.MultiPolygonWriter;
import org.geomajas.core.rendering.vml.writers.PointWriter;
import org.geomajas.core.rendering.vml.writers.PolygonWriter;
+import org.geomajas.core.util.WebSafeStringEncoder;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.GeometryCollection;
@@ -143,7 +144,7 @@
}
previous.setNeedsCloseTag(true);
}
- writer.write(text);
+ writer.write(WebSafeStringEncoder.escapeHTML(text));
}
public void writeObject(Object o, boolean asChild) throws IOException {
Added: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java (rev 0)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java 2009-08-19 14:17:05 UTC (rev 3754)
@@ -0,0 +1,28 @@
+package org.geomajas.core.util;
+
+
+public class WebSafeStringEncoder {
+
+ public static String escapeHTML(String s) {
+ StringBuilder buf = new StringBuilder(s.length());
+ for (int i = 0; i < s.length(); i++) {
+ char c = s.charAt(i);
+ if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9') {
+ buf.append(c);
+// } else if ((int)c == 32) {
+// buf.append(" ");
+// } else if ((int)c == 34) {
+// buf.append(""");
+// } else if ((int)c == 38) {
+// buf.append("&");
+// } else if ((int)c == 60) {
+// buf.append("<");
+// } else if ((int)c == 62) {
+// buf.append(">");
+ } else {
+ buf.append("&#").append((int) c).append(";");
+ }
+ }
+ return buf.toString();
+ }
+}
\ No newline at end of file
Property changes on: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/util/WebSafeStringEncoder.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
|
Author: pieterdg
Date: 2009-08-19 14:53:34 +0200 (Wed, 19 Aug 2009)
New Revision: 3753
Added:
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFilterTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelTest.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/wkt/
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/wkt/WKTLayerModelTest.java
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.dbf
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.fix
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.prj
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.qix
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shp
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/filtertest/filtertest.shx
Removed:
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/WKTLayerModelTest.java
Modified:
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.dbf
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp
branches/1.3.x/majas-core/src/test/resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shx
Log:
Merge delivered by Mathias Versichelen: addition of unit test that test the geotools and shapeinmem layermodels, featuremodels and filtering capabilities.
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -23,21 +23,21 @@
*/
package org.geomajas.core.filters;
-import java.util.HashSet;
-
-import org.geotools.filter.FilterFactoryFinder;
-import org.geotools.filter.identity.FeatureIdImpl;
-import org.opengis.filter.Filter;
-import org.opengis.filter.FilterFactory;
-import org.opengis.filter.FilterVisitor;
-import org.opengis.filter.Id;
-import org.opengis.filter.expression.Expression;
-import org.opengis.filter.expression.PropertyName;
-import org.opengis.referencing.operation.MathTransform;
-
-import com.vividsolutions.jts.geom.Envelope;
-import com.vividsolutions.jts.geom.Geometry;
+import java.util.HashSet;
+import org.geotools.filter.FilterFactoryFinder;
+import org.geotools.filter.identity.FeatureIdImpl;
+import org.opengis.filter.Filter;
+import org.opengis.filter.FilterFactory;
+import org.opengis.filter.FilterVisitor;
+import org.opengis.filter.Id;
+import org.opengis.filter.expression.Expression;
+import org.opengis.filter.expression.PropertyName;
+import org.opengis.referencing.operation.MathTransform;
+
+import com.vividsolutions.jts.geom.Envelope;
+import com.vividsolutions.jts.geom.Geometry;
+
/**
* FilterCreator
*
@@ -112,7 +112,7 @@
} else if (comparator.equals("==")) {
return ff.equals(attrib, val);
} else if (comparator.equals("<>")) {
- return ff.notEqual(attrib, val, false); // XXX ff.notEqual -->(expr1,epr2, matchCase)
+ return ff.notEqual(attrib, val, false); // XXX ff.notEqual -->(expr1,epr2, matchCase)
} else {
throw new IllegalArgumentException(
"Could not interprete compare filter. Argument (" + value
@@ -169,34 +169,66 @@
* @param featureIDs
* @return
*/
- public static Filter createFidFilter(String featureIDs[]) {
- HashSet ids = new HashSet();
- for (int i = 0; i < featureIDs.length; i++) {
- String id = featureIDs[i];
- ids.add(new FeatureIdImpl(id));
- }
+ public static Filter createFidFilter(String featureIDs[]) {
+ HashSet ids = new HashSet();
+ for (int i = 0; i < featureIDs.length; i++) {
+ String id = featureIDs[i];
+ ids.add(new FeatureIdImpl(id));
+ }
Id filter = ff.id(ids);
return filter;
- }
+ }
+ /**
+ * Creates a filter with all the geometries that contain the parameterized geometry (including the
+ * geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createContainsFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().contains(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that lie completely within the parameterized geometry (including the
+ * geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createWithinFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().within(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that have a non-empty intersection (overlap or touching) with the
+ * parameterized geometry (including the geometry itself).
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createIntersectsFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
return getGeoToolsFactory().intersects(attrib, geo);
}
+ /**
+ * Creates a filter with all the geometries that touch the
+ * parameterized geometry.
+ *
+ * @param geom the geometry
+ * @param geomName the name of the geometry field ("the_geom")
+ * @return
+ */
public static Filter createTouchesFilter(Geometry geom, String geomName) {
Expression attrib = ff.property(geomName);
Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
@@ -209,16 +241,16 @@
envelope.getMaxX(), envelope.getMaxY(), epsg);
}
- public static Filter createOverlapsFilter(String geomName1, String geomName2) {
- Expression attrib1 = ff.property(geomName1);
- Expression attrib2 = ff.property(geomName2);
- return getGeoToolsFactory().overlaps(attrib1, attrib2);
- }
-
- public static Filter createTransformedFilter(Filter f, MathTransform transform, String targetCRS){
- return (Filter)f.accept(new TransformerVisitor(transform,targetCRS), null);
- }
-
+ public static Filter createOverlapsFilter(Geometry geom, String geomName) {
+ Expression attrib = ff.property(geomName);
+ Expression geo = getGeoToolsFactory().createLiteralExpression(geom);
+ return getGeoToolsFactory().overlaps(attrib, geo);
+ }
+
+ public static Filter createTransformedFilter(Filter f, MathTransform transform, String targetCRS){
+ return (Filter)f.accept(new TransformerVisitor(transform,targetCRS), null);
+ }
+
public static Filter createTrueFilter() {
return new Filter() {
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/core/filters/TransformerVisitor.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -214,10 +214,21 @@
}
public Object visit(Overlaps filter, Object userData) {
- PropertyName prop1 = (PropertyName) filter.getExpression1();
- PropertyName prop2 = (PropertyName) filter.getExpression2();
- return FilterCreator.createOverlapsFilter(prop1.getPropertyName(),
- prop2.getPropertyName());
+ try {
+ PropertyName prop = (PropertyName) filter.getExpression1();
+ Literal lit = (Literal) filter.getExpression2();
+ Geometry targetGeom = JTS.transform((Geometry) lit.getValue(),
+ transform);
+ targetGeom.setSRID(GeoUtil.getSRIDFromCRS(targetCRS));
+ return FilterCreator.createOverlapsFilter(targetGeom, prop
+ .getPropertyName());
+ } catch (MismatchedDimensionException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ } catch (TransformException e) {
+ logger.error("transformation failed",e);
+ throw new IllegalArgumentException("transformation failed");
+ }
}
public Object visit(Touches filter, Object userData) {
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -27,6 +27,7 @@
import org.geotools.data.DataStore;
import org.geotools.data.FeatureSource;
+import org.geotools.feature.Feature;
import org.geotools.referencing.CRS;
/**
@@ -121,4 +122,13 @@
public String getFeatureSourceCRS() {
return featureSourceCRS;
}
+
+
+ protected Feature asFeature(Object possibleFeature) throws IOException {
+ if (possibleFeature instanceof Feature) {
+ return (Feature) possibleFeature;
+ } else {
+ throw new IOException("Not a legal feature, does not support the \"Feature\" interface.");
+ }
+ }
}
\ No newline at end of file
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -37,18 +37,15 @@
import com.vividsolutions.jts.geom.Geometry;
-public class GeotoolsFeatureModel extends FeatureSourceRetriever implements
- FeatureModel {
+public class GeotoolsFeatureModel extends FeatureSourceRetriever implements FeatureModel {
- private static final Log log = LogFactory
- .getLog(GeotoolsFeatureModel.class);
+ private static final Log log = LogFactory.getLog(GeotoolsFeatureModel.class);
private int srid;
// Constructor:
- public GeotoolsFeatureModel(DataStore dataStore, String featureSourceName,
- String crs) {
+ public GeotoolsFeatureModel(DataStore dataStore, String featureSourceName, String crs) {
super(dataStore, featureSourceName);
this.srid = GeoUtil.getSRIDFromCRS(crs);
}
@@ -72,7 +69,7 @@
public Geometry getGeometry(Object feature) throws IOException {
Geometry geometry = asFeature(feature).getDefaultGeometry();
geometry.setSRID(srid);
- return (Geometry)geometry.clone();
+ return (Geometry) geometry.clone();
}
public String getGeometryAttributeName() throws IOException {
@@ -80,7 +77,8 @@
}
public String getId(Object feature) throws IOException {
- return asFeature(feature).getID();
+ Feature featureAsFeature = asFeature(feature);
+ return featureAsFeature.getID().substring(featureAsFeature.getID().lastIndexOf(".") + 1);
}
public String getCrs() throws IOException {
@@ -91,10 +89,8 @@
try {
return getSchema().create(null);
} catch (IllegalAttributeException e) {
- log.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ log.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
@@ -102,30 +98,25 @@
try {
return getSchema().create(null, id);
} catch (IllegalAttributeException e) {
- log.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ log.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
- public void setAttributes(Object feature, Map<String, Object> attributes)
- throws IOException {
+ public void setAttributes(Object feature, Map<String, Object> attributes) throws IOException {
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
try {
if (!entry.getKey().equals(getGeometryAttributeName())) {
- asFeature(feature).setAttribute(entry.getKey(),
- entry.getValue());
+ asFeature(feature).setAttribute(entry.getKey(), entry.getValue());
}
} catch (IllegalAttributeException e) {
- throw new IOException("Illegal attribute name/value : "
- + entry.getKey() + "/" + entry.getValue());
+ throw new IOException("Illegal attribute name/value : " + entry.getKey() + "/"
+ + entry.getValue());
}
}
}
- public void setGeometry(Object feature, Geometry geometry)
- throws IOException {
+ public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
asFeature(feature).setDefaultGeometry(geometry);
} catch (IllegalAttributeException e) {
@@ -137,17 +128,6 @@
return feature instanceof Feature;
}
- // Private functions:
-
- private Feature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof Feature) {
- return (Feature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, does not implement Feature interface");
- }
- }
-
public Class<?> getSuperClass() throws IOException {
return null;
}
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -54,8 +54,8 @@
import com.vividsolutions.jts.geom.Envelope;
-public class GeotoolsLayerModel extends FeatureSourceRetriever implements
- LayerModel {
+public class GeotoolsLayerModel extends FeatureSourceRetriever implements LayerModel {
+
private static final Log logger = LogFactory.getLog(GeotoolsLayerModel.class);
private FilterFactory filterFactory;
@@ -66,33 +66,27 @@
// private
- public GeotoolsLayerModel(GeotoolsLayerModelFactory factory,
- DataStore dataStore, FeatureType type) {
+ public GeotoolsLayerModel(GeotoolsLayerModelFactory factory, DataStore dataStore, FeatureType type) {
super(dataStore, type.getName());
this.factory = factory;
this.filterFactory = FilterFactoryFinder.createFilterFactory();
- this.featureModel = new GeotoolsFeatureModel(dataStore, type.getName(),
- type.getGeometryType().getCrs());
+ this.featureModel = new GeotoolsFeatureModel(dataStore, type.getName(), type.getGeometryType()
+ .getCrs());
}
public Object create(Object feature) throws IOException {
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- FeatureCollection col = DataUtilities
- .collection(new Feature[] { (Feature) feature });
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
- Set ids = store.addFeatures(col);
+ FeatureCollection col = DataUtilities.collection(new Feature[] { (Feature) feature });
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
+ Set<?> ids = store.addFeatures(col);
String newId = (String) ids.iterator().next();
- logger.debug("Created feature " + newId + " in "
- + getFeatureSourceName());
+ logger.debug("Created feature " + newId + " in " + getFeatureSourceName());
return read(newId);
} else {
- logger.error("Don't know how to create or update "
- + getFeatureSourceName() + ", class "
- + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.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");
}
@@ -102,33 +96,26 @@
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- Identifier identifier = new FeatureIdImpl(getFeatureModel().getId(
- feature));
+ Identifier identifier = new FeatureIdImpl(getFeatureModel().getId(feature));
Id filter = filterFactory.id(Collections.singleton(identifier));
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
AttributeType[] at = store.getSchema().getAttributeTypes();
- Map<String, Object> attrMap = getFeatureModel().getAttributes(
- feature);
+ Map<String, Object> attrMap = getFeatureModel().getAttributes(feature);
List<Object> attrList = new ArrayList<Object>();
for (int i = 0; i < attrMap.size(); i++) {
Object value = attrMap.get(at[i].getName());
attrList.add(value);
}
- 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());
+ 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());
} else {
- logger.error("Don't know how to create or update "
- + getFeatureSourceName() + ", class "
- + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.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");
}
}
@@ -139,16 +126,14 @@
FeatureStore store = (FeatureStore) source;
Identifier identifier = new FeatureIdImpl(featureId);
Id filter = filterFactory.id(Collections.singleton(identifier));
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ 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());
+ logger.debug("Deleted feature " + filter.getIDs().iterator().next() + " in "
+ + getFeatureSourceName());
} else {
- logger.error("Don't know how to delete from " + getFeatureSourceName()
- + ", class " + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.error("Don't know how to delete from " + getFeatureSourceName() + ", class "
+ + source.getClass().getName() + " does not implement FeatureStore");
throw new IOException("Delete not implemented");
}
}
@@ -169,22 +154,19 @@
* @return the bounds of the specified features
*/
public Envelope getBounds(Filter filter) throws IOException {
- FeatureCollection fc = getFeatureSource().getFeatures(
- (org.geotools.filter.Filter) filter);
+ FeatureCollection fc = getFeatureSource().getFeatures((org.geotools.filter.Filter) filter);
return fc.getBounds();
}
- public Iterator getElements(Filter filter) throws IOException {
+ public Iterator<?> getElements(Filter filter) throws IOException {
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
}
try {
- FeatureCollection fc = source
- .getFeatures((org.geotools.filter.Filter) filter);
- Iterator it = fc.iterator();
+ FeatureCollection fc = source.getFeatures((org.geotools.filter.Filter) filter);
+ Iterator<?> it = fc.iterator();
GeotoolsTransactionInterceptor.addIterator(fc, it);
return it;
@@ -197,8 +179,7 @@
return this.featureModel;
}
- public Iterator getObjects(String attributeName, Filter filter)
- throws IOException {
+ public Iterator<?> getObjects(String attributeName, Filter filter) throws IOException {
return Collections.EMPTY_LIST.iterator();
}
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -23,7 +23,11 @@
*/
package org.geomajas.layermodels.geotools;
+import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -32,7 +36,7 @@
import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.AbstractLayerModelFactory;
import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.global.MajasContextListener;
+import org.geomajas.core.application.LayerModelFactory;
import org.geomajas.layermodels.geotools.postgis.NonTypedPostgisFIDMapperFactory;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
@@ -43,9 +47,9 @@
import org.opengis.filter.Filter;
public class GeotoolsLayerModelFactory extends AbstractLayerModelFactory {
- private static final Log logger = LogFactory
- .getLog(GeotoolsLayerModelFactory.class);
+ private static final Log logger = LogFactory.getLog(GeotoolsLayerModelFactory.class);
+
private DataStore store;
private Map<String, String> parameters;
@@ -55,38 +59,51 @@
this.parameters = new HashMap<String, String>(parameters);
if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
String url = this.parameters.get("url");
- if (url.startsWith("file:")) {
- url = this.parameters.remove("url");
- String root = MajasContextListener.getWebappRoot().substring(2);
- url = "file:" + root + url.substring(5);
- url = url.replace('\\', '/');
- this.parameters.put("url", url);
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
+ }
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
}
- }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
+ }
+ }
+ }
}
- public LayerModel createLayerModel(FeatureType featureType)
- throws IOException {
- logger.debug("createLayerModel() : creating layermodel for "
- + featureType.getName());
+ public LayerModel createLayerModel(FeatureType featureType) throws IOException {
+ logger.debug("createLayerModel() : creating layermodel for " + featureType.getName());
return new GeotoolsLayerModel(this, getDataStore(), featureType);
}
- public java.util.Map<String, Collection<String>> getRelatedFeatures(
- int spatialRelation, LayerModel layer1, LayerModel layer2,
- Filter filter1, Filter filter2) throws IOException {
+ public java.util.Map<String, Collection<String>> getRelatedFeatures(int spatialRelation,
+ LayerModel layer1, LayerModel layer2, Filter filter1, Filter filter2) throws IOException {
if (store instanceof ExtendedDataStore) {
ExtendedDataStore extStore = (ExtendedDataStore) store;
- String table1 = ((GeotoolsLayerModel) layer1)
- .getFeatureSourceName();
- String table2 = ((GeotoolsLayerModel) layer2)
- .getFeatureSourceName();
- return extStore.getRelatedFeatures(spatialRelation, table1, table2,
- filter1, filter2);
+ String table1 = ((GeotoolsLayerModel) layer1).getFeatureSourceName();
+ String table2 = ((GeotoolsLayerModel) layer2).getFeatureSourceName();
+ return extStore.getRelatedFeatures(spatialRelation, table1, table2, filter1, filter2);
} else {
- return super.getRelatedFeatures(spatialRelation, layer1, layer2,
- filter1, filter2);
+ return super.getRelatedFeatures(spatialRelation, layer1, layer2, filter1, filter2);
}
}
@@ -96,8 +113,7 @@
store = DataStoreFinder.getDataStore(parameters);
if (store instanceof PostgisDataStore) {
PostgisDataStore jdbcStore = (PostgisDataStore) store;
- jdbcStore
- .setFIDMapperFactory(new NonTypedPostgisFIDMapperFactory(false));
+ jdbcStore.setFIDMapperFactory(new NonTypedPostgisFIDMapperFactory(false));
} else if (store instanceof JDBCDataStore) {
JDBCDataStore jdbcStore = (JDBCDataStore) store;
jdbcStore.setFIDMapperFactory(new NonTypedFIDMapperFactory());
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -30,6 +30,7 @@
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.geotools.FeatureSourceRetriever;
import org.geotools.data.DataStore;
import org.geotools.feature.Feature;
@@ -37,40 +38,40 @@
import com.vividsolutions.jts.geom.Geometry;
-public class ShapeInMemFeatureModel extends FeatureSourceRetriever implements
- FeatureModel {
+public class ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel {
- private static final Log logger = LogFactory
- .getLog(ShapeInMemFeatureModel.class);
+ private static final Log logger = LogFactory.getLog(ShapeInMemFeatureModel.class);
+ private int srid;
+
// Constructor:
- public ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName) {
+ public ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, String crs) {
super(dataStore, featureSourceName);
+ this.srid = GeoUtil.getSRIDFromCRS(crs);
}
// FeatureModel implementation:
public Object getAttribute(Object feature, String name) throws IOException {
- return asFeature(feature).getFeature().getAttribute(name);
+ return asFeature(feature).getAttribute(name);
}
public Map<String, Object> getAttributes(Object feature) throws IOException {
- Feature f = asFeature(feature).getFeature();
+ Feature f = asFeature(feature);
HashMap<String, Object> attribs = new HashMap<String, Object>();
for (int i = 0; i < f.getNumberOfAttributes(); i++) {
- attribs.put(f.getFeatureType().getAttributeType(i).getLocalName(),
- f.getAttribute(i));
+ attribs.put(f.getFeatureType().getAttributeType(i).getLocalName(), f.getAttribute(i));
}
return attribs;
}
public String getCrs() throws IOException {
- return getFeatureSourceCRS();
+ return "EPSG:" + srid;
}
public Geometry getGeometry(Object feature) throws IOException {
- Geometry geom = asFeature(feature).getFeature().getDefaultGeometry();
+ Geometry geom = asFeature(feature).getDefaultGeometry();
return (Geometry) geom.clone();
}
@@ -79,50 +80,44 @@
}
public String getId(Object feature) throws IOException {
- return asFeature(feature).getId();
+ Feature realFeature = asFeature(feature);
+ return getLocalId(realFeature.getID());
}
public Object newInstance() throws IOException {
try {
- return new WrappedFeature(getSchema().create(null));
+ return getSchema().create(null);
} catch (IllegalAttributeException e) {
- logger.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
public Object newInstance(String id) throws IOException {
try {
- return new WrappedFeature(getSchema().create(null, id));
+ return getSchema().create(null, id);
} catch (IllegalAttributeException e) {
- logger.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
- public void setAttributes(Object feature, Map<String, Object> attributes)
- throws IOException {
+ public void setAttributes(Object feature, Map<String, Object> attributes) throws IOException {
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
try {
if (!entry.getKey().equals(getGeometryAttributeName())) {
- asFeature(feature).getFeature().setAttribute(
- entry.getKey(), entry.getValue());
+ asFeature(feature).setAttribute(entry.getKey(), entry.getValue());
}
} catch (IllegalAttributeException e) {
- throw new IOException("Illegal attribute name/value : "
- + entry.getKey() + "/" + entry.getValue());
+ throw new IOException("Illegal attribute name/value : " + entry.getKey() + "/"
+ + entry.getValue());
}
}
}
- public void setGeometry(Object feature, Geometry geometry)
- throws IOException {
+ public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
- asFeature(feature).getFeature().setDefaultGeometry(geometry);
+ asFeature(feature).setDefaultGeometry(geometry);
} catch (IllegalAttributeException e) {
throw new IOException("Illegal geometry value : " + geometry);
}
@@ -138,12 +133,14 @@
// Private functions:
- private WrappedFeature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof WrappedFeature) {
- return (WrappedFeature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, is not a WrappedFeature");
+ private String getLocalId(String featureId) {
+ if (featureId != null) {
+ int pos = featureId.lastIndexOf(".");
+ if (pos >= 0) {
+ return featureId.substring(pos + 1);
+ }
+ return featureId;
}
+ return null;
}
}
\ No newline at end of file
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -34,19 +34,21 @@
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.LayerModelFactory;
import org.geomajas.core.application.feature.FeatureModel;
+import org.geomajas.core.filters.FilterCreator;
import org.geomajas.layermodels.geotools.FeatureSourceRetriever;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
+import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureIterator;
import org.opengis.filter.Filter;
+import org.opengis.filter.Id;
import com.vividsolutions.jts.geom.Envelope;
-public class ShapeInMemLayerModel extends FeatureSourceRetriever implements
- LayerModel {
+public class ShapeInMemLayerModel extends FeatureSourceRetriever implements LayerModel {
- private Map<String, WrappedFeature> features = new HashMap<String, WrappedFeature>();
+ private Map<String, Feature> features = new HashMap<String, Feature>();
private int nextId = 0;
@@ -54,19 +56,28 @@
private FeatureModel featureModel;
- public ShapeInMemLayerModel(ShapeInMemLayerModelFactory factory,
- DataStore dataStore, FeatureType featureType) throws IOException {
+ public ShapeInMemLayerModel(ShapeInMemLayerModelFactory factory, DataStore dataStore,
+ FeatureType featureType) throws IOException {
super(dataStore, featureType.getName());
this.factory = factory;
+ featureModel = new ShapeInMemFeatureModel(dataStore, featureType.getName(), featureType
+ .getGeometryType().getCrs());
initFeatures();
- featureModel = new ShapeInMemFeatureModel(dataStore, featureType
- .getName());
}
public Iterator<?> getElements(Filter filter) throws IOException {
- List<WrappedFeature> filteredList = new ArrayList<WrappedFeature>();
- for (WrappedFeature feature : features.values()) {
- if (filter.evaluate(feature.getFeature())) {
+ Filter realFilter = filter;
+ List<Feature> filteredList = new ArrayList<Feature>();
+ if (filter instanceof Id) {
+ Iterator<?> iterator = ((Id) filter).getIdentifiers().iterator();
+ List<String> identifiers = new ArrayList<String>();
+ while (iterator.hasNext()) {
+ identifiers.add(getFeatureSourceName() + "." + iterator.next());
+ }
+ realFilter = FilterCreator.createFidFilter(identifiers.toArray(new String[] {}));
+ }
+ for (Feature feature : features.values()) {
+ if (realFilter.evaluate(feature)) {
filteredList.add(feature);
}
}
@@ -92,10 +103,13 @@
}
public Object create(Object feature) throws IOException {
- WrappedFeature wrapped = asFeature(feature);
- wrapped.setId(getNextId());
- features.put(wrapped.getId(), wrapped);
- return wrapped;
+ String id = featureModel.getId(feature);
+ if (id != null && !features.containsKey(id)) {
+ Feature realFeature = asFeature(feature);
+ features.put(id, realFeature);
+ return realFeature;
+ }
+ return null;
}
public Object read(String featureId) throws IOException {
@@ -110,8 +124,7 @@
features.remove(featureId);
}
- public Iterator<?> getObjects(String attributeName, Filter filter)
- throws IOException {
+ public Iterator<?> getObjects(String attributeName, Filter filter) throws IOException {
return Collections.EMPTY_LIST.iterator();
}
@@ -121,15 +134,6 @@
// Private functions:
- private WrappedFeature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof WrappedFeature) {
- return (WrappedFeature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, is not a WrappedFeature");
- }
- }
-
private synchronized String getNextId() {
String id = nextId + "";
nextId++;
@@ -141,18 +145,14 @@
col = getFeatureSource().getFeatures();
FeatureIterator iterator = col.features();
while (iterator.hasNext()) {
- WrappedFeature feature = new WrappedFeature(iterator.next());
- features.put(feature.getId(), feature);
- trackNextId(feature.getId());
+ Feature feature = iterator.next();
+ String id = featureModel.getId(feature);
+ features.put(id, feature);
+ int intId = new Integer(id).intValue();
+ if (intId > nextId) {
+ nextId = intId;
+ }
}
getNextId();
}
-
- private void trackNextId(String fid) {
- int id = new Integer(fid).intValue();
- if (id > nextId) {
- nextId = id;
- }
- }
-
}
\ No newline at end of file
Modified: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -1,73 +1,92 @@
-/**
- * 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/>.
- */
-package org.geomajas.layermodels.shapeinmem;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.geomajas.core.application.AbstractLayerModelFactory;
-import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.application.LayerModelFactory;
-import org.geomajas.schemas.configuration.FeatureType;
-import org.geotools.data.DataStore;
-import org.geotools.data.shapefile.ShapefileDataStore;
-import org.hibernatespatial.SpatialRelation;
-
-public class ShapeInMemLayerModelFactory extends AbstractLayerModelFactory {
-
- private Map<String, String> parameters;
-
- public ShapeInMemLayerModelFactory(String id, Map<String, String> parameters) {
- super(id);
- this.parameters = new HashMap<String, String>(parameters);
- if (this.parameters.containsKey("url")) {
- String url = this.parameters.get("url");
- if (url.startsWith("file:")) {
- url = this.parameters.remove("url");
- File root = new File(parameters
- .get(LayerModelFactory.PARAM_APPLICATION_DIR));
- url = "file:"
- + root.getAbsolutePath().replace(File.separator, "/")
- + "/" + url.substring(5).replace(File.separator, "/");
- this.parameters.put("url", url);
- }
- }
- }
-
- public LayerModel createLayerModel(FeatureType featureType)
- throws IOException {
- DataStore dataStore = new ShapefileDataStore(new URL(parameters.get("url")));
- return new ShapeInMemLayerModel(this, dataStore, featureType);
- }
-
- public Map<Object, Object> getRelatedFeatures(SpatialRelation query)
- throws IOException {
- // TODO Auto-generated method stub
- return null;
- }
-
+/**
+ * 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/>.
+ */
+package org.geomajas.layermodels.shapeinmem;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.geomajas.core.application.AbstractLayerModelFactory;
+import org.geomajas.core.application.LayerModel;
+import org.geomajas.core.application.LayerModelFactory;
+import org.geomajas.schemas.configuration.FeatureType;
+import org.geotools.data.DataStore;
+import org.geotools.data.shapefile.ShapefileDataStore;
+import org.hibernatespatial.SpatialRelation;
+
+public class ShapeInMemLayerModelFactory extends AbstractLayerModelFactory {
+
+ private Map<String, String> parameters;
+
+ public ShapeInMemLayerModelFactory(String id, Map<String, String> parameters) {
+ super(id);
+ this.parameters = new HashMap<String, String>(parameters);
+
+ if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
+ String url = this.parameters.get("url");
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
+ }
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
+ }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
+ }
+ }
+ }
+ }
+
+ public LayerModel createLayerModel(FeatureType featureType)
+ throws IOException {
+ DataStore dataStore = new ShapefileDataStore(new URL(parameters.get("url")));
+ return new ShapeInMemLayerModel(this, dataStore, featureType);
+ }
+
+ public Map<Object, Object> getRelatedFeatures(SpatialRelation query)
+ throws IOException {
+ return null;
+ }
}
\ No newline at end of file
Deleted: branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java
===================================================================
--- branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -1,112 +0,0 @@
-/**
- * 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/>.
- */
-package org.geomajas.layermodels.shapeinmem;
-
-import org.geotools.feature.Feature;
-import org.geotools.feature.IllegalAttributeException;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-
-import com.vividsolutions.jts.geom.Geometry;
-
-/**
- * Wrapper around a geotools feature for a Shape layermodel. Package visibility.
- *
- * @author Pieter De Graef
- */
-public class WrappedFeature implements Feature {
-
- private String id;
-
- private Feature feature;
-
- public WrappedFeature(Feature feature) {
- this.feature = feature;
- this.id = feature.getID().substring(
- feature.getID().lastIndexOf(".") + 1);
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Feature getFeature() {
- return feature;
- }
-
- public Object getAttribute(String arg0) {
- return feature.getAttribute(arg0);
- }
-
- public Object getAttribute(int arg0) {
- return feature.getAttribute(arg0);
- }
-
- public Object[] getAttributes(Object[] arg0) {
- return feature.getAttributes(arg0);
- }
-
- public ReferencedEnvelope getBounds() {
- return feature.getBounds();
- }
-
- public Geometry getDefaultGeometry() {
- return feature.getDefaultGeometry();
- }
-
- public org.geotools.feature.FeatureType getFeatureType() {
- return feature.getFeatureType();
- }
-
- public String getID() {
- return feature.getID();
- }
-
- public int getNumberOfAttributes() {
- return feature.getNumberOfAttributes();
- }
-
- public void setAttribute(int arg0, Object arg1)
- throws IllegalAttributeException,
- ArrayIndexOutOfBoundsException {
- feature.setAttribute(arg0, arg1);
-
- }
-
- public void setAttribute(String arg0, Object arg1)
- throws IllegalAttributeException {
- feature.setAttribute(arg0, arg1);
-
- }
-
- public void setDefaultGeometry(Geometry arg0)
- throws IllegalAttributeException {
- feature.setDefaultGeometry(arg0);
-
- }
-}
-
Deleted: branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/WKTLayerModelTest.java
===================================================================
--- branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/WKTLayerModelTest.java 2009-08-19 11:05:20 UTC (rev 3752)
+++ branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/WKTLayerModelTest.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -1,48 +0,0 @@
-/**
- * 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/>.
- */
-package org.geomajas.layermodels;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.filters.FilterCreator;
-import org.geomajas.layermodels.wkt.WKTLayerModel;
-
-import junit.framework.TestCase;
-
-import com.vividsolutions.jts.geom.Polygon;
-
-public class WKTLayerModelTest extends TestCase {
- public void testOneFeatureModel() throws IOException {
- LayerModel m = new WKTLayerModel(null,
- "poly",
- "geom",
- 31300,
- Arrays
- .asList("POLYGON (( 101000 101000, 101000 109000, 109000 109000, 109000 101000, 101000 101000))"));
- Object feature = m.getElements(FilterCreator.createTrueFilter()).next();
- assertEquals(Polygon.class,m.getFeatureModel().getGeometry(feature).getClass());
- }
-}
Added: branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
===================================================================
--- branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java (rev 0)
+++ branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -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: branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java
===================================================================
--- branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java (rev 0)
+++ branches/1.3.x/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFilterTest.java 2009-08-19 12:53:34 UTC (rev 3753)
@@ -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*");...
[truncated message content] |
|
From: <sv...@ge...> - 2009-08-19 12:05:14
|
Author: joachimvda Date: 2009-08-19 13:05:20 +0200 (Wed, 19 Aug 2009) New Revision: 3752 Modified: branches/1.5.x/geomajas/geomajas-api/pom.xml branches/1.5.x/geomajas/geomajas-impl/pom.xml branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml branches/1.5.x/geomajas/pom.xml Log: MAJ-386 change module/directory structure Modified: branches/1.5.x/geomajas/geomajas-api/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-api/pom.xml 2009-08-19 10:21:48 UTC (rev 3751) +++ branches/1.5.x/geomajas/geomajas-api/pom.xml 2009-08-19 11:05:20 UTC (rev 3752) @@ -0,0 +1,21 @@ +<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>modules</artifactId> + <version>1.5.0</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>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Modified: branches/1.5.x/geomajas/geomajas-impl/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-impl/pom.xml 2009-08-19 10:21:48 UTC (rev 3751) +++ branches/1.5.x/geomajas/geomajas-impl/pom.xml 2009-08-19 11:05:20 UTC (rev 3752) @@ -1,15 +1,14 @@ -<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.modules</groupId> - <artifactId>geomajas-core</artifactId> - <packaging>jar</packaging> - <name>Geomajas Core Module</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>modules</artifactId> <version>1.5.0</version> </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-impl</artifactId> + <packaging>jar</packaging> + <name>Geomajas Core Module</name> <dependencies> <dependency> @@ -284,64 +283,6 @@ </execution> </executions> </plugin> - <!-- - 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.client.schemas.configuration</generatePackage> - <includeSchemas> - <includeSchema>**/majas-server.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> - - <!-- 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> </build> -</project> \ No newline at end of file +</project> Modified: branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml =================================================================== --- branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml 2009-08-19 10:21:48 UTC (rev 3751) +++ branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml 2009-08-19 11:05:20 UTC (rev 3752) @@ -0,0 +1,70 @@ +<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>modules</artifactId> + <version>1.5.0</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-xml-binding</artifactId> + <packaging>jar</packaging> + <name>Geomajas XML binding</name> + + <dependencies> + <dependency> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </dependency> + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + </dependency> + <dependency> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </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.client.schemas.configuration</generatePackage> + <includeSchemas> + <includeSchema>**/majas-server.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> Modified: branches/1.5.x/geomajas/pom.xml =================================================================== --- branches/1.5.x/geomajas/pom.xml 2009-08-19 10:21:48 UTC (rev 3751) +++ branches/1.5.x/geomajas/pom.xml 2009-08-19 11:05:20 UTC (rev 3752) @@ -208,7 +208,34 @@ </goals> </execution> </executions> - </plugin> + </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> |
Author: pieterdg Date: 2009-08-19 12:21:48 +0200 (Wed, 19 Aug 2009) New Revision: 3751 Added: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/activityDiv.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/attributes.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/downloadDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/legend.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/scaleSelect.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/styleWidgets.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/activityDiv.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/attributes.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/downloadDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/legend.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/scaleSelect.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/styleWidgets.js Removed: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/activityDiv.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/attributes.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/downloadDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/legend.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/scaleSelect.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/fr/styleWidgets.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/activityDiv.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/attributes.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/downloadDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/featureTableTooltip.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/legend.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/printDialog.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/scaleSelect.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/pt/styleWidgets.js Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/en/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/tooltips.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/DefaultPrintWidget.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/ExtendedFeatureListTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailEditor.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailTable.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FontStyleWidget.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/LineStringStyleWidget.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/DefaultPrintWidget.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/ExtendedFeatureListTable.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailEditor.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailTable.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidget.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidgetH.html branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/styleWidgets.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/nl/styleWidgets.js branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/styleWidgets.js Log: Addition of the French and Portuguese languages + broadening the localization scope. Fix for MAJ-380, MAJ-381 Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/en/tooltips.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/en/tooltips.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/en/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -70,7 +70,7 @@ "ZoomToSelectionAction" : "Zoom to the current selection on the map.", "ZoomToFeatureAction" : "Zoom to a feature on the map.", "PanToSelectionAction" : "Pan to the current selection on the map.", - "SelectionTool" : "Select object on the map by clicking on them.", + "SelectionTool" : "Select objects on the map by clicking on them.", "RectangleSelectionTool" : "Select objects on the map by clicking on them, or by dragging a rectangle.", "EditSelectedAction" : "Edit the attributes of the selected feature.", "DeselectAllAction" : "Deselect everything.", Deleted: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js =================================================================== --- branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js 2009-07-08 08:10:59 UTC (rev 3634) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -1,88 +0,0 @@ -/* - * 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/>. - */ -({ -/* - * 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. - * - * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium - * This file is part of GeoMajas. - * - * GeoMajas is free software. You can redistribute it and/or modify - * it under the terms of the GNU General Public License Version 2 - * as published by the Free Software Foundation - * - * GeoMajas 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoMajas; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * For more information, visit: http://www.geomajas.org/ - */ - "LayerLabeledTool" : "Activez ou désactivez les étiquettes pour cette couche.", - "LabelStyleAction" : "Ajustez le style des étiquettes.", - "LayerVisibleTool" : "Changez la visibilité de cette couche.", - "LayerSnappingTool" : "Activez ou désactivez l'utilisation de snapping pour cette couche.", - "ShowTableAction" : "Montrez les entités géographiques actuellement visibles dans un tableau.", - "RefreshLayerAction" : "Actualisez la couche sélectionnée.", - - "MeasureDistanceTool" : "Mesurez une distance sur la carte!", - "MeasureDistanceMessage" : "La distance mesurée est %{0} métres.", - "PanTool" : "Mouvez la carte par l'entraîner!", - "NavigateTool" : "Mouvez la carte par la cliquer.", - "ZoomInAction" : "Zoom avant!", - "ZoomOutAction" : "Zoom arrière!", - "ZoomPreviousAction" : "Zoom jusqu'à l'étendue précédente de la carte!", - "ZoomNextAction" : "Zoom jusqu'à l'étendue suivante de la carte!", - "RotateLeftAction" : "Tournez la carte à gauche.", - "RotateRightAction" : "Tournez la carte à droite.", - "ZoomInTool" : "Magnifiez en cliquant la carte!", - "ZoomOutTool" : "Miniaturisez en cliquant la carte!", - "ZoomToRectangleTool" : "Magnifiez vers un rectangle que vous dessinez sur la carte!", - "ZoomToSelectionAction" : "Magnifiez vers la sélection actuelle sur la carte.", - "ZoomToFeatureAction" : "Magnifiez vers une entité géographique sur la carte.",//english! - "PanToSelectionAction" : "Mouvez vers la sélection actuelle sur la carte.", - "SelectionTool" : "Sélectionnez des objets en clicquant.", - "RectangleSelectionTool" : "Sélectionnez des objets en construisant une rectangle.", - "EditSelectedAction" : "Editez les attributs de l'entité géographique sélectionnée.", - "DeselectAllAction" : "Déselectionnez tout.", - "NewFeatureTool" : "Créez une nouvelle entité géographique pour la couche sélectionnée sur la carte.", - "EditTool" : "Activez ou désactivez le mode éditer. Le bouton droit de la souris vous montrera vos options.", - "SplitPolygonTool" : "Divisez un polygone sur la carte.", - "MergePolygonTool" : "Rejoignez plusieurs polygones sur la carte.", - "FeatureInfoTool" : "Recevez les infos sur une entité géographique en clicquant sur l'entité.", - "LocationInfoTool" : "Recevez les infos sur un endroit en clicquant sur l'endroit.", - - "DeleteFeatureAction" : "L'enlèvement d'une entité géographique est permanente!\nVous êtes sûr?", - - "ShowTemplatePrintAction" : "Configurez/obtenez des clichés PDF basés sur des templates", //english! - "ShowDefaultPrintAction" : "Obtenez un cliché PDF général." //Obter um PDF da vista. -}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/fr/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,88 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "LayerLabeledTool" : "Activez ou désactivez les étiquettes pour cette couche.", + "LabelStyleAction" : "Ajustez le style des étiquettes.", + "LayerVisibleTool" : "Changez la visibilité de cette couche.", + "LayerSnappingTool" : "Activez ou désactivez l'utilisation de snapping pour cette couche.", + "ShowTableAction" : "Montrez les entités géographiques actuellement visibles dans un tableau.", + "RefreshLayerAction" : "Actualisez la couche sélectionnée.", + + "MeasureDistanceTool" : "Mesurez une distance sur la carte!", + "MeasureDistanceMessage" : "La distance mesurée est %{0} métres.", + "PanTool" : "Mouvez la carte par l'entraîner!", + "NavigateTool" : "Mouvez la carte par la cliquer.", + "ZoomInAction" : "Zoom avant!", + "ZoomOutAction" : "Zoom arrière!", + "ZoomPreviousAction" : "Zoom jusqu'à l'étendue précédente de la carte!", + "ZoomNextAction" : "Zoom jusqu'à l'étendue suivante de la carte!", + "RotateLeftAction" : "Tournez la carte à gauche.", + "RotateRightAction" : "Tournez la carte à droite.", + "ZoomInTool" : "Magnifiez en cliquant la carte!", + "ZoomOutTool" : "Miniaturisez en cliquant la carte!", + "ZoomToRectangleTool" : "Magnifiez vers un rectangle que vous dessinez sur la carte!", + "ZoomToSelectionAction" : "Magnifiez vers la sélection actuelle sur la carte.", + "ZoomToFeatureAction" : "Magnifiez vers une entité géographique sur la carte.",//english! + "PanToSelectionAction" : "Mouvez vers la sélection actuelle sur la carte.", + "SelectionTool" : "Sélectionnez des objets en clicquant.", + "RectangleSelectionTool" : "Sélectionnez des objets en construisant une rectangle.", + "EditSelectedAction" : "Editez les attributs de l'entité géographique sélectionnée.", + "DeselectAllAction" : "Déselectionnez tout.", + "NewFeatureTool" : "Créez une nouvelle entité géographique pour la couche sélectionnée sur la carte.", + "EditTool" : "Activez ou désactivez le mode éditer. Le bouton droit de la souris vous montrera vos options.", + "SplitPolygonTool" : "Divisez un polygone sur la carte.", + "MergePolygonTool" : "Rejoignez plusieurs polygones sur la carte.", + "FeatureInfoTool" : "Recevez les infos sur une entité géographique en clicquant sur l'entité.", + "LocationInfoTool" : "Recevez les infos sur un endroit en clicquant sur l'endroit.", + + "DeleteFeatureAction" : "L'enlèvement d'une entité géographique est permanente!\nVous êtes sûr?", + + "ShowTemplatePrintAction" : "Configurez/obtenez des clichés PDF basés sur des templates", //english! + "ShowDefaultPrintAction" : "Obtenez un cliché PDF général." //Obter um PDF da vista. +}) \ No newline at end of file Deleted: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js =================================================================== --- branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js 2009-07-08 08:10:59 UTC (rev 3634) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -1,88 +0,0 @@ -/* - * 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/>. - */ -({ -/* - * 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. - * - * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium - * This file is part of GeoMajas. - * - * GeoMajas is free software. You can redistribute it and/or modify - * it under the terms of the GNU General Public License Version 2 - * as published by the Free Software Foundation - * - * GeoMajas 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GeoMajas; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * For more information, visit: http://www.geomajas.org/ - */ - "LayerLabeledTool" : "Activar or desactivar as etiquetas nesta camada.", - "LabelStyleAction" : "Ajusta o estilo da etiqueta.", - "LayerVisibleTool" : "Alterar a visibilidade da camada.", - "LayerSnappingTool" : "Activar or desactivar a utilização da opção de snapping para esta camada.", - "ShowTableAction" : "Mostrar os atributos da tabela.", - "RefreshLayerAction" : "Actualizar a layer seleccionada.", - - "MeasureDistanceTool" : "Medir distâncias no mapa!", - "MeasureDistanceMessage" : "A distância medida tem %{0} metros.", - "PanTool" : "Mover o mapa!", - "NavigateTool" : "Pressione para mover o mapa.", - "ZoomInAction" : "Aproximar!", - "ZoomOutAction" : "Afastar!", - "ZoomPreviousAction" : "Aproxima da extensão anterior!", - "ZoomNextAction" : "Aproximar a extensão do mapa!", - "RotateLeftAction" : "Rodar o mapa para a esquerda.", - "RotateRightAction" : "Rodar o mapa para a direita.", - "ZoomInTool" : "Aproximar pressionando no mapa!", - "ZoomOutTool" : "Pressionar no mapa para afastar!", - "ZoomToRectangleTool" : "Aproximar a um rectângulo desenhado no mapa!", - "ZoomToSelectionAction" : "Aproximar a selecção do mapa.", - "ZoomToFeatureAction" : "Zoom to a feature on the map.",//english! - "PanToSelectionAction" : "Aproximar a selecção.", - "SelectionTool" : "Selecciona pressionado em cima de objectos.", - "RectangleSelectionTool" : "Selecciona pressionado em cima de objectos ou desenhando um rectângulo.", - "EditSelectedAction" : "Editar os atributos.", - "DeselectAllAction" : "Desfazer a selecção.", - "NewFeatureTool" : "Cria um novo atributo para a layer seleccionada.", - "EditTool" : "Activatar ou desactivar o modo de selecção. O botão direito do rato mostra as opções disponiveis.", - "SplitPolygonTool" : "Separar o poligono no mapa.", - "MergePolygonTool" : "Incorporar multiplos poligonos no mapa.", - "FeatureInfoTool" : "Pressione para obter mais informação.", - "LocationInfoTool" : "Get a locations's info by clicking on it.",//english! - - "DeleteFeatureAction" : "A eliminação de atributos não pode ser desfeita!\nTem a certeza?", - - "ShowTemplatePrintAction" : "Configure/fetch template-based PDF prints", //english! - "ShowDefaultPrintAction" : "Fetch a default PDF print." //Obter um PDF da vista. -}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/pt/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,88 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "LayerLabeledTool" : "Activar or desactivar as etiquetas nesta camada.", + "LabelStyleAction" : "Ajusta o estilo da etiqueta.", + "LayerVisibleTool" : "Alterar a visibilidade da camada.", + "LayerSnappingTool" : "Activar or desactivar a utilização da opção de snapping para esta camada.", + "ShowTableAction" : "Mostrar os atributos da tabela.", + "RefreshLayerAction" : "Actualizar a layer seleccionada.", + + "MeasureDistanceTool" : "Medir distâncias no mapa!", + "MeasureDistanceMessage" : "A distância medida tem %{0} metros.", + "PanTool" : "Mover o mapa!", + "NavigateTool" : "Pressione para mover o mapa.", + "ZoomInAction" : "Aproximar!", + "ZoomOutAction" : "Afastar!", + "ZoomPreviousAction" : "Aproxima da extensão anterior!", + "ZoomNextAction" : "Aproximar a extensão do mapa!", + "RotateLeftAction" : "Rodar o mapa para a esquerda.", + "RotateRightAction" : "Rodar o mapa para a direita.", + "ZoomInTool" : "Aproximar pressionando no mapa!", + "ZoomOutTool" : "Pressionar no mapa para afastar!", + "ZoomToRectangleTool" : "Aproximar a um rectângulo desenhado no mapa!", + "ZoomToSelectionAction" : "Aproximar a selecção do mapa.", + "ZoomToFeatureAction" : "Zoom to a feature on the map.",//english! + "PanToSelectionAction" : "Aproximar a selecção.", + "SelectionTool" : "Selecciona pressionado em cima de objectos.", + "RectangleSelectionTool" : "Selecciona pressionado em cima de objectos ou desenhando um rectângulo.", + "EditSelectedAction" : "Editar os atributos.", + "DeselectAllAction" : "Desfazer a selecção.", + "NewFeatureTool" : "Cria um novo atributo para a layer seleccionada.", + "EditTool" : "Activatar ou desactivar o modo de selecção. O botão direito do rato mostra as opções disponiveis.", + "SplitPolygonTool" : "Separar o poligono no mapa.", + "MergePolygonTool" : "Incorporar multiplos poligonos no mapa.", + "FeatureInfoTool" : "Pressione para obter mais informação.", + "LocationInfoTool" : "Get a locations's info by clicking on it.",//english! + + "DeleteFeatureAction" : "A eliminação de atributos não pode ser desfeita!\nTem a certeza?", + + "ShowTemplatePrintAction" : "Configure/fetch template-based PDF prints", //english! + "ShowDefaultPrintAction" : "Fetch a default PDF print." //Obter um PDF da vista. +}) \ No newline at end of file Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/tooltips.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/tooltips.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/action/nls/tooltips.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -70,7 +70,7 @@ "ZoomToSelectionAction" : "Zoom to the current selection on the map.", "ZoomToFeatureAction" : "Zoom to a feature on the map.", "PanToSelectionAction" : "Pan to the current selection on the map.", - "SelectionTool" : "Select object on the map by clicking on them.", + "SelectionTool" : "Select objects on the map by clicking on them.", "RectangleSelectionTool" : "Select objects on the map by clicking on them, or by dragging a rectangle.", "EditSelectedAction" : "Edit the attributes of the selected feature.", "DeselectAllAction" : "Deselect everything.", Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/DefaultPrintWidget.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/DefaultPrintWidget.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/DefaultPrintWidget.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -24,6 +24,7 @@ */ dojo.require("dijit.Dialog"); dojo.require("dojox.xml.DomParser"); +dojo.requireLocalization("geomajas.widget", "printDialog"); dojo.declare("geomajas.widget.DefaultPrintWidget", [dijit.layout.LayoutContainer, dijit._Templated], { @@ -41,6 +42,13 @@ downloadMethod : 0, + printSettingsString : "", + pageSizeString : "", + titleString : "", + dateString : "", + northArrowString : "", + rasterDPIString : "", + postCreate : function() { this.inherited(arguments); printButton = dijit.byId(this.id+":print"); @@ -49,6 +57,16 @@ this.templateManager = majasConfig["templateManager"]; }, + postMixInProperties : function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + var widgetLocale = dojo.i18n.getLocalization("geomajas.widget", "printDialog"); + this.printSettingsString = widgetLocale.printSettings; + this.pageSizeString = widgetLocale.pageSize; + this.titleString = widgetLocale.title; + this.dateString = widgetLocale.date; + this.northArrowString = widgetLocale.northArrow; + this.rasterDPIString = widgetLocale.rasterDPI; + }, + print : function() { var template = this.templateManager.getTemplateByName("Default"); if(template){ Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/ExtendedFeatureListTable.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/ExtendedFeatureListTable.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/ExtendedFeatureListTable.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -24,6 +24,7 @@ */ dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); +dojo.requireLocalization("geomajas.widget", "featureTableTooltip"); dojo.declare("geomajas.widget.ExtendedFeatureListTable", [dijit._Widget, dijit._Templated], { @@ -40,6 +41,10 @@ supportEditing : true, showHelp : false, + titleString : "", + item1String : "", + item2String : "", + postCreate : function () { var cmb = dijit.byId(this.id + ":cmb"); if (cmb != null) { @@ -70,6 +75,13 @@ element.style.display = "inline"; } }, + + postMixInProperties : function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + var widgetLocale = dojo.i18n.getLocalization("geomajas.widget", "featureTableTooltip"); + this.titleString = widgetLocale.title; + this.item1String = widgetLocale.item1; + this.item2String = widgetLocale.item2; + }, setMapWidget : function (mapWidget) { this.mapWidget = mapWidget; Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailEditor.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailEditor.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailEditor.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -22,6 +22,8 @@ * 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/>. */ +dojo.requireLocalization("geomajas.widget", "featureDetailEditor"); + dojo.declare("geomajas.widget.FeatureDetailEditor", [dijit.layout.LayoutContainer, dijit._Templated], { widgetsInTemplate : true, @@ -30,7 +32,16 @@ mapWidget : null, featureEditor : null, feature : null, + + saveString : "", + zoomToFitString : "", + postMixInProperties : function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + var widgetLocale = dojo.i18n.getLocalization("geomajas.widget", "featureDetailEditor"); + this.saveString = widgetLocale.save; + this.zoomToFitString = widgetLocale.zoomToFit; + }, + postCreate : function () { this.setFeature(this.feature); Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailTable.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailTable.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FeatureDetailTable.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -27,6 +27,7 @@ dojo.require("dojox.grid.Grid"); dojo.require("dojox.grid._data.model"); dojo.require("dojo.parser"); +dojo.requireLocalization("geomajas.widget", "featureDetailTable"); dojo.declare("geomajas.widget.FeatureDetailTable", [dijit.layout.ContentPane, dijit._Templated], { @@ -36,7 +37,16 @@ feature : null, editorFactory : null, ids : [], + + attributeString : "", + valueString : "", + postMixInProperties : function(/*Object*/args, /*Object*/frag, /*Widget*/parent){ + var widgetLocale = dojo.i18n.getLocalization("geomajas.widget", "featureDetailTable"); + this.attributeString = widgetLocale.attribute; + this.valueString = widgetLocale.value; + }, + constructor : function () { this.editorFactory = new AttributeEditorFactory(); }, Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FontStyleWidget.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FontStyleWidget.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/FontStyleWidget.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -48,6 +48,10 @@ fontFamilyString : "Font Family", fontWeightString : "Font Weight", fontStyleString : "Font Style", + normalString : "normal", + boldString : "bold", + italicString : "italic", + obliqueString : "oblique", alignment : "vertical", @@ -58,6 +62,10 @@ this.fontFamilyString = widgetLocale.fontFamily; this.fontWeightString = widgetLocale.fontWeight; this.fontStyleString = widgetLocale.fontStyle; + this.normalString = widgetLocale.normal; + this.boldString = widgetLocale.bold; + this.italicString = widgetLocale.italic; + this.obliqueString = widgetLocale.oblique; if (this.alignment == "horizontal") { this.templatePath = dojo.moduleUrl("geomajas.widget", "html/FontStyleWidgetH.html"); Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/LineStringStyleWidget.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/LineStringStyleWidget.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/LineStringStyleWidget.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -43,10 +43,10 @@ widgetsInTemplate : true, templatePath : dojo.moduleUrl("geomajas.widget", "html/LineStringStyleWidget.html"), - strokeColorString : "Stroke Color", - strokeOpacityString : "Stroke Opacity", - strokeWidthString : "Stroke Width", - strokeDashArrayString : "Dash Array", + strokeColorString : "", + strokeOpacityString : "", + strokeWidthString : "", + strokeDashArrayString : "", alignment : "vertical", Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/DefaultPrintWidget.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/DefaultPrintWidget.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/DefaultPrintWidget.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -3,26 +3,26 @@ <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style="width:310px; margin:3px; padding:5px; background-color:#E0E0E0;" class="dojoxFloatingPane"> <center> <table class="gridLookalike" cellspacing="0" style="border: 1px solid #999; background-color: #FFFFFF;"> - <tr><th colspan="2">Print settings</th></tr> + <tr><th colspan="2">${printSettingsString}</th></tr> <tr> - <td>Page size:</td><td><select id="${id}:pagesize" dojoType="dijit.form.ComboBox"> + <td>${pageSizeString}</td><td><select id="${id}:pagesize" dojoType="dijit.form.ComboBox"> <option>A0</option><option>A1</option><option>A2</option><option>A3</option><option selected="selected">A4</option><option>A5</option> </select></td> </tr> <tr> - <td>Title:</td><td><input type="text" name="${id}:title" id="${id}:title" + <td>${titleString}</td><td><input type="text" name="${id}:title" id="${id}:title" value="" dojoType="dijit.form.TextBox" invalidMessage="" /></td> </tr> <tr> - <td>Date:</td><td><input type="checkbox" name="${id}:date" id="${id}:date" + <td>${dateString}</td><td><input type="checkbox" name="${id}:date" id="${id}:date" dojoType="dijit.form.CheckBox" checked="checked" /></td> </tr> <tr> - <td>NorthArrow:</td><td><input type="checkbox" name="${id}:arrow" id="${id}:arrow" + <td>${northArrowString}</td><td><input type="checkbox" name="${id}:arrow" id="${id}:arrow" dojoType="dijit.form.CheckBox" checked="checked" /></td> </tr> <tr> - <td>Raster DPI:</td><td><select id="${id}:rasterdpi" dojoType="dijit.form.ComboBox"> + <td>${rasterDPIString}</td><td><select id="${id}:rasterdpi" dojoType="dijit.form.ComboBox"> <option>72</option><option>150</option><option>250</option><option>350</option><option>500</option> </select></td> </tr> Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/ExtendedFeatureListTable.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/ExtendedFeatureListTable.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/ExtendedFeatureListTable.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -4,10 +4,10 @@ <div dojoType="dijit.Toolbar" id="${id}:toolbar" style="overflow:hidden;"> <button id="${id}:info" style="display:none;" class="dijit dijitReset dijitInline chatIcon"></button> <span dojoType="dijit.Tooltip" connectId="${id}:info"> - <b>Feature attribute table</b> + <b>${titleString}</b> <ul style="margin-top:0px; margin-bottom:0px;"> - <li>Select a layer to list all currently visible features.</li> - <li>By doubleclicking on a row, you can see that feature in detail.</li> + <li>${item1String}</li> + <li>${item2String}</li> </ul> </span> <span style="padding-bottom:3px;">Select a layer: </span> Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailEditor.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailEditor.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailEditor.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -1,7 +1,7 @@ <div dojoType="dijit.layout.LayoutContainer" style="width: 100%; height: 100%; margin: 0px; padding: 0px; overflow: hidden;"> <div id="${id}:toolbar" dojoType="dijit.Toolbar" layoutAlign="top"> - <div id="${id}:saveBTN" dojoType="dijit.form.Button" iconClass="saveIcon" showLabel="True">Save</div> - <div id="${id}:zoomBTN" dojoType="dijit.form.Button" iconClass="zoomToSelectionIcon" showLabel="True">Zoom to fit</div> + <div id="${id}:saveBTN" dojoType="dijit.form.Button" iconClass="saveIcon" showLabel="True">${saveString}</div> + <div id="${id}:zoomBTN" dojoType="dijit.form.Button" iconClass="zoomToSelectionIcon" showLabel="True">${zoomToFitString}</div> </div> <div dojoType="dijit.layout.ContentPane" layoutAlign="client" style="overflow: hidden;"> Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailTable.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailTable.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FeatureDetailTable.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -1,6 +1,6 @@ <div id="${id}:content" dojoType="dijit.layout.ContentPane" region="center" style="width:100%; height:100%; text-align:center;"> <table border='1' cellpadding='0' cellspacing='0' class="fdtTABLE"> - <thead><tr><th class="fdtTH">Attribute</th><th class="fdtTH">Value</th></tr></thead> + <thead><tr><th class="fdtTH">${attributeString}</th><th class="fdtTH">${valueString}</th></tr></thead> <tbody id="${id}:tbody"> </tbody> </table> Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidget.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidget.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidget.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -53,8 +53,8 @@ class="medium" name="${id}:fontWeight" autocomplete="false"> - <option>normal</option> - <option>bold</option> + <option>${normalString}</option> + <option>${boldString}</option> </select> </td> </tr> @@ -70,9 +70,9 @@ class="medium" name="${id}:fontStyle" autocomplete="false"> - <option>normal</option> - <option>italic</option> - <option>oblique</option> + <option>${normalString}</option> + <option>${italicString}</option> + <option>${obliqueString}</option> </select> </td> </tr> Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidgetH.html =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidgetH.html 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/html/FontStyleWidgetH.html 2009-08-19 10:21:48 UTC (rev 3751) @@ -45,8 +45,8 @@ class="short" name="${id}:fontWeight" autocomplete="false"> - <option>normal</option> - <option>bold</option> + <option>${normalString}</option> + <option>${boldString}</option> </select> </td> </tr> @@ -59,9 +59,9 @@ class="short" name="${id}:fontStyle" autocomplete="false"> - <option>normal</option> - <option>italic</option> - <option>oblique</option> + <option>${normalString}</option> + <option>${italicString}</option> + <option>${obliqueString}</option> </select> </td> </tr> Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailEditor.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,52 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "save" : "Save", + "zoomToFit" : "Zoom to fit" +}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureDetailTable.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,52 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "attribute" : "Attribute", + "value" : "Value" +}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/featureTableTooltip.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,53 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "title" : "Feature attribute table", + "item1" : "Select a layer to list all currently visible features.", + "item2" : "By doubleclicking on a row, you can see that feature in detail." +}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/printDialog.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,33 @@ +/* + * 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/>. + */ +({ + "printSettings" : "Print settings", + + "pageSize" : "Page size:", + "title" : "Title:", + "date" : "Date:", + "northArrow" : "North arrow:", + "rasterDPI" : "Raster DPI:" + +}) \ No newline at end of file Modified: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/styleWidgets.js =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/styleWidgets.js 2009-08-19 09:22:01 UTC (rev 3750) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/en/styleWidgets.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -58,5 +58,10 @@ "strokeColor" : "Stroke Color", "strokeOpacity" : "Stroke Opacity", "strokeWidth" : "Stroke Width", - "strokeDashArray" : "Dash Array" + "strokeDashArray" : "Dash Array", + + "normal" : "normal", + "bold" : "bold", + "italic" : "italic", + "oblique" : "oblique" }) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailEditor.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,52 @@ +/* + * 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/>. + */ +({ +/* + * 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. + * + * Copyright 2006-2008 DFC Software Engineering, http://www.dfc.be, Belgium + * This file is part of GeoMajas. + * + * GeoMajas is free software. You can redistribute it and/or modify + * it under the terms of the GNU General Public License Version 2 + * as published by the Free Software Foundation + * + * GeoMajas 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GeoMajas; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * For more information, visit: http://www.geomajas.org/ + */ + "save" : "Save", + "zoomToFit" : "Zoom to fit" +}) \ No newline at end of file Copied: branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js (from rev 3634, branches/1.3.x_matthias/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js) =================================================================== --- branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js (rev 0) +++ branches/1.3.x/majas-js/src/main/webapp/js/geomajas/widget/nls/featureDetailTable.js 2009-08-19 10:21:48 UTC (rev 3751) @@ -0,0 +1,52 @@ +/* + * This software project is called Geomajas, a component framework for building + * rich Internet applications (RIA) wi... [truncated message content] |
Author: joachimvda Date: 2009-08-19 11:22:01 +0200 (Wed, 19 Aug 2009) New Revision: 3750 Added: branches/1.5.x/geomajas-dojo-simple/pom.xml branches/1.5.x/geomajas-dojo-simple/src/ branches/1.5.x/geomajas-dojo-simple/src/main/ branches/1.5.x/geomajas-dojo-simple/src/main/resources/ branches/1.5.x/geomajas-gwt-example/pom.xml branches/1.5.x/geomajas-gwt-example/src/ branches/1.5.x/geomajas-gwt-example/src/main/ branches/1.5.x/geomajas-gwt-example/src/main/java/ branches/1.5.x/geomajas-gwt-example/src/main/java/org/ branches/1.5.x/geomajas-gwt-example/src/main/java/org/geomajas/ branches/1.5.x/geomajas-gwt-example/src/main/resources/ branches/1.5.x/geomajas/extensions/ branches/1.5.x/geomajas/extensions/geomajas-editing/ branches/1.5.x/geomajas/extensions/geomajas-editing/pom.xml branches/1.5.x/geomajas/extensions/geomajas-editing/src/ branches/1.5.x/geomajas/extensions/geomajas-editing/src/main/ branches/1.5.x/geomajas/extensions/geomajas-editing/src/main/java/ branches/1.5.x/geomajas/extensions/geomajas-editing/src/main/java/org/ branches/1.5.x/geomajas/extensions/geomajas-editing/src/main/java/org/geomajas/ branches/1.5.x/geomajas/extensions/geomajas-printing/ branches/1.5.x/geomajas/extensions/geomajas-printing/pom.xml branches/1.5.x/geomajas/extensions/geomajas-printing/src/ branches/1.5.x/geomajas/extensions/geomajas-printing/src/main/ branches/1.5.x/geomajas/extensions/geomajas-printing/src/main/java/ branches/1.5.x/geomajas/extensions/geomajas-printing/src/main/java/org/ branches/1.5.x/geomajas/extensions/geomajas-printing/src/main/java/org/geomajas/ branches/1.5.x/geomajas/extensions/pom.xml branches/1.5.x/geomajas/geomajas-api/ branches/1.5.x/geomajas/geomajas-api/pom.xml branches/1.5.x/geomajas/geomajas-api/src/ branches/1.5.x/geomajas/geomajas-api/src/main/ branches/1.5.x/geomajas/geomajas-api/src/main/java/ branches/1.5.x/geomajas/geomajas-api/src/main/java/org/ branches/1.5.x/geomajas/geomajas-api/src/main/java/org/geomajas/ branches/1.5.x/geomajas/geomajas-dojo-server/ branches/1.5.x/geomajas/geomajas-dojo-server/pom.xml branches/1.5.x/geomajas/geomajas-dojo-server/src/ branches/1.5.x/geomajas/geomajas-dojo-server/src/main/ branches/1.5.x/geomajas/geomajas-dojo-server/src/main/java/ branches/1.5.x/geomajas/geomajas-dojo-server/src/main/java/org/ branches/1.5.x/geomajas/geomajas-dojo-server/src/main/java/org/geomajas/ branches/1.5.x/geomajas/geomajas-gwt-client/ branches/1.5.x/geomajas/geomajas-gwt-client/pom.xml branches/1.5.x/geomajas/geomajas-gwt-client/src/ branches/1.5.x/geomajas/geomajas-gwt-client/src/main/ branches/1.5.x/geomajas/geomajas-gwt-client/src/main/java/ branches/1.5.x/geomajas/geomajas-gwt-client/src/main/java/org/ branches/1.5.x/geomajas/geomajas-gwt-client/src/main/java/org/geomajas/ branches/1.5.x/geomajas/geomajas-gwt-server/ branches/1.5.x/geomajas/geomajas-gwt-server/pom.xml branches/1.5.x/geomajas/geomajas-gwt-server/src/ branches/1.5.x/geomajas/geomajas-gwt-server/src/main/ branches/1.5.x/geomajas/geomajas-gwt-server/src/main/java/ branches/1.5.x/geomajas/geomajas-gwt-server/src/main/java/org/ branches/1.5.x/geomajas/geomajas-gwt-server/src/main/java/org/geomajas/ branches/1.5.x/geomajas/geomajas-xml-binding/ branches/1.5.x/geomajas/geomajas-xml-binding/pom.xml branches/1.5.x/geomajas/geomajas-xml-binding/src/ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/java/ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/java/org/ branches/1.5.x/geomajas/geomajas-xml-binding/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/src/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/src/main/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-geotools/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/src/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/src/main/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/src/main/java/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/src/main/java/org/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-google/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/src/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-hibernate/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/java/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/java/org/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-openstreetmaps/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/pom.xml branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/src/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/src/main/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/src/main/java/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/src/main/java/org/ branches/1.5.x/geomajas/layermodels/geomajas-layermodel-wms/src/main/java/org/geomajas/ branches/1.5.x/geomajas/layermodels/pom.xml Modified: branches/1.5.x/geomajas-checkstyle/pom.xml branches/1.5.x/geomajas-checkstyle/src/main/resources/config/geomajas-header.txt branches/1.5.x/geomajas-dojo-example/pom.xml branches/1.5.x/geomajas-gwt-simple/pom.xml branches/1.5.x/geomajas/pom.xml Log: MAJ-386 change module/directory structure Modified: branches/1.5.x/geomajas/pom.xml =================================================================== --- branches/1.5.x/geomajas/pom.xml 2009-08-19 08:45:54 UTC (rev 3749) +++ branches/1.5.x/geomajas/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -1,13 +1,18 @@ -<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"> <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> + <artifactId>geomajas</artifactId> <version>1.5.0</version> - <artifactId>project</artifactId> <packaging>pom</packaging> <modules> - <module>modules</module> - <module>webapps</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> <name>Geomajas</name> <description> @@ -15,7 +20,8 @@ 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> + <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> @@ -24,13 +30,71 @@ <organization> <name>Geosparc</name> <url>http://www.geosparc.com</url> - </organization> - <properties> - <geotools-version>2.5.2</geotools-version> - <gwt-version>1.5.3</gwt-version> - <smartgwt-version>1.1</smartgwt-version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + </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> + <repositories> <repository> <id>Geomajas</id> @@ -106,6 +170,7 @@ <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url> </pluginRepository> </pluginRepositories> + <build> <extensions> <extension> @@ -198,69 +263,6 @@ </plugin> </plugins> </reporting> - <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> <dependencyManagement> <dependencies> @@ -589,5 +591,13 @@ </os> </activation> </profile> - </profiles> -</project> \ No newline at end of file + </profiles> + + <properties> + <geotools-version>2.5.2</geotools-version> + <gwt-version>1.5.3</gwt-version> + <smartgwt-version>1.1</smartgwt-version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + +</project> Modified: branches/1.5.x/geomajas-checkstyle/pom.xml =================================================================== --- branches/1.5.x/geomajas-checkstyle/pom.xml 2009-08-19 08:45:54 UTC (rev 3749) +++ branches/1.5.x/geomajas-checkstyle/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -1,20 +1,20 @@ <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-checkstyle</artifactId> - <packaging>jar</packaging> - <version>1.0.0</version> - <name>geomajas-checkstyle</name> - <description>checkstyle configuration for geomajas</description> + <modelVersion>4.0.0</modelVersion> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-checkstyle</artifactId> + <packaging>jar</packaging> + <version>1.0.0</version> + <name>geomajas-checkstyle</name> + <description>checkstyle configuration for geomajas</description> - <!-- - <distributionManagement> - <repository> - <id>progs-repo</id> - <name>PROGS maven repository</name> - <url>dav:http://maven.progs.be/m2repo</url> - </repository> - </distributionManagement> - --> + <!-- + <distributionManagement> + <repository> + <id>geomajas-repo</id> + <name>Geomajas maven repository</name> + <url>dav:http://maven.geomajas.org</url> + </repository> + </distributionManagement> + --> </project> Modified: branches/1.5.x/geomajas-checkstyle/src/main/resources/config/geomajas-header.txt =================================================================== --- branches/1.5.x/geomajas-checkstyle/src/main/resources/config/geomajas-header.txt 2009-08-19 08:45:54 UTC (rev 3749) +++ branches/1.5.x/geomajas-checkstyle/src/main/resources/config/geomajas-header.txt 2009-08-19 09:22:01 UTC (rev 3750) @@ -1,4 +1,4 @@ -/** +/* * 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. Modified: branches/1.5.x/geomajas-dojo-example/pom.xml =================================================================== --- branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-19 08:45:54 UTC (rev 3749) +++ branches/1.5.x/geomajas-dojo-example/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -1,15 +1,11 @@ -<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"> <modelVersion>4.0.0</modelVersion> <groupId>org.geomajas</groupId> - <artifactId>geomajas-tutorial</artifactId> + <artifactId>geomajas-dojo-example</artifactId> + <version>1.5.0</version> <packaging>war</packaging> - <name>Geomajas Tutorial Web Application</name> - <parent> - <groupId>org.geomajas</groupId> - <artifactId>webapps</artifactId> - <version>1.5.0</version> - </parent> + <name>Geomajas dojo application example</name> + <repositories> <repository> <id>dojo</id> @@ -25,14 +21,8 @@ </snapshots> <layout>default</layout> </repository> - </repositories> - <dependencies> - <dependency> - <groupId>org.geomajas.core</groupId> - <artifactId>geomajas-core</artifactId> - <version>1.5.0</version> - </dependency> - </dependencies> + </repositories> + <build> <filters> <filter>src/main/filters/eclipse.properties</filter> @@ -81,5 +71,14 @@ </plugin> </plugins> --> - </build> -</project> \ No newline at end of file + </build> + + <dependencies> + <dependency> + <groupId>org.geomajas.core</groupId> + <artifactId>geomajas-dojo-client</artifactId> + <version>1.5.0</version> + </dependency> + </dependencies> + +</project> Added: branches/1.5.x/geomajas-dojo-simple/pom.xml =================================================================== --- branches/1.5.x/geomajas-dojo-simple/pom.xml (rev 0) +++ branches/1.5.x/geomajas-dojo-simple/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -0,0 +1,84 @@ +<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-dojo-simple</artifactId> + <version>1.5.0</version> + <packaging>war</packaging> + <name>Geomajas simple dojo application demo</name> + + <repositories> + <repository> + <id>dojo</id> + <name>Dojo Maven2 Repository</name> + <url>http://download.dojotoolkit.org/maven2</url> + <releases> + <enabled>true</enabled> + <updatePolicy>daily</updatePolicy> + <checksumPolicy>fail</checksumPolicy> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + <layout>default</layout> + </repository> + </repositories> + + <build> + <filters> + <filter>src/main/filters/eclipse.properties</filter> + </filters> + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + <!-- + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <configuration> + <filters> + <filter>src/main/filters/eclipse.properties</filter> + </filters> + <webResources> + <resource> + <directory>src/main/webapp/applications</directory> + <targetPath>applications</targetPath> + <filtering>true</filtering> + <includes> + <include>**/*.xml</include> + <include>**/*.html</include> + </includes> + </resource> + </webResources> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <configuration> + <additionalBuildcommands> + <buildCommand> + <name>org.ui.externaltools.ExternalToolBuilder</name> + <arguments> + <LaunchConfigHandle><project>/src/main/eclipse/filter-resources.launch</LaunchConfigHandle> + </arguments> + </buildCommand> + </additionalBuildcommands> + </configuration> + </plugin> + </plugins> + --> + </build> + + <dependencies> + <dependency> + <groupId>org.geomajas.core</groupId> + <artifactId>geomajas-dojo-client</artifactId> + <version>1.5.0</version> + </dependency> + </dependencies> + +</project> Added: branches/1.5.x/geomajas-gwt-example/pom.xml =================================================================== --- branches/1.5.x/geomajas-gwt-example/pom.xml (rev 0) +++ branches/1.5.x/geomajas-gwt-example/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -0,0 +1,139 @@ +<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-gwt-example</artifactId> + <version>1.5.0</version> + <packaging>war</packaging> + <name>Geomajas GWT application example</name> + + <dependencies> + <dependency> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-gwt-client</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-servlet</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-user</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <classifier>${platform}-libs</classifier> + <type>zip</type> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <classifier>${platform}</classifier> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.smartgwt</groupId> + <artifactId>smartgwt</artifactId> + </dependency> + <dependency> + <groupId>com.smartgwt</groupId> + <artifactId>smartgwt-skins</artifactId> + </dependency> + </dependencies> + <build> + <plugins> + <!-- configure the GWT-Maven plugin --> + <!--plugin> + <groupId>com.totsp.gwt</groupId> + <artifactId>maven-googlewebtoolkit2-plugin</artifactId> + <version>2.0-beta26</version> + <configuration> + <logLevel>INFO</logLevel> + <compileTargets> + <value>com.extjs.gxt.samples.JAXB</value> + </compileTargets> + <runTarget>com.extjs.gxt.samples/JAXB.html</runTarget> + <style>DETAILED</style> + <noServer>false</noServer> + <extraJvmArgs>-Xmx512m</extraJvmArgs> + <gwtVersion>${gwtVersion}</gwtVersion> + </configuration> + <executions> + <execution> + <goals> + <goal>mergewebxml</goal> + <goal>compile</goal> + </goals> + </execution> + </executions> + </plugin--> + <!-- Use the dependency plugin to unpack gwt-dev-PLATFORM-libs.zip --> + <!-- + (this is a replacement for the old "automatic" mode - useful if you + don't have GWT installed already, or you just want a maven way to + handle gwt deps) + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack</id> + <phase>compile</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <version>${gwtVersion}</version> + <classifier>${platform}-libs</classifier> + <type>zip</type> + <overWrite>false</overWrite> + <outputDirectory>${settings.localRepository}/com/google/gwt/gwt-dev/${gwtVersion}</outputDirectory> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <!-- + If you want to use the target/web.xml file mergewebxml produces, + tell the war plugin to use it. Also, exclude what you want from the + final artifact here. + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <configuration> + <!--<webXml>target/web.xml</webXml>--> + <warSourceExcludes>.gwt-tmp/**</warSourceExcludes> + </configuration> + </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> + </configuration> + </plugin> + </plugins> + </build> +</project> Modified: branches/1.5.x/geomajas-gwt-simple/pom.xml =================================================================== --- branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-19 08:45:54 UTC (rev 3749) +++ branches/1.5.x/geomajas-gwt-simple/pom.xml 2009-08-19 09:22:01 UTC (rev 3750) @@ -1,20 +1,16 @@ -<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"> <modelVersion>4.0.0</modelVersion> - <groupId>org.geomajas.webapps</groupId> - <artifactId>geomajas-gwt</artifactId> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-gwt-simple</artifactId> + <version>1.5.0</version> <packaging>war</packaging> - <name>Geomajas GWT Application</name> - <parent> - <groupId>org.geomajas</groupId> - <artifactId>webapps</artifactId> - <version>1.5.0</version> - </parent> + <name>Geomajas simple GWT application demo</name> <dependencies> <dependency> - <groupId>org.geomajas.modules</groupId> - <artifactId>geomajas-core</artifactId> + <groupId>org.geomajas</groupId> + <artifactId>geomajas-gwt-client</artifactId> + <version>${project.version}</version> </dependency> <dependency> @@ -51,18 +47,6 @@ </dependency> </dependencies> <build> - <!-- - Include SOURCE in output artifact for GWT (GWT libraries must include - source) - --> - <resources> - <resource> - <directory>src/main/java</directory> - </resource> - <resource> - <directory>src/main/resources</directory> - </resource> - </resources> <plugins> <!-- configure the GWT-Maven plugin --> <!--plugin> @@ -152,4 +136,4 @@ </plugin> </plugins> </build> -</project> \ No newline at end of file +</project> |
|
From: <sv...@ge...> - 2009-08-19 09:45:36
|
Author: pieterdg
Date: 2009-08-19 10:45:54 +0200 (Wed, 19 Aug 2009)
New Revision: 3749
Removed:
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java
Modified:
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/core/filters/FilterTestGeoToolsLayerModel.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java
branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelTest.java
Log:
Updated some layer models and test cases.
Deleted the obsolete "WrappedFeature" class.
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/core/filters/FilterCreator.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -176,7 +176,6 @@
ids.add(new FeatureIdImpl(id));
}
Id filter = ff.id(ids);
- System.out.println(filter.toString());
return filter;
}
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/FeatureSourceRetriever.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -25,9 +25,9 @@
import java.io.IOException;
-import org.geomajas.core.util.GeoUtil;
import org.geotools.data.DataStore;
import org.geotools.data.FeatureSource;
+import org.geotools.feature.Feature;
import org.geotools.referencing.CRS;
/**
@@ -96,9 +96,7 @@
public FeatureSource getFeatureSource() throws IOException {
if (featureSource == null) {
featureSource = dataStore.getFeatureSource(featureSourceName);
-
String temp = "EPSG:4326";
-
try {
featureSourceCRS = CRS.lookupIdentifier(getSchema()
.getDefaultGeometry().getCoordinateSystem(), null,
@@ -124,4 +122,13 @@
public String getFeatureSourceCRS() {
return featureSourceCRS;
}
+
+
+ protected Feature asFeature(Object possibleFeature) throws IOException {
+ if (possibleFeature instanceof Feature) {
+ return (Feature) possibleFeature;
+ } else {
+ throw new IOException("Not a legal feature, does not support the \"Feature\" interface.");
+ }
+ }
}
\ No newline at end of file
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsFeatureModel.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -31,25 +31,21 @@
import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.feature.FeatureModel;
import org.geomajas.core.util.GeoUtil;
-import org.geomajas.layermodels.shapeinmem.WrappedFeature;
import org.geotools.data.DataStore;
import org.geotools.feature.Feature;
import org.geotools.feature.IllegalAttributeException;
import com.vividsolutions.jts.geom.Geometry;
-public class GeotoolsFeatureModel extends FeatureSourceRetriever implements
- FeatureModel {
+public class GeotoolsFeatureModel extends FeatureSourceRetriever implements FeatureModel {
- private static final Log log = LogFactory
- .getLog(GeotoolsFeatureModel.class);
+ private static final Log log = LogFactory.getLog(GeotoolsFeatureModel.class);
private int srid;
// Constructor:
- public GeotoolsFeatureModel(DataStore dataStore, String featureSourceName,
- String crs) {
+ public GeotoolsFeatureModel(DataStore dataStore, String featureSourceName, String crs) {
super(dataStore, featureSourceName);
this.srid = GeoUtil.getSRIDFromCRS(crs);
}
@@ -73,7 +69,7 @@
public Geometry getGeometry(Object feature) throws IOException {
Geometry geometry = asFeature(feature).getDefaultGeometry();
geometry.setSRID(srid);
- return (Geometry)geometry.clone();
+ return (Geometry) geometry.clone();
}
public String getGeometryAttributeName() throws IOException {
@@ -93,10 +89,8 @@
try {
return getSchema().create(null);
} catch (IllegalAttributeException e) {
- log.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ log.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
@@ -104,30 +98,25 @@
try {
return getSchema().create(null, id);
} catch (IllegalAttributeException e) {
- log.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ log.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
- public void setAttributes(Object feature, Map<String, Object> attributes)
- throws IOException {
+ public void setAttributes(Object feature, Map<String, Object> attributes) throws IOException {
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
try {
if (!entry.getKey().equals(getGeometryAttributeName())) {
- asFeature(feature).setAttribute(entry.getKey(),
- entry.getValue());
+ asFeature(feature).setAttribute(entry.getKey(), entry.getValue());
}
} catch (IllegalAttributeException e) {
- throw new IOException("Illegal attribute name/value : "
- + entry.getKey() + "/" + entry.getValue());
+ throw new IOException("Illegal attribute name/value : " + entry.getKey() + "/"
+ + entry.getValue());
}
}
}
- public void setGeometry(Object feature, Geometry geometry)
- throws IOException {
+ public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
asFeature(feature).setDefaultGeometry(geometry);
} catch (IllegalAttributeException e) {
@@ -139,17 +128,6 @@
return feature instanceof Feature;
}
- // Private functions:
-
- private Feature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof Feature) {
- return (Feature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, does not implement Feature interface");
- }
- }
-
public Class<?> getSuperClass() throws IOException {
return null;
}
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModel.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -40,10 +40,8 @@
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
import org.geotools.data.DataUtilities;
-import org.geotools.data.DefaultTransaction; //Mathias
import org.geotools.data.FeatureSource;
import org.geotools.data.FeatureStore;
-import org.geotools.data.Transaction;
import org.geotools.feature.AttributeType;
import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
@@ -56,8 +54,8 @@
import com.vividsolutions.jts.geom.Envelope;
-public class GeotoolsLayerModel extends FeatureSourceRetriever implements
- LayerModel {
+public class GeotoolsLayerModel extends FeatureSourceRetriever implements LayerModel {
+
private static final Log logger = LogFactory.getLog(GeotoolsLayerModel.class);
private FilterFactory filterFactory;
@@ -68,33 +66,27 @@
// private
- public GeotoolsLayerModel(GeotoolsLayerModelFactory factory,
- DataStore dataStore, FeatureType type) {
+ public GeotoolsLayerModel(GeotoolsLayerModelFactory factory, DataStore dataStore, FeatureType type) {
super(dataStore, type.getName());
this.factory = factory;
this.filterFactory = FilterFactoryFinder.createFilterFactory();
- this.featureModel = new GeotoolsFeatureModel(dataStore, type.getName(),
- type.getGeometryType().getCrs());
+ this.featureModel = new GeotoolsFeatureModel(dataStore, type.getName(), type.getGeometryType()
+ .getCrs());
}
public Object create(Object feature) throws IOException {
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- FeatureCollection col = DataUtilities
- .collection(new Feature[] { (Feature) feature });
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ FeatureCollection col = DataUtilities.collection(new Feature[] { (Feature) feature });
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
Set ids = store.addFeatures(col);
String newId = (String) ids.iterator().next();
- logger.debug("Created feature " + newId + " in "
- + getFeatureSourceName());
+ logger.debug("Created feature " + newId + " in " + getFeatureSourceName());
return read(newId);
} else {
- logger.error("Don't know how to create or update "
- + getFeatureSourceName() + ", class "
- + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.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");
}
@@ -104,33 +96,26 @@
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- Identifier identifier = new FeatureIdImpl(getFeatureModel().getId(
- feature));
+ Identifier identifier = new FeatureIdImpl(getFeatureModel().getId(feature));
Id filter = filterFactory.id(Collections.singleton(identifier));
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
AttributeType[] at = store.getSchema().getAttributeTypes();
- Map<String, Object> attrMap = getFeatureModel().getAttributes(
- feature);
+ Map<String, Object> attrMap = getFeatureModel().getAttributes(feature);
List<Object> attrList = new ArrayList<Object>();
for (int i = 0; i < attrMap.size(); i++) {
Object value = attrMap.get(at[i].getName());
attrList.add(value);
}
- 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());
+ 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());
} else {
- logger.error("Don't know how to create or update "
- + getFeatureSourceName() + ", class "
- + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.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");
}
}
@@ -144,13 +129,11 @@
store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
// TODO: is there a non-deprecated way to delete features ?????
store.removeFeatures((org.geotools.filter.Filter) filter);
- //store.getTransaction().commit(); //Mathias
- logger.debug("Deleted feature " + filter.getIDs().iterator().next()
- + " in " + getFeatureSourceName());
+ logger.debug("Deleted feature " + filter.getIDs().iterator().next() + " in "
+ + getFeatureSourceName());
} else {
- logger.error("Don't know how to delete from " + getFeatureSourceName()
- + ", class " + source.getClass().getName()
- + " does not implement FeatureStore");
+ logger.error("Don't know how to delete from " + getFeatureSourceName() + ", class "
+ + source.getClass().getName() + " does not implement FeatureStore");
throw new IOException("Delete not implemented");
}
}
@@ -171,8 +154,7 @@
* @return the bounds of the specified features
*/
public Envelope getBounds(Filter filter) throws IOException {
- FeatureCollection fc = getFeatureSource().getFeatures(
- (org.geotools.filter.Filter) filter);
+ FeatureCollection fc = getFeatureSource().getFeatures((org.geotools.filter.Filter) filter);
return fc.getBounds();
}
@@ -180,12 +162,10 @@
FeatureSource source = getFeatureSource();
if (source instanceof FeatureStore) {
FeatureStore store = (FeatureStore) source;
- store.setTransaction(GeotoolsTransactionInterceptor
- .getTransaction());
+ store.setTransaction(GeotoolsTransactionInterceptor.getTransaction());
}
try {
- FeatureCollection fc = source
- .getFeatures((org.geotools.filter.Filter) filter);
+ FeatureCollection fc = source.getFeatures((org.geotools.filter.Filter) filter);
Iterator it = fc.iterator();
GeotoolsTransactionInterceptor.addIterator(fc, it);
@@ -199,8 +179,7 @@
return this.featureModel;
}
- public Iterator getObjects(String attributeName, Filter filter)
- throws IOException {
+ public Iterator getObjects(String attributeName, Filter filter) throws IOException {
return Collections.EMPTY_LIST.iterator();
}
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/geotools/GeotoolsLayerModelFactory.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -23,7 +23,11 @@
*/
package org.geomajas.layermodels.geotools;
+import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -32,7 +36,7 @@
import org.apache.commons.logging.LogFactory;
import org.geomajas.core.application.AbstractLayerModelFactory;
import org.geomajas.core.application.LayerModel;
-import org.geomajas.core.global.MajasContextListener;
+import org.geomajas.core.application.LayerModelFactory;
import org.geomajas.layermodels.geotools.postgis.NonTypedPostgisFIDMapperFactory;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
@@ -43,9 +47,9 @@
import org.opengis.filter.Filter;
public class GeotoolsLayerModelFactory extends AbstractLayerModelFactory {
- private static final Log logger = LogFactory
- .getLog(GeotoolsLayerModelFactory.class);
+ private static final Log logger = LogFactory.getLog(GeotoolsLayerModelFactory.class);
+
private DataStore store;
private Map<String, String> parameters;
@@ -54,46 +58,52 @@
super(id);
this.parameters = new HashMap<String, String>(parameters);
-// if (this.parameters.containsKey("url")) {
-// String url = this.parameters.get("url");
-// System.out.println(url);
-// if (url.startsWith("file:")) {
-// try {
-// String root = MajasContextListener.getWebappRoot().substring(2);
-// url = this.parameters.remove("url");
-// url = "file:" + root + url.substring(5);
-// url = url.replace('\\', '/');
-// this.parameters.put("url", url);
-// }
-// catch(NullPointerException ne) {
-// System.out.println("NullPointerException in root context");
-// ne.printStackTrace();
-// }
-// }
-// }
+ if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
+ String url = this.parameters.get("url");
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
+ }
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
+ }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
+ }
+ }
+ }
}
- public LayerModel createLayerModel(FeatureType featureType)
- throws IOException {
- logger.debug("createLayerModel() : creating layermodel for "
- + featureType.getName());
+ public LayerModel createLayerModel(FeatureType featureType) throws IOException {
+ logger.debug("createLayerModel() : creating layermodel for " + featureType.getName());
return new GeotoolsLayerModel(this, getDataStore(), featureType);
}
- public java.util.Map<String, Collection<String>> getRelatedFeatures(
- int spatialRelation, LayerModel layer1, LayerModel layer2,
- Filter filter1, Filter filter2) throws IOException {
+ public java.util.Map<String, Collection<String>> getRelatedFeatures(int spatialRelation,
+ LayerModel layer1, LayerModel layer2, Filter filter1, Filter filter2) throws IOException {
if (store instanceof ExtendedDataStore) {
ExtendedDataStore extStore = (ExtendedDataStore) store;
- String table1 = ((GeotoolsLayerModel) layer1)
- .getFeatureSourceName();
- String table2 = ((GeotoolsLayerModel) layer2)
- .getFeatureSourceName();
- return extStore.getRelatedFeatures(spatialRelation, table1, table2,
- filter1, filter2);
+ String table1 = ((GeotoolsLayerModel) layer1).getFeatureSourceName();
+ String table2 = ((GeotoolsLayerModel) layer2).getFeatureSourceName();
+ return extStore.getRelatedFeatures(spatialRelation, table1, table2, filter1, filter2);
} else {
- return super.getRelatedFeatures(spatialRelation, layer1, layer2,
- filter1, filter2);
+ return super.getRelatedFeatures(spatialRelation, layer1, layer2, filter1, filter2);
}
}
@@ -103,8 +113,7 @@
store = DataStoreFinder.getDataStore(parameters);
if (store instanceof PostgisDataStore) {
PostgisDataStore jdbcStore = (PostgisDataStore) store;
- jdbcStore
- .setFIDMapperFactory(new NonTypedPostgisFIDMapperFactory(false));
+ jdbcStore.setFIDMapperFactory(new NonTypedPostgisFIDMapperFactory(false));
} else if (store instanceof JDBCDataStore) {
JDBCDataStore jdbcStore = (JDBCDataStore) store;
jdbcStore.setFIDMapperFactory(new NonTypedFIDMapperFactory());
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModel.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -38,14 +38,12 @@
import com.vividsolutions.jts.geom.Geometry;
-public class ShapeInMemFeatureModel extends FeatureSourceRetriever implements
- FeatureModel {
+public class ShapeInMemFeatureModel extends FeatureSourceRetriever implements FeatureModel {
- private static final Log logger = LogFactory
- .getLog(ShapeInMemFeatureModel.class);
+ private static final Log logger = LogFactory.getLog(ShapeInMemFeatureModel.class);
private int srid;
-
+
// Constructor:
public ShapeInMemFeatureModel(DataStore dataStore, String featureSourceName, String crs) {
@@ -63,15 +61,13 @@
Feature f = asFeature(feature);
HashMap<String, Object> attribs = new HashMap<String, Object>();
for (int i = 0; i < f.getNumberOfAttributes(); i++) {
- attribs.put(f.getFeatureType().getAttributeType(i).getLocalName(),
- f.getAttribute(i));
+ attribs.put(f.getFeatureType().getAttributeType(i).getLocalName(), f.getAttribute(i));
}
return attribs;
}
public String getCrs() throws IOException {
return "EPSG:" + srid;
- //return getFeatureSourceCRS();
}
public Geometry getGeometry(Object feature) throws IOException {
@@ -84,18 +80,16 @@
}
public String getId(Object feature) throws IOException {
- Feature featureAsFeature = asFeature(feature);
- return featureAsFeature.getID().substring(featureAsFeature.getID().lastIndexOf(".") + 1);
+ Feature realFeature = asFeature(feature);
+ return getLocalId(realFeature.getID());
}
public Object newInstance() throws IOException {
try {
return getSchema().create(null);
} catch (IllegalAttributeException e) {
- logger.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
@@ -103,30 +97,25 @@
try {
return getSchema().create(null, id);
} catch (IllegalAttributeException e) {
- logger.error("Illegal attribute but no attributes provided for "
- + getFeatureSourceName());
- throw new IOException(
- "Illegal attribute but no attributes provided, probably a geotools bug ???");
+ logger.error("Illegal attribute but no attributes provided for " + getFeatureSourceName());
+ throw new IOException("Illegal attribute but no attributes provided, probably a geotools bug ???");
}
}
- public void setAttributes(Object feature, Map<String, Object> attributes)
- throws IOException {
+ public void setAttributes(Object feature, Map<String, Object> attributes) throws IOException {
for (Map.Entry<String, Object> entry : attributes.entrySet()) {
try {
if (!entry.getKey().equals(getGeometryAttributeName())) {
- asFeature(feature).setAttribute(
- entry.getKey(), entry.getValue());
+ asFeature(feature).setAttribute(entry.getKey(), entry.getValue());
}
} catch (IllegalAttributeException e) {
- throw new IOException("Illegal attribute name/value : "
- + entry.getKey() + "/" + entry.getValue());
+ throw new IOException("Illegal attribute name/value : " + entry.getKey() + "/"
+ + entry.getValue());
}
}
}
- public void setGeometry(Object feature, Geometry geometry)
- throws IOException {
+ public void setGeometry(Object feature, Geometry geometry) throws IOException {
try {
asFeature(feature).setDefaultGeometry(geometry);
} catch (IllegalAttributeException e) {
@@ -144,12 +133,14 @@
// Private functions:
- private Feature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof Feature) {
- return (Feature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, is not a WrappedFeature");
+ private String getLocalId(String featureId) {
+ if (featureId != null) {
+ int pos = featureId.lastIndexOf(".");
+ if (pos >= 0) {
+ return featureId.substring(pos + 1);
+ }
+ return featureId;
}
+ return null;
}
}
\ No newline at end of file
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModel.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -37,7 +37,6 @@
import org.geomajas.layermodels.geotools.FeatureSourceRetriever;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
-import org.geotools.feature.DefaultFeature;
import org.geotools.feature.Feature;
import org.geotools.feature.FeatureCollection;
import org.geotools.feature.FeatureIterator;
@@ -45,8 +44,7 @@
import com.vividsolutions.jts.geom.Envelope;
-public class ShapeInMemLayerModel extends FeatureSourceRetriever implements
- LayerModel {
+public class ShapeInMemLayerModel extends FeatureSourceRetriever implements LayerModel {
private Map<String, Feature> features = new HashMap<String, Feature>();
@@ -56,13 +54,13 @@
private FeatureModel featureModel;
- public ShapeInMemLayerModel(ShapeInMemLayerModelFactory factory,
- DataStore dataStore, FeatureType featureType) throws IOException {
+ public ShapeInMemLayerModel(ShapeInMemLayerModelFactory factory, DataStore dataStore,
+ FeatureType featureType) throws IOException {
super(dataStore, featureType.getName());
this.factory = factory;
+ featureModel = new ShapeInMemFeatureModel(dataStore, featureType.getName(), featureType
+ .getGeometryType().getCrs());
initFeatures();
- featureModel = new ShapeInMemFeatureModel(dataStore, featureType
- .getName(), featureType.getGeometryType().getCrs());
}
public Iterator<?> getElements(Filter filter) throws IOException {
@@ -94,10 +92,13 @@
}
public Object create(Object feature) throws IOException {
- Feature wrapped = asFeature(feature);
- //wrapped.setId(getNextId());
- features.put(wrapped.getID(), wrapped);
- return wrapped;
+ String id = featureModel.getId(feature);
+ if (id != null && !features.containsKey(id)) {
+ Feature realFeature = asFeature(feature);
+ features.put(id, realFeature);
+ return realFeature;
+ }
+ return null;
}
public Object read(String featureId) throws IOException {
@@ -112,8 +113,7 @@
features.remove(featureId);
}
- public Iterator<?> getObjects(String attributeName, Filter filter)
- throws IOException {
+ public Iterator<?> getObjects(String attributeName, Filter filter) throws IOException {
return Collections.EMPTY_LIST.iterator();
}
@@ -123,15 +123,6 @@
// Private functions:
- private Feature asFeature(Object possibleFeature) throws IOException {
- if (possibleFeature instanceof Feature) {
- return (Feature) possibleFeature;
- } else {
- throw new IOException(
- "Not a legal feature, is not a WrappedFeature");
- }
- }
-
private synchronized String getNextId() {
String id = nextId + "";
nextId++;
@@ -144,19 +135,13 @@
FeatureIterator iterator = col.features();
while (iterator.hasNext()) {
Feature feature = iterator.next();
- String id = feature.getID().substring(
- feature.getID().lastIndexOf(".") + 1);
+ String id = featureModel.getId(feature);
features.put(id, feature);
- trackNextId(id);
+ int intId = new Integer(id).intValue();
+ if (intId > nextId) {
+ nextId = intId;
+ }
}
getNextId();
}
-
- private void trackNextId(String fid) {
- int id = new Integer(fid).intValue();
- if (id > nextId) {
- nextId = id;
- }
- }
-
}
\ No newline at end of file
Modified: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/ShapeInMemLayerModelFactory.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -25,6 +25,8 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -32,7 +34,6 @@
import org.geomajas.core.application.AbstractLayerModelFactory;
import org.geomajas.core.application.LayerModel;
import org.geomajas.core.application.LayerModelFactory;
-import org.geomajas.core.global.MajasContextListener;
import org.geomajas.schemas.configuration.FeatureType;
import org.geotools.data.DataStore;
import org.geotools.data.shapefile.ShapefileDataStore;
@@ -45,27 +46,34 @@
public ShapeInMemLayerModelFactory(String id, Map<String, String> parameters) {
super(id);
this.parameters = new HashMap<String, String>(parameters);
-
+
if (this.parameters.containsKey("url")) {
+ boolean urlIsNotFound = false;
String url = this.parameters.get("url");
- if (url.startsWith("file:")) {
- try {
- url = this.parameters.remove("url");
- File root = new File(parameters
- .get(LayerModelFactory.PARAM_APPLICATION_DIR));
- url = "file:"
- + root.getAbsolutePath().replace(File.separator, "/")
- + "/" + url.substring(5).replace(File.separator, "/");
- this.parameters.put("url", url);
-
-// String root = MajasContextListener.getWebappRoot();//.substring(2);
-// url = this.parameters.remove("url");
-// url = "file:" + root + url.substring(5);
-// url = url.replace('\\', '/');
-// this.parameters.put("url", url);
+ try {
+ URL check = new URL(url);
+ InputStream in = check.openStream();
+ if (in == null) {
+ throw new IOException("File not found: " + url);
}
- catch(NullPointerException ne) {
- ne.printStackTrace();
+ in.close();
+ } catch (MalformedURLException e) {
+ urlIsNotFound = true;
+ } catch (IOException e) {
+ urlIsNotFound = true;
+ }
+
+ if (urlIsNotFound) {
+ if (url.startsWith("file:")) {
+ try {
+ url = this.parameters.remove("url");
+ File root = new File(parameters.get(LayerModelFactory.PARAM_APPLICATION_DIR));
+ url = "file:" + root.getAbsolutePath().replace(File.separator, "/") + "/"
+ + url.substring(5).replace(File.separator, "/");
+ this.parameters.put("url", url);
+ } catch (NullPointerException e) {
+ this.parameters.put("url", url);
+ }
}
}
}
@@ -74,14 +82,11 @@
public LayerModel createLayerModel(FeatureType featureType)
throws IOException {
DataStore dataStore = new ShapefileDataStore(new URL(parameters.get("url")));
-
return new ShapeInMemLayerModel(this, dataStore, featureType);
}
public Map<Object, Object> getRelatedFeatures(SpatialRelation query)
throws IOException {
- // TODO Auto-generated method stub
return null;
}
-
}
\ No newline at end of file
Deleted: branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/main/java/org/geomajas/layermodels/shapeinmem/WrappedFeature.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -1,112 +0,0 @@
-/**
- * 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/>.
- */
-package org.geomajas.layermodels.shapeinmem;
-
-import org.geotools.feature.Feature;
-import org.geotools.feature.IllegalAttributeException;
-import org.geotools.geometry.jts.ReferencedEnvelope;
-
-import com.vividsolutions.jts.geom.Geometry;
-
-/**
- * Wrapper around a geotools feature for a Shape layermodel. Package visibility.
- *
- * @author Pieter De Graef
- */
-public class WrappedFeature implements Feature {
-
- private String id;
-
- private Feature feature;
-
- public WrappedFeature(Feature feature) {
- this.feature = feature;
- this.id = feature.getID().substring(
- feature.getID().lastIndexOf(".") + 1);
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Feature getFeature() {
- return feature;
- }
-
- public Object getAttribute(String arg0) {
- return feature.getAttribute(arg0);
- }
-
- public Object getAttribute(int arg0) {
- return feature.getAttribute(arg0);
- }
-
- public Object[] getAttributes(Object[] arg0) {
- return feature.getAttributes(arg0);
- }
-
- public ReferencedEnvelope getBounds() {
- return feature.getBounds();
- }
-
- public Geometry getDefaultGeometry() {
- return feature.getDefaultGeometry();
- }
-
- public org.geotools.feature.FeatureType getFeatureType() {
- return feature.getFeatureType();
- }
-
- public String getID() {
- return getId();
- }
-
- public int getNumberOfAttributes() {
- return feature.getNumberOfAttributes();
- }
-
- public void setAttribute(int arg0, Object arg1)
- throws IllegalAttributeException,
- ArrayIndexOutOfBoundsException {
- feature.setAttribute(arg0, arg1);
-
- }
-
- public void setAttribute(String arg0, Object arg1)
- throws IllegalAttributeException {
- feature.setAttribute(arg0, arg1);
-
- }
-
- public void setDefaultGeometry(Geometry arg0)
- throws IllegalAttributeException {
- feature.setDefaultGeometry(arg0);
-
- }
-}
-
Modified: branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/core/filters/FilterTestGeoToolsLayerModel.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/core/filters/FilterTestGeoToolsLayerModel.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/core/filters/FilterTestGeoToolsLayerModel.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -9,7 +9,6 @@
import org.geomajas.layermodels.geotools.GeotoolsLayerModel;
import org.geomajas.layermodels.geotools.GeotoolsLayerModelFactory;
-import org.geomajas.layermodels.shapeinmem.WrappedFeature;
import org.geomajas.schemas.configuration.Attributes;
import org.geomajas.schemas.configuration.FeatureType;
import org.geomajas.schemas.configuration.GeometricAttribute;
Modified: branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsFeatureModelTest.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -1,7 +1,6 @@
package org.geomajas.layermodels.geotools;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -18,127 +17,112 @@
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 DataStore ds;
- private GeotoolsFeatureModel gfm;
- private Feature f;
-
- public GeoToolsFeatureModelTest() {
- URL url = null;
- FeatureSource fs = null;
- FeatureIterator fi = null;
- try {
- url = new URL("file:resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp");
- ds = new ShapefileDataStore(url);
-
- gfm = new GeotoolsFeatureModel(ds, "cities", "4326");
-
- try {
- fs = gfm.getFeatureSource();
- fi = fs.getFeatures().features();
- }
- catch (IOException e) {
- e.printStackTrace();
- }
-
- f = fi.next();
- f = fi.next();
- f = fi.next();
- f = fi.next();
-
- } catch (MalformedURLException e) {
- e.printStackTrace();
- }
+
+ 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(gfm.getId(f), "4");
+ assertEquals(featureModel.getId(feature), "4");
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testGetAttribute() {
try {
- assertEquals(gfm.getAttribute(f, "City"), "Heusweiler");
+ assertEquals(featureModel.getAttribute(feature, "City"), "Heusweiler");
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testGetAttributes() {
try {
- assertEquals(gfm.getAttributes(f).get("City"), "Heusweiler");
-
+ assertEquals(featureModel.getAttributes(feature).get("City"), "Heusweiler");
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testGetGeometry() {
try {
- assertEquals(gfm.getGeometry(f).getCoordinate().x, 6.93);
+ assertEquals(featureModel.getGeometry(feature).getCoordinate().x, 6.93);
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testGetGeometryAttributeName() {
try {
- assertEquals(gfm.getGeometryAttributeName(), "the_geom");
+ assertEquals(featureModel.getGeometryAttributeName(), "the_geom");
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testGetCRS() {
try {
- assertEquals("EPSG:4326", gfm.getCrs());
+ assertEquals("EPSG:4326", featureModel.getCrs());
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testSetAttributes() {
try {
- Map<String,Object> map = new HashMap<String,Object>();
+ Map<String, Object> map = new HashMap<String, Object>();
map.put("City", "Heikant");
- map.put("the_geom", gfm.getGeometry(f));
+ map.put("the_geom", featureModel.getGeometry(feature));
map.put("Population", 100);
- gfm.setAttributes(f, map);
-
- assertEquals(gfm.getAttribute(f, "City"), "Heikant");
-
- //assertEquals(gfm.getGeometryAttributeName(), "the_geom");
+ featureModel.setAttributes(feature, map);
+ assertEquals(featureModel.getAttribute(feature, "City"), "Heikant");
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-
+
public void testSetGeometry() {
try {
WKTReader wktReader = new WKTReader();
try {
- Point pt = (Point)wktReader.read("POINT (5 5)");
- gfm.setGeometry(f, pt);
- assertEquals(5, gfm.getGeometry(f).getCoordinate().x, 0);
-
+ Point pt = (Point) wktReader.read("POINT (5 5)");
+ featureModel.setGeometry(feature, pt);
+ assertEquals(5, featureModel.getGeometry(feature).getCoordinate().x, 0);
} catch (ParseException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
} catch (IOException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
-}
+}
\ No newline at end of file
Modified: branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/geotools/GeoToolsLayerModelTest.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -1,6 +1,8 @@
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;
@@ -9,6 +11,7 @@
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;
@@ -20,10 +23,9 @@
import org.geotools.feature.AttributeTypeFactory;
import org.geotools.feature.DefaultFeature;
import org.geotools.feature.Feature;
-import org.geotools.feature.FeatureTypeFactory;
+import org.geotools.feature.FeatureTypeBuilder;
import org.geotools.feature.IllegalAttributeException;
import org.geotools.feature.SchemaException;
-import org.geotools.filter.FilterFactoryFinder;
import org.opengis.filter.Filter;
import com.vividsolutions.jts.geom.Point;
@@ -31,177 +33,154 @@
import com.vividsolutions.jts.io.WKTReader;
public class GeoToolsLayerModelTest extends TestCase {
- private GeotoolsLayerModel gtlm;
+
+ private static final String SHAPE_FILE = "org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp";
+
+ private GeotoolsLayerModel layerModel;
+
private Filter filter;
-
- public GeoToolsLayerModelTest() {
- gtlm = getLayerModel();
- filter = getFilter();
- }
-
-
- public GeotoolsLayerModel getLayerModel() {
+
+ protected void setUp() throws Exception {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ URL url = classloader.getResource(SHAPE_FILE);
Map<String, String> params = new HashMap<String, String>();
- params.put("url", "file:resources/org/geomajas/configuration/applications/simplevectors/shapes/cities_world/cities.shp");
- GeotoolsLayerModelFactory gtlmf = 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);
-
- GeotoolsLayerModel gtlm = null;
- try {
- gtlm = (GeotoolsLayerModel)gtlmf.createLayerModel(ft);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+
+ File file = new File(url.getFile());
+ if (file == null || !file.exists()) {
+ System.out.println(url);
+ return;
}
- return gtlm;
+ 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 Filter getFilter() {
- org.opengis.filter.FilterFactory ff = FilterFactoryFinder.createFilterFactory();
- Filter filter = ff.greater(ff.property("Population"), ff.literal(49900));
- return filter;
- }
-
- public void testRead(){
+
+ public void testRead() {
DefaultFeature f = null;
try {
- f = (DefaultFeature)gtlm.read("9703");
- } catch (IOException e) {}
-
+ 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");
-
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
try {
- f = (DefaultFeature)gtlm.read("10");
+ f = (DefaultFeature) layerModel.read("10");
try {
f.setAttribute("City", sdf.format(cal.getTime()));
- } catch (IllegalAttributeException e) {}
- gtlm.update(f);
- } catch (IOException e) {}
-
+ } 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 = (org.geotools.feature.FeatureType) FeatureTypeFactory.newFeatureType(new AttributeType[] { geom, city, population }, "city");
- } catch (FactoryRegistryException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- } catch (SchemaException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- WKTReader wktReader = new WKTReader();
- Point geometry = null;
- try {
- geometry = (Point) wktReader.read("POINT (0 0)");
- } catch (ParseException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
- String name = "Tsjakamaka";
- Integer pop = new Integer(100);
- Feature newCity = 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 });
- } catch (IllegalAttributeException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
- }
-
- try {
- gtlm.create(newCity);
+ 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)gtlm.read("10580");
- System.out.println(f.getAttribute("City"));
-
- gtlm.delete("10580");
- //f = (DefaultFeature)gtlm.read("10580");
- //assertEquals(null, f.getAttribute("City"));
+ f = (DefaultFeature) layerModel.read("10580");
+ assertNotNull(f);
+ layerModel.delete("10580");
+ assertTrue(true);
} catch (IOException e) {
-
+ assertTrue(false);
}
}
-
-
+
public void testGetBounds() {
try {
- //Gecheckt in QGis!
- assertEquals("ReferencedEnvelope[-175.22 : 179.38, -46.41 : 69.41]", gtlm.getBounds().toString());
+ // Checked in QGis!
+ assertEquals("ReferencedEnvelope[-175.22 : 179.38, -46.41 : 69.41]", layerModel.getBounds()
+ .toString());
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
}
}
-
+
public void testGetBoundsFilter() {
try {
- //Gecheckt in QGis!
- assertEquals("ReferencedEnvelope[-118.01 : 120.86, -19.99 : 53.09]", gtlm.getBounds(filter).toString());
+ // Checked in QGis!
+ assertEquals("ReferencedEnvelope[-118.01 : 120.86, -19.99 : 53.09]", layerModel.getBounds(filter)
+ .toString());
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
}
}
-
+
public void testGetElements() {
try {
- //Gecheckt in QGis!
- Iterator it = gtlm.getElements(filter);
+ // Checked in QGis!
+ Iterator<?> it = layerModel.getElements(filter);
int counter = 0;
- while(it.hasNext()) {
+ while (it.hasNext()) {
it.next();
counter++;
}
assertEquals(16, counter);
} catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
}
}
-}
+}
\ No newline at end of file
Modified: branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/google/GoogleLayerTest.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -27,91 +27,78 @@
import org.geotools.geometry.DirectPosition2D;
import org.geotools.referencing.CRS;
-import org.geotools.referencing.FactoryFinder;
import org.junit.Test;
import org.opengis.geometry.MismatchedDimensionException;
-import org.opengis.parameter.ParameterValueGroup;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.NoSuchAuthorityCodeException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;
-import org.opengis.referencing.operation.MathTransformFactory;
import org.opengis.referencing.operation.TransformException;
public class GoogleLayerTest {
+
public static double EARTH_RADIUS_IN_METERS = 6378137.0;
- public static double EQUATOR_IN_METERS = 2 * Math.PI
- * EARTH_RADIUS_IN_METERS;
+ public static double EQUATOR_IN_METERS = 2 * Math.PI * EARTH_RADIUS_IN_METERS;
@Test
- public void testGoogleProjection() throws NoSuchAuthorityCodeException,
- FactoryException, MismatchedDimensionException, TransformException {
+ public void testGoogleProjection() throws NoSuchAuthorityCodeException, FactoryException,
+ MismatchedDimensionException, TransformException {
assertEquals(1, 1);
CoordinateReferenceSystem google = CRS.decode("EPSG:4326");
google.getCoordinateSystem().getAxis(0).getMinimumValue();
- google = CRS
- .parseWKT("PROJCS[\"Google Mercator\", "
- + "GEOGCS[\"WGS 84\", "
- + "DATUM[\"World Geodetic System 1984\", "
- + "SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], "
- + "AUTHORITY[\"EPSG\",\"6326\"]], "
- + "PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], "
- + "UNIT[\"degree\", 0.017453292519943295], "
- + "AXIS[\"Geodetic latitude\", NORTH], "
- + "AXIS[\"Geodetic longitude\", EAST], "
- + "AUTHORITY[\"EPSG\",\"4326\"]], "
- + "PROJECTION[\"Mercator (1SP)\", AUTHORITY[\"EPSG\",\"9804\"]], "
- + "PARAMETER[\"semi_major\", 6378137.0], "
- + "PARAMETER[\"semi_minor\", 6378137.0], "
- + "PARAMETER[\"latitude_of_origin\", 0.0], "
- + "PARAMETER[\"central_meridian\", 0.0], "
- + "PARAMETER[\"scale_factor\", 1.0], "
- + "PARAMETER[\"false_easting\", 0.0], "
- + "PARAMETER[\"false_northing\", 0.0], "
- + "UNIT[\"m\", 1.0], " + "AXIS[\"Easting\", EAST], "
- + "AXIS[\"Northing\", NORTH], "
- + "AUTHORITY[\"EPSG\",\"900913\"]]");
+ google = CRS.parseWKT("PROJCS[\"Google Mercator\", " + "GEOGCS[\"WGS 84\", "
+ + "DATUM[\"World Geodetic System 1984\", "
+ + "SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], "
+ + "AUTHORITY[\"EPSG\",\"6326\"]], "
+ + "PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], "
+ + "UNIT[\"degree\", 0.017453292519943295], " + "AXIS[\"Geodetic latitude\", NORTH], "
+ + "AXIS[\"Geodetic longitude\", EAST], " + "AUTHORITY[\"EPSG\",\"4326\"]], "
+ + "PROJECTION[\"Mercator (1SP)\", AUTHORITY[\"EPSG\",\"9804\"]], "
+ + "PARAMETER[\"semi_major\", 6378137.0], " + "PARAMETER[\"semi_minor\", 6378137.0], "
+ + "PARAMETER[\"latitude_of_origin\", 0.0], " + "PARAMETER[\"central_meridian\", 0.0], "
+ + "PARAMETER[\"scale_factor\", 1.0], " + "PARAMETER[\"false_easting\", 0.0], "
+ + "PARAMETER[\"false_northing\", 0.0], " + "UNIT[\"m\", 1.0], "
+ + "AXIS[\"Easting\", EAST], " + "AXIS[\"Northing\", NORTH], "
+ + "AUTHORITY[\"EPSG\",\"900913\"]]");
- MathTransform lonLatToGoogle = CRS.findMathTransform(CRS
- .decode("EPSG:4326"), google, false);
+ MathTransform lonLatToGoogle = CRS.findMathTransform(CRS.decode("EPSG:4326"), google, false);
DirectPosition2D lonlatPosition = new DirectPosition2D(4, 51);
DirectPosition2D googlePosition = new DirectPosition2D();
lonLatToGoogle.transform(lonlatPosition, googlePosition);
System.out.println(googlePosition);
- MathTransform lonLatToLamb = CRS.findMathTransform(CRS
- .decode("EPSG:4326"), CRS.decode("EPSG:31300"), false);
+ MathTransform lonLatToLamb = CRS.findMathTransform(CRS.decode("EPSG:4326"), CRS.decode("EPSG:31300"),
+ false);
lonLatToLamb.transform(lonlatPosition, googlePosition);
System.out.println(googlePosition);
}
@Test
- public void testBounds() throws NoSuchAuthorityCodeException,
- FactoryException, MismatchedDimensionException, TransformException {
- MathTransform googleToLonLat = CRS.findMathTransform(CRS
- .decode("EPSG:900913"), CRS.decode("EPSG:4326"));
- DirectPosition2D googlePosition = new DirectPosition2D(0,
- Math.PI * 6378137.0);
+ public void testBounds() throws NoSuchAuthorityCodeException, FactoryException,
+ MismatchedDimensionException, TransformException {
+ MathTransform googleToLonLat = CRS.findMathTransform(CRS.decode("EPSG:900913"), CRS
+ .decode("EPSG:4326"));
+ DirectPosition2D googlePosition = new DirectPosition2D(0, Math.PI * 6378137.0);
DirectPosition2D lonlatPosition = new DirectPosition2D();
googleToLonLat.transform(googlePosition, lonlatPosition);
System.out.println(googlePosition);
System.out.println(lonlatPosition);
}
-
+
@Test
- public void testConversion() throws NoSuchAuthorityCodeException,
- FactoryException, MismatchedDimensionException, TransformException {
- MathTransform lonLatToGoogle = CRS.findMathTransform(CRS
- .decode("EPSG:31300"), CRS.decode("EPSG:900913"));
- DirectPosition2D lonlatPosition = new DirectPosition2D(162680,167280);
+ public void testConversion() throws NoSuchAuthorityCodeException, FactoryException,
+ MismatchedDimensionException, TransformException {
+ MathTransform lonLatToGoogle = CRS.findMathTransform(CRS.decode("EPSG:31300"), CRS
+ .decode("EPSG:900913"));
+ DirectPosition2D lonlatPosition = new DirectPosition2D(162680, 167280);
DirectPosition2D googlePosition = new DirectPosition2D();
lonLatToGoogle.transform(lonlatPosition, googlePosition);
System.out.println(googlePosition);
- lonlatPosition = new DirectPosition2D(165000,170000);
+ lonlatPosition = new DirectPosition2D(165000, 170000);
googlePosition = new DirectPosition2D();
lonLatToGoogle.transform(lonlatPosition, googlePosition);
System.out.println(googlePosition);
Modified: branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java
===================================================================
--- branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java 2009-08-19 08:03:55 UTC (rev 3748)
+++ branches/1.3.x_matthias/majas-core/src/test/java/org/geomajas/layermodels/shapeinmem/ShapeInMemFeatureModelTest.java 2009-08-19 08:45:54 UTC (rev 3749)
@@ -1,12 +1,12 @@
package org.geomajas.layermodels.shapeinmem;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
-import org.geomajas.layermodels.geotools.GeotoolsFeatureModel;
+import junit.framework.TestCase;
+
import org.geotools.data.DataStore;
import org.geotools.data.FeatureSource;
import org.geotools.data.shapefile.ShapefileDataStore;
@@ -17,129 +17,112 @@
import com.vividsolutions.jts.io.ParseException;
import com.vividsolutions.jts.io.WKTReader;
-import junit.framework.TestCase;
-
+/**
+ * <p>
+ * Testcase testing all methods of the Shape-In-Memory FeatureModel.
+ * </p>
+ *
+ * @author Mathias Versichele
+ */
public class ShapeInMemFeatureModelTest extends TestCase {
- private DataStore ds;
- private Shap...
[truncated message content] |
|
From: <sv...@ge...> - 2009-08-19 09:03:41
|
Author: joachimvda Date: 2009-08-19 10:03:55 +0200 (Wed, 19 Aug 2009) New Revision: 3748 Removed: branches/1.5.x/geomajas/modules/ branches/1.5.x/geomajas/webapps/ Log: MAJ-386 change module/directory structure |
|
From: <sv...@ge...> - 2009-08-19 09:01:37
|
Author: joachimvda Date: 2009-08-19 10:01:51 +0200 (Wed, 19 Aug 2009) New Revision: 3747 Added: branches/1.5.x/geomajas-dojo-simple/ branches/1.5.x/geomajas-gwt-example/ branches/1.5.x/pom.xml Log: MAJ-386 change module/directory structure Added: branches/1.5.x/pom.xml =================================================================== --- branches/1.5.x/pom.xml (rev 0) +++ branches/1.5.x/pom.xml 2009-08-19 08:01:51 UTC (rev 3747) @@ -0,0 +1,17 @@ +<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>all</artifactId> + <version>1.5.0</version> + <packaging>pom</packaging> + + <name>Grouping of all Geomajas modules</name> + <modules> + <module>geomajas-checkstyle</module> + <module>geomajas</module> + <module>geomajas-dojo-simple</module> + <module>geomajas-dojo-example</module> + <module>geomajas-gwt-simple</module> + <module>geomajas-gwt-example</module> + </modules> +</project> |
|
From: <sv...@ge...> - 2009-08-19 08:56:22
|
Author: joachimvda Date: 2009-08-19 09:56:35 +0200 (Wed, 19 Aug 2009) New Revision: 3746 Added: branches/1.5.x/geomajas-dojo-example/ branches/1.5.x/geomajas-gwt-simple/ Removed: branches/1.5.x/geomajas/webapps/geomajas-gwt/ branches/1.5.x/geomajas/webapps/geomajas-tutorial/ Log: MAJ-386 change module/directory structure Property changes on: branches/1.5.x/geomajas-dojo-example ___________________________________________________________________ Added: svn:ignore + .classpath .project .settings target bin Added: svn:mergeinfo + Property changes on: branches/1.5.x/geomajas-gwt-simple ___________________________________________________________________ Added: svn:ignore + .settings .project .classpath target tomcat bin build Added: svn:mergeinfo + |