Project

General

Profile

Download (1.38 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2009 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9

    
10
package eu.etaxonomy.cdm.remote.json.processor.bean;
11

    
12
import java.util.Arrays;
13
import java.util.List;
14

    
15
import org.apache.log4j.Logger;
16

    
17
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
18
import net.sf.json.JSONObject;
19
import net.sf.json.JsonConfig;
20

    
21
/**
22
 * @author a.kohlbecker
23
 *
24
 */
25
public class TaxonBaseBeanProcessor extends AbstractCdmBeanProcessor<TaxonBase> {
26

    
27
	public static final Logger logger = Logger.getLogger(TaxonBaseBeanProcessor.class);
28

    
29
   private boolean skipTaggedTitle = false;
30

    
31
    /**
32
     * @return the skipTaggedName
33
     */
34
    public boolean isSkipTaggedTitle() {
35
        return skipTaggedTitle;
36
    }
37

    
38
    /**
39
     * @param skipTaggedName the skipTaggedName to set
40
     */
41
    public void setSkipTaggedTitle(boolean skipTaggedTitle) {
42
        this.skipTaggedTitle = skipTaggedTitle;
43
    }
44

    
45
	@Override
46
	public List<String> getIgnorePropNames() {
47
		return Arrays.asList(new String[]{
48
		});
49
	}
50

    
51
	@Override
52
	public JSONObject processBeanSecondStep(TaxonBase bean, JSONObject json, JsonConfig jsonConfig) {
53
	    if(!skipTaggedTitle) {
54
	        json.element("taggedTitle", bean.getTaggedTitle());
55
	    }
56
		return json;
57
	}
58

    
59
}
(16-16/25)