All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geomajas.testdata.layerBeansSynthetic.xml Maven / Gradle / Ivy

There is a newer version: 1.18.5
Show newest version
<!--
  ~ This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
  ~
  ~ Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
  ~
  ~ The program is available in open source according to the GNU Affero
  ~ General Public License. All contributions in this program are covered
  ~ by the Geomajas Contributors License Agreement. For full licensing
  ~ details, see LICENSE.txt in the project root.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">

	<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
		<property name="customEditors">
			<map>
				<entry key="java.util.Date">
					<bean class="org.springframework.beans.propertyeditors.CustomDateEditor">
						<constructor-arg>
							<bean class="java.text.SimpleDateFormat">
								<constructor-arg value="yyyy-MM-dd" />
								<constructor-arg value="null" />
							</bean>
						</constructor-arg>
						<constructor-arg value="true" />
					</bean>
				</entry>
			</map>
		</property>
	</bean>

	<bean name="layerBeansSyntheticInfo" class="org.geomajas.configuration.VectorLayerInfo">
		<property name="layerType" value="MULTIPOLYGON" />
		<property name="crs" value="EPSG:4326" />
		<property name="maxExtent">
			<bean class="org.geomajas.geometry.Bbox">
				<property name="x" value="-50" />
				<property name="y" value="-50" />
				<property name="width" value="100" />
				<property name="height" value="100" />
			</bean>
		</property>
		<property name="featureInfo" ref="beansSyntheticInfo" />
		<property name="namedStyleInfos">
			<list>
				<ref bean="layerBeansSyntheticStyleInfo" />
				<ref bean="layerBeansSyntheticSldStyleInfo" />
			</list>
		</property>
	</bean>
	
		<bean class="org.geomajas.configuration.FeatureInfo" name="beansSyntheticInfo">
		<property name="dataSourceName" value="org.geomajas.layer.bean.FeatureBean" />
		<property name="identifier">
			<bean class="org.geomajas.configuration.PrimitiveAttributeInfo">
				<property name="label" value="Id" />
				<property name="name" value="id" />
				<property name="type" value="LONG" />
			</bean>
		</property>
		<property name="geometryType">
			<bean class="org.geomajas.configuration.GeometryAttributeInfo">
				<property name="name" value="geometry" />
				<property name="editable" value="true" />
			</bean>
		</property>
		<property name="attributes">
			<list>
				<bean class="org.geomajas.configuration.PrimitiveAttributeInfo">
					<property name="label" value="String attribute" />
					<property name="name" value="stringAttr" />
					<property name="editable" value="true" />
					<property name="identifying" value="true" />
					<property name="type" value="STRING" />
				</bean>
				<bean class="org.geomajas.configuration.SyntheticAttributeInfo">
					<property name="label" value="Name and id" />
					<property name="name" value="nameId" />
					<property name="identifying" value="true" />
					<property name="expression" value="stringAttr + ' ' + id" />
				</bean>
			</list>
		</property>
	</bean>
	

	<bean class="org.geomajas.configuration.NamedStyleInfo" id="layerBeansSyntheticStyleInfo">
		<property name="featureStyles">
			<list>
				<bean class="org.geomajas.configuration.FeatureStyleInfo">
					<property name="name" value="default" />
					<property name="fillColor" value="#FFFFFF" />
					<property name="fillOpacity" value="1" />
					<property name="strokeColor" value="#000000" />
					<property name="strokeOpacity" value="1" />
					<property name="strokeWidth" value="1" />
				</bean>
			</list>
		</property>
		<property name="labelStyle">
			<bean class="org.geomajas.configuration.LabelStyleInfo">
				<property name="labelAttributeName" value="nameId" />
				<property name="fontStyle">
					<bean class="org.geomajas.configuration.FontStyleInfo">
					</bean>
				</property>
				<property name="backgroundStyle">
					<bean class="org.geomajas.configuration.FeatureStyleInfo">
						<property name="fillColor" value="#FFFFFF" />
						<property name="fillOpacity" value="1" />
						<property name="strokeColor" value="#000000" />
						<property name="strokeOpacity" value="1" />
						<property name="strokeWidth" value="1" />
					</bean>
				</property>
			</bean>
		</property>
	</bean>

	<bean class="org.geomajas.configuration.NamedStyleInfo" name="layerBeansSyntheticSldStyleInfo">
		<property name="sldLocation" value="classpath:org/geomajas/testdata/sld/polygon_hatchingfill.sld"/>
 	</bean>

	<bean name="layerBeansSynthetic" class="org.geomajas.layer.bean.BeanLayer">
		<property name="layerInfo" ref="layerBeansSyntheticInfo" />
		<property name="features">
			<list>
				<bean class="org.geomajas.layer.bean.FeatureBean">
					<property name="id" value="1" />
					<property name="stringAttr" value="bean1" />
					<property name="geometry"
						value="MULTIPOLYGON(((10 10,40 10,40 40,10 40,10 10)))" />
				</bean>
				<bean class="org.geomajas.layer.bean.FeatureBean">
					<property name="id" value="2" />
					<property name="stringAttr" value="bean2" />
					<property name="geometry"
						value="MULTIPOLYGON(((-30 -30,30 -30,30 30,-30 30,-30 -30),(0 0,0 -20,-20 -20,-20 0,0 0)))" />
				</bean>
			</list>
		</property>
	</bean>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy