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.statement
</value>
27 <value>PolytomousKeyNode.modifyingText
</value>
29 <value>Media.representations
</value>
30 <value>MediaRepresentation.parts
</value>
32 <!-- CardinalityPropertyFilter should allow defining exceptions for abstract super classes : -->
33 <!-- <value>eu.etaxonomy.cdm.model.description.DescriptionElementBase.feature</value> -->
35 <value>TextData.feature
</value>
36 <value>CategoricalData.feature
</value>
37 <value>CommonTaxonName.feature
</value>
38 <value>Distribution.feature
</value>
39 <value>IndividualsAssociation.feature
</value>
40 <value>QuantitativeData.feature
</value>
41 <value>TaxonInteraction.feature
</value>
42 <value>TextData.feature
</value>
43 <value>IdentifiableSource.citation
</value>
49 =================================================
50 default configuration for RESTful read(/write) service
51 =================================================
53 <bean name=
"jsonConfig" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
55 <property name=
"jsonBeanProcessorMatcher">
57 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.CdmProxyBeanProcessorMatcher" />
59 <property name=
"jsonBeanProcessors">
61 <entry key=
"org.hibernate.proxy.HibernateProxy">
62 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
64 <entry key=
"eu.etaxonomy.cdm.model.common.TermBase">
65 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
66 <property name=
"excludes">
67 <set value-type=
"java.lang.String">
68 <value>partOf
</value><!-- FIXME exclude partOf to avoid lazy loading exceptions -->
69 <value>kindOf
</value><!-- FIXME exclude kindOf to avoid lazy loading exceptions -->
70 <value>infraGenericMarker
</value><!-- FIXME leads to IllegalStateException if not excluded -->
75 <entry key=
"eu.etaxonomy.cdm.model.description.TextData">
76 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TextDataBeanProcessor" />
78 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonNode">
79 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeBeanProcessor" />
81 <entry key=
"eu.etaxonomy.cdm.model.reference.Reference">
82 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
84 <entry key=
"eu.etaxonomy.cdm.model.name.TypeDesignationBase">
85 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TypeDesignationBaseBeanProcessor"/>
87 <entry key=
"eu.etaxonomy.cdm.model.description.KeyStatement">
88 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.KeyStatementBeanProcessor" />
92 <property name=
"jsonPropertyFilter">
93 <bean class=
"net.sf.json.filters.OrPropertyFilter">
95 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
97 <constructor-arg ref=
"genericApiCardinalityPropertyFilter">
101 <property name=
"jsonValueProcessors">
103 <entry key=
"org.hibernate.proxy.HibernateProxy">
105 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
107 <entry key=
"java.util.UUID">
109 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
111 <entry key=
"org.joda.time.DateTime">
113 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
115 <entry key=
"java.util.Calendar">
117 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
119 <entry key=
"org.joda.time.Partial">
121 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
123 <entry key=
"java.lang.Class">
125 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
127 <entry key=
"java.util.Map">
128 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
130 <entry key=
"java.net.URI">
131 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
135 <property name=
"ignoreDefaultExcludes" value=
"true" />
136 <property name=
"excludes">
137 <list value-type=
"java.lang.String">
138 <value>declaringClass
</value><!-- DefaultExclude -->
139 <value>metaClass
</value><!-- DefaultExclude -->
141 <value>cacheStrategy
</value>
142 <value>createdBy
</value>
143 <value>updatedBy
</value>
149 =================================================
150 configuration for RESTful classification service
151 =================================================
153 <bean name=
"jsonConfigClassification" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
155 <property name=
"jsonBeanProcessorMatcher">
157 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.HibernateProxyBeanProcessorMatcher" />
159 <property name=
"jsonBeanProcessors">
161 <entry key=
"org.hibernate.proxy.HibernateProxy">
163 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
165 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonNode">
167 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeDaoBeanProcessor" />
171 <property name=
"jsonPropertyFilter">
172 <bean class=
"net.sf.json.filters.OrPropertyFilter">
174 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
176 <constructor-arg ref=
"genericApiCardinalityPropertyFilter">
180 <property name=
"jsonValueProcessors">
182 <entry key=
"org.hibernate.proxy.HibernateProxy">
184 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
186 <entry key=
"java.util.UUID">
188 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
190 <entry key=
"org.joda.time.DateTime">
192 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
194 <entry key=
"java.util.Calendar">
196 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
198 <entry key=
"org.joda.time.Partial">
200 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
202 <entry key=
"java.lang.Class">
204 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
206 <entry key=
"java.util.Map">
207 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
209 <entry key=
"java.net.URI">
210 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
214 <property name=
"ignoreDefaultExcludes" value=
"true" />
215 <property name=
"excludes">
216 <list value-type=
"java.lang.String">
217 <value>declaringClass
</value><!-- DefaultExclude -->
218 <value>metaClass
</value><!-- DefaultExclude -->
220 <value>cacheStrategy
</value>
221 <value>createdBy
</value>
222 <value>updatedBy
</value>
228 =================================================
229 configuration for RESTful portal service
230 =================================================
233 <bean name=
"jsonConfigPortal" class=
"eu.etaxonomy.cdm.remote.json.JsonConfigFactoryBean"
235 <property name=
"jsonBeanProcessorMatcher">
237 class=
"eu.etaxonomy.cdm.remote.json.processor.matcher.CdmProxyBeanProcessorMatcher" />
239 <property name=
"jsonBeanProcessors">
241 <entry key=
"org.hibernate.proxy.HibernateProxy">
243 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
245 <entry key=
"eu.etaxonomy.cdm.model.taxon.Taxon">
246 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonBeanProcessor" />
248 <entry key=
"eu.etaxonomy.cdm.model.name.TaxonNameBase">
250 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameBaseBeanProcessor" />
252 <entry key=
"eu.etaxonomy.cdm.model.name.NameRelationship">
254 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.NameRelationshipBeanProcessor" />
256 <entry key=
"eu.etaxonomy.cdm.model.taxon.TaxonRelationship">
258 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonRelationshipBeanProcessor" />
260 <entry key=
"eu.etaxonomy.cdm.model.common.TermBase">
262 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
263 <property name=
"replaceRepresentations" value=
"true" />
264 <property name=
"excludes">
265 <set value-type=
"java.lang.String">
266 <value>infraGenericMarker
</value><!-- FIXME leads to IllegalStateException if not excluded -->
267 <value>partOf
</value><!-- DefinedTermBase -->
268 <value>kindOf
</value><!-- DefinedTermBase -->
269 <value>includes
</value><!-- DefinedTermBase -->
270 <value>generalizationOf
</value><!-- DefinedTermBase -->
271 <value>vocabulary
</value><!-- DefinedTermBase -->
273 FIXME must exclude partOf, kindOf, includes, generalizationOf .. to
274 avoid class cast or lazy loading exceptions in TDWG Areas
280 <entry key=
"eu.etaxonomy.cdm.model.description.TextData">
282 class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TextDataBeanProcessor">
283 <property name=
"replaceMultilanguageText" value=
"true" />
286 <entry key=
"eu.etaxonomy.cdm.model.media.Media">
287 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.MediaBeanProcessor">
288 <property name=
"replaceTitle" value=
"true" />
289 <property name=
"replaceDescription" value=
"true" />
292 <entry key=
"eu.etaxonomy.cdm.model.reference.Reference">
293 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
295 <entry key=
"eu.etaxonomy.cdm.model.description.TaxonNameDescription">
296 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameDescriptionBeanProcessor">
297 <property name=
"excludes">
298 <set value-type=
"java.lang.String">
299 <value>taxonName
</value>
304 <entry key=
"eu.etaxonomy.cdm.api.facade.DerivedUnitFacade">
305 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.DerivedUnitFacadeBeanProcessor"/>
307 <entry key=
"eu.etaxonomy.cdm.model.location.Point">
308 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.bean.PointBeanProcessor"/>
312 <property name=
"jsonPropertyFilter">
313 <bean class=
"eu.etaxonomy.cdm.remote.json.util.InitializedHibernatePropertyFilter" />
315 <property name=
"jsonValueProcessors">
317 <entry key=
"org.hibernate.proxy.HibernateProxy">
319 class=
"eu.etaxonomy.cdm.remote.json.processor.value.HibernateJSONValueProcessor" />
321 <entry key=
"java.util.UUID">
323 class=
"eu.etaxonomy.cdm.remote.json.processor.value.UUIDJSONValueProcessor" />
325 <entry key=
"org.joda.time.DateTime">
327 class=
"eu.etaxonomy.cdm.remote.json.processor.value.DateTimeJSONValueProcessor" />
329 <entry key=
"java.util.Calendar">
331 class=
"eu.etaxonomy.cdm.remote.json.processor.value.CalendarJSONValueProcessor" />
333 <entry key=
"org.joda.time.Partial">
335 class=
"eu.etaxonomy.cdm.remote.json.processor.value.PartialJSONValueProcessor" />
337 <entry key=
"java.lang.Class">
339 class=
"eu.etaxonomy.cdm.remote.json.processor.value.ClassJSONValueProcessor" />
341 <entry key=
"java.util.Map">
342 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.MapJSONValueProcessor" />
344 <entry key=
"java.net.URI">
345 <bean class=
"eu.etaxonomy.cdm.remote.json.processor.value.URIJSONValueProcessor"/>
349 <property name=
"ignoreDefaultExcludes" value=
"true" />
350 <property name=
"excludes">
351 <list value-type=
"java.lang.String">
352 <value>declaringClass
</value><!-- DefaultExclude -->
353 <value>metaClass
</value><!-- DefaultExclude -->
355 <value>annotations
</value>
356 <value>cacheStrategy
</value>
357 <value>markers
</value>
358 <value>createdBy
</value>
359 <value>updatedBy
</value>
360 <value>inDescription
</value>