Project

General

Profile

Revision cd37d4f5

IDcd37d4f5e09aa1bdca6275562578c7e7c2f1a04c
Parent 4eb265cf
Child d30b5c09

Added by Andreas Müller over 2 years ago

cleanup

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/json/processor/bean/AbstractBeanProcessor.java
39 39

  
40 40
    public static final Logger logger = Logger.getLogger(AbstractBeanProcessor.class);
41 41

  
42
    private Set<String> excludes = new HashSet<String>();
42
    private Set<String> excludes = new HashSet<>();
43 43

  
44 44
    private Set<String> mergedExcludes = null;
45 45

  
......
79 79
     */
80 80
    protected Set<String> getMergedExcludes(){
81 81
        if(mergedExcludes  == null) {
82
            mergedExcludes = new HashSet<String>(excludes);
82
            mergedExcludes = new HashSet<>(excludes);
83 83
            if(getIgnorePropNames() != null){
84 84
                mergedExcludes.addAll(getIgnorePropNames());
85 85
            }
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/json/processor/bean/AbstractCdmBeanProcessor.java
1 1
/**
2 2
 * Copyright (C) 2009 EDIT
3
 * European Distributed Institute of Taxonomy 
3
 * European Distributed Institute of Taxonomy
4 4
 * http://www.e-taxonomy.eu
5
 * 
5
 *
6 6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
 * See LICENSE.TXT at the top of this package for the full license terms.
8 8
 */
......
15 15
 * @since 30.03.2009
16 16
 *
17 17
 */
18
public abstract class AbstractCdmBeanProcessor<T extends CdmBase> extends AbstractBeanProcessor<T>{
19
	
18
public abstract class AbstractCdmBeanProcessor<T extends CdmBase>
19
        extends AbstractBeanProcessor<T>{
20

  
20 21
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/json/processor/bean/DefaultBeanProcessor.java
18 18
 * @since Nov 21, 2013
19 19
 *
20 20
 */
21
public class DefaultBeanProcessor extends AbstractBeanProcessor {
21
public class DefaultBeanProcessor extends AbstractBeanProcessor<Object> {
22 22

  
23
    /* (non-Javadoc)
24
     * @see eu.etaxonomy.cdm.remote.json.processor.bean.AbstractBeanProcessor#getIgnorePropNames()
25
     */
26 23
    @Override
27
    public List getIgnorePropNames() {
24
    public List<String> getIgnorePropNames() {
28 25
        // nothing to ignore by default
29 26
        return null;
30 27
    }
31 28

  
32
    /* (non-Javadoc)
33
     * @see eu.etaxonomy.cdm.remote.json.processor.bean.AbstractBeanProcessor#processBeanSecondStep(java.lang.Object, net.sf.json.JSONObject, net.sf.json.JsonConfig)
34
     */
35 29
    @Override
36
    public JSONObject processBeanSecondStep(Object bean, JSONObject json, JsonConfig jsonConfig) {
37
        return json;
30
    public JSONObject processBeanSecondStep(Object bean, JSONObject jsonObj, JsonConfig jsonConfig) {
31
        return jsonObj;
38 32
    }
39 33

  
40 34
}
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/l10n/LocaleContext.java
20 20

  
21 21
		@Override
22 22
		protected Vector<Locale> initialValue() {
23
			return new Vector<Locale>();
23
			return new Vector<>();
24 24
		}
25 25

  
26 26
	};
27 27

  
28
	protected static Hashtable<String, List<Language>> languageMap = new Hashtable<String, List<Language>>();
28
	protected static Hashtable<String, List<Language>> languageMap = new Hashtable<>();
29 29

  
30 30
	private ITermService termService;
31 31

  
cdmlib-remote/src/main/resources/eu/etaxonomy/cdm/remote/json/jsonConfigurations.xml
108 108
    </property>
109 109
    <property name="jsonBeanProcessors">
110 110
      <map>
111
      <entry key="org.hibernate.proxy.HibernateProxy">
112
        <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
113
      </entry>
114
      <entry key="eu.etaxonomy.cdm.model.common.TermBase">
115
        <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
116
           <property name="excludes">
117
             <set value-type="java.lang.String">
118
                 <value>partOf</value><!-- FIXME exclude partOf to avoid  lazy loading exceptions  -->
119
                 <value>kindOf</value><!-- FIXME exclude kindOf to avoid  lazy loading exceptions  -->
120
                 <value>infraGenericMarker</value><!-- FIXME leads to IllegalStateException if not excluded  -->
121
             </set>
122
          </property>
123
        </bean>
124
        </entry>
125
        <entry key="eu.etaxonomy.cdm.model.media.Media">
126
          <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.MediaBeanProcessor">
127
            <property name="replaceTitle" value="true" />
128
            <property name="replaceDescription" value="true" />
129
          </bean>
130
        </entry>
131
        <entry key="eu.etaxonomy.cdm.model.taxon.TaxonNode">
132
          <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeBeanProcessor" />
133
        </entry>
134
        <entry key="eu.etaxonomy.cdm.model.reference.Reference">
135
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
136
        </entry>
137
        <entry key="eu.etaxonomy.cdm.model.name.TaxonName">
138
          <bean
139
            class="eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameBeanProcessor">
140
            <property name="skipTaggedName" value="true" />
141
          </bean>
142
        </entry>
143
        <entry key="eu.etaxonomy.cdm.model.name.TypeDesignationBase">
144
          <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TypeDesignationBaseBeanProcessor"/>
145
        </entry>
146
        <entry key="eu.etaxonomy.cdm.model.description.KeyStatement">
147
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.KeyStatementBeanProcessor" />
148
        </entry>
149
        <entry key="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase">
150
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TeamOrPersonBaseBeanProcessor" />
151
        </entry>
152
        <entry key="eu.etaxonomy.cdm.model.description.DescriptionElementBase">
153
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.DescriptionElementBeanProcessor" />
154
        </entry>
155
        <entry key="eu.etaxonomy.cdm.model.description.StateData">
156
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.StateDataBeanProcessor" />
157
        </entry>
158
        <entry key="org.apache.lucene.document.Document">
159
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.LuceneDocumentBeanProcessor" />
111
        <entry key="org.hibernate.proxy.HibernateProxy">
112
          <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.HibernateProxyBeanProcessor" />
160 113
        </entry>
114
        <entry key="eu.etaxonomy.cdm.model.common.TermBase">
115
          <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TermBaseBeanProcessor">
116
             <property name="excludes">
117
               <set value-type="java.lang.String">
118
                   <value>partOf</value><!-- FIXME exclude partOf to avoid  lazy loading exceptions  -->
119
                   <value>kindOf</value><!-- FIXME exclude kindOf to avoid  lazy loading exceptions  -->
120
                   <value>infraGenericMarker</value><!-- FIXME leads to IllegalStateException if not excluded  -->
121
               </set>
122
            </property>
123
           </bean>
124
         </entry>
125
         <entry key="eu.etaxonomy.cdm.model.media.Media">
126
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.MediaBeanProcessor">
127
              <property name="replaceTitle" value="true" />
128
              <property name="replaceDescription" value="true" />
129
            </bean>
130
         </entry>
131
         <entry key="eu.etaxonomy.cdm.model.taxon.TaxonNode">
132
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNodeBeanProcessor" />
133
         </entry>
134
         <entry key="eu.etaxonomy.cdm.model.reference.Reference">
135
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.ReferenceBaseBeanProcessor"/>
136
         </entry>
137
         <entry key="eu.etaxonomy.cdm.model.name.TaxonName">
138
            <bean
139
              class="eu.etaxonomy.cdm.remote.json.processor.bean.TaxonNameBeanProcessor">
140
              <property name="skipTaggedName" value="true" />
141
            </bean>
142
         </entry>
143
         <entry key="eu.etaxonomy.cdm.model.name.TypeDesignationBase">
144
            <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TypeDesignationBaseBeanProcessor"/>
145
         </entry>
146
         <entry key="eu.etaxonomy.cdm.model.description.KeyStatement">
147
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.KeyStatementBeanProcessor" />
148
         </entry>
149
         <entry key="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase">
150
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.TeamOrPersonBaseBeanProcessor" />
151
         </entry>
152
         <entry key="eu.etaxonomy.cdm.model.description.DescriptionElementBase">
153
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.DescriptionElementBeanProcessor" />
154
         </entry>
155
         <entry key="eu.etaxonomy.cdm.model.description.StateData">
156
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.StateDataBeanProcessor" />
157
         </entry>
158
         <entry key="org.apache.lucene.document.Document">
159
              <bean class="eu.etaxonomy.cdm.remote.json.processor.bean.LuceneDocumentBeanProcessor" />
160
         </entry>
161 161
      </map>
162 162
    </property>
163 163
    <property name="jsonPropertyFilter">

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)