1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <beans xmlns=
"http://www.springframework.org/schema/beans"
3 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:
tx=
"http://www.springframework.org/schema/tx"
5 xmlns:
context=
"http://www.springframework.org/schema/context"
6 xsi:
schemaLocation=
"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
7 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
8 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
11 <bean id=
"genericApiCardinalityPropertyFilter" class=
"eu.etaxonomy.cdm.remote.json.util.CardinalityPropertyFilter">
12 <property name=
"includeToOneRelations" value=
"false" />
13 <property name=
"includeToManyRelations" value=
"false" />
14 <property name=
"exceptions">
16 <value>FeatureTree.root
</value>
17 <value>FeatureNode.children
</value>
18 <value>FeatureNode.feature
</value>
20 <value>TreeNode.data
</value>
21 <value>TreeNode.data
</value>
23 <value>PolytomousKey.root
</value>
24 <value>PolytomousKeyNode.children
</value>
25 <value>PolytomousKeyNode.question
</value>
26 <value>PolytomousKeyNode.feature
</value>
27 <value>PolytomousKeyNode.statement
</value>
28 <value>PolytomousKeyNode.modifyingText
</value>
30 <value>Media.representations
</value>
31 <value>MediaRepresentation.parts
</value>
33 <value>Annotation.annotationType
</value>
35 <!-- CardinalityPropertyFilter should allow defining exceptions for abstract super classes : -->
36 <!-- <value>eu.etaxonomy.cdm.model.description.DescriptionElementBase.feature</value> -->
38 <value>TextData.feature
</value>
39 <value>CategoricalData.feature
</value>
40 <value>CommonTaxonName.feature
</value>
41 <value>Distribution.feature
</value>
42 <value>IndividualsAssociation.feature
</value>
43 <value>QuantitativeData.feature
</value>
44 <value>TaxonInteraction.feature
</value>
45 <value>TextData.feature
</value>
46 <value>IdentifiableSource.citation
</value>
52 =================================================
53 default configuration for RESTful read(/write) service
54 =================================================
56 <bean name=
"jsonConfig" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
58 <property name=
"jsonBeanProcessorMatcher">
60 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.CdmProxyBeanProcessorMatcher" />
62 <property name=
"jsonBeanProcessors">
64 <entry key=
"org.hibernate.proxy.HibernateProxy">
65 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
67 <entry key=
"eu.etaxonomy.cdm.model.common.TermBase">
68 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
69 <property name=
"excludes">
70 <set value-type=
"java.lang.String">
71 <value>partOf
</value><!-- FIXME exclude partOf to avoid lazy loading exceptions -->
72 <value>kindOf
</value><!-- FIXME exclude kindOf to avoid lazy loading exceptions -->
73 <value>infraGenericMarker
</value><!-- FIXME leads to IllegalStateException if not excluded -->
78 <entry key=
"eu.etaxonomy.cdm.model.description.TextData">
79 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TextDataBeanProcessor" />
81 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonNode">
82 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeBeanProcessor" />
84 <entry key=
"eu.etaxonomy.cdm.model.reference.Reference">
85 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
87 <entry key=
"eu.etaxonomy.cdm.model.name.TypeDesignationBase">
88 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TypeDesignationBaseBeanProcessor"/>
90 <entry key=
"eu.etaxonomy.cdm.model.description.KeyStatement">
91 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.KeyStatementBeanProcessor" />
93 <entry key=
"eu.etaxonomy.cdm.model.agent.TeamOrPersonBase">
94 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TeamOrPersonBaseBeanProcessor" />
99 <property name=
"jsonPropertyFilter">
100 <bean class=
"net.sf.json.filters.OrPropertyFilter">
102 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
104 <constructor-arg ref=
"genericApiCardinalityPropertyFilter">
108 <property name=
"jsonValueProcessors">
110 <entry key=
"org.hibernate.proxy.HibernateProxy">
112 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
114 <entry key=
"java.util.UUID">
116 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
118 <entry key=
"org.joda.time.DateTime">
120 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
122 <entry key=
"java.util.Calendar">
124 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
126 <entry key=
"org.joda.time.Partial">
128 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
130 <entry key=
"java.lang.Class">
132 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
134 <entry key=
"java.util.Map">
135 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
137 <entry key=
"java.net.URI">
138 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
142 <property name=
"ignoreDefaultExcludes" value=
"true" />
143 <property name=
"excludes">
144 <list value-type=
"java.lang.String">
145 <value>declaringClass
</value><!-- DefaultExclude -->
146 <value>metaClass
</value><!-- DefaultExclude -->
148 <value>cacheStrategy
</value>
149 <value>createdBy
</value>
150 <value>updatedBy
</value>
156 =================================================
157 configuration for RESTful classification service
158 =================================================
160 <bean name=
"jsonConfigClassification" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
162 <property name=
"jsonBeanProcessorMatcher">
164 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.HibernateProxyBeanProcessorMatcher" />
166 <property name=
"jsonBeanProcessors">
168 <entry key=
"org.hibernate.proxy.HibernateProxy">
170 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
172 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonNode">
174 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeDaoBeanProcessor" />
178 <property name=
"jsonPropertyFilter">
179 <bean class=
"net.sf.json.filters.OrPropertyFilter">
181 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
183 <constructor-arg ref=
"genericApiCardinalityPropertyFilter">
187 <property name=
"jsonValueProcessors">
189 <entry key=
"org.hibernate.proxy.HibernateProxy">
191 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
193 <entry key=
"java.util.UUID">
195 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
197 <entry key=
"org.joda.time.DateTime">
199 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
201 <entry key=
"java.util.Calendar">
203 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
205 <entry key=
"org.joda.time.Partial">
207 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
209 <entry key=
"java.lang.Class">
211 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
213 <entry key=
"java.util.Map">
214 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
216 <entry key=
"java.net.URI">
217 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
221 <property name=
"ignoreDefaultExcludes" value=
"true" />
222 <property name=
"excludes">
223 <list value-type=
"java.lang.String">
224 <value>declaringClass
</value><!-- DefaultExclude -->
225 <value>metaClass
</value><!-- DefaultExclude -->
227 <value>cacheStrategy
</value>
228 <value>createdBy
</value>
229 <value>updatedBy
</value>
235 =================================================
236 configuration for RESTful portal service
237 =================================================
240 <bean name=
"jsonConfigPortal" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
242 <property name=
"jsonBeanProcessorMatcher">
244 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.CdmProxyBeanProcessorMatcher" />
246 <property name=
"jsonBeanProcessors">
248 <entry key=
"org.hibernate.proxy.HibernateProxy">
250 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
252 <entry key=
"eu.etaxonomy.cdm.model.taxon.Taxon">
253 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonBeanProcessor" />
255 <entry key=
"eu.etaxonomy.cdm.model.name.TaxonNameBase">
257 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameBaseBeanProcessor" />
259 <entry key=
"eu.etaxonomy.cdm.model.name.NameRelationship">
261 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.NameRelationshipBeanProcessor" />
263 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonRelationship">
265 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonRelationshipBeanProcessor" />
267 <entry key=
"eu.etaxonomy.cdm.model.common.TermBase">
269 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
270 <property name=
"replaceRepresentations" value=
"true" />
271 <property name=
"excludes">
272 <set value-type=
"java.lang.String">
273 <value>infraGenericMarker
</value><!-- FIXME leads to IllegalStateException if not excluded -->
274 <value>partOf
</value><!-- DefinedTermBase -->
275 <value>kindOf
</value><!-- DefinedTermBase -->
276 <value>includes
</value><!-- DefinedTermBase -->
277 <value>generalizationOf
</value><!-- DefinedTermBase -->
278 <value>vocabulary
</value><!-- DefinedTermBase -->
280 FIXME must exclude partOf, kindOf, includes, generalizationOf .. to
281 avoid class cast or lazy loading exceptions in TDWG Areas
287 <entry key=
"eu.etaxonomy.cdm.model.description.TextData">
289 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TextDataBeanProcessor">
290 <property name=
"replaceMultilanguageText" value=
"true" />
293 <entry key=
"eu.etaxonomy.cdm.model.media.Media">
294 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.MediaBeanProcessor">
295 <property name=
"replaceTitle" value=
"true" />
296 <property name=
"replaceDescription" value=
"true" />
299 <entry key=
"eu.etaxonomy.cdm.model.reference.Reference">
300 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
302 <entry key=
"eu.etaxonomy.cdm.model.description.TaxonNameDescription">
303 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameDescriptionBeanProcessor">
304 <property name=
"excludes">
305 <set value-type=
"java.lang.String">
306 <value>taxonName
</value>
311 <entry key=
"eu.etaxonomy.cdm.api.facade.DerivedUnitFacade">
312 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.DerivedUnitFacadeBeanProcessor"/>
314 <entry key=
"eu.etaxonomy.cdm.model.location.Point">
315 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.PointBeanProcessor"/>
317 <entry key=
"eu.etaxonomy.cdm.model.agent.TeamOrPersonBase">
318 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TeamOrPersonBaseBeanProcessor" />
322 <property name=
"jsonPropertyFilter">
323 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
325 <property name=
"jsonValueProcessors">
327 <entry key=
"org.hibernate.proxy.HibernateProxy">
329 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
331 <entry key=
"java.util.UUID">
333 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
335 <entry key=
"org.joda.time.DateTime">
337 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
339 <entry key=
"java.util.Calendar">
341 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
343 <entry key=
"org.joda.time.Partial">
345 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
347 <entry key=
"java.lang.Class">
349 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
351 <entry key=
"java.util.Map">
352 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
354 <entry key=
"java.net.URI">
355 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
359 <property name=
"ignoreDefaultExcludes" value=
"true" />
360 <property name=
"excludes">
361 <list value-type=
"java.lang.String">
362 <value>declaringClass
</value><!-- DefaultExclude -->
363 <value>metaClass
</value><!-- DefaultExclude -->
365 <value>annotations
</value>
366 <value>cacheStrategy
</value>
367 <value>markers
</value>
368 <value>createdBy
</value>
369 <value>updatedBy
</value>
370 <value>inDescription
</value>