Project

General

Profile

« Previous | Next » 

Revision 5402f2a6

Added by Andreas Müller about 2 years ago

cleanup

View differences:

cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/json/processor/value/URIJSONValueProcessor.java
1 1
/**
2 2
 * Copyright (C) 2009 EDIT European Distributed Institute of Taxonomy
3 3
 * http://www.e-taxonomy.eu
4
 * 
4
 *
5 5
 * The contents of this file are subject to the Mozilla Public License Version
6 6
 * 1.1 See LICENSE.TXT at the top of this package for the full license terms.
7 7
 */
8

  
9 8
package eu.etaxonomy.cdm.remote.json.processor.value;
10 9

  
11
import eu.etaxonomy.cdm.common.URI;
10
import org.apache.log4j.Logger;
12 11

  
12
import eu.etaxonomy.cdm.common.URI;
13 13
import net.sf.json.JsonConfig;
14 14
import net.sf.json.processors.JsonValueProcessor;
15 15

  
16
import org.apache.log4j.Logger;
17

  
18 16
public class URIJSONValueProcessor implements JsonValueProcessor {
19
	
17

  
20 18
	private static final Logger logger = Logger.getLogger(URIJSONValueProcessor.class);
21 19

  
22
	public Object processArrayValue(Object obj, JsonConfig jsonConfig) {
20
	@Override
21
    public Object processArrayValue(Object obj, JsonConfig jsonConfig) {
23 22
		logger.debug("Processing URL");
24 23
		if(obj == null){
25 24
			return "";
......
28 27
		return uri.toString();
29 28
	}
30 29

  
31
	public Object processObjectValue(String key, Object obj,
30
	@Override
31
    public Object processObjectValue(String key, Object obj,
32 32
			JsonConfig jsonConfig) {
33 33
		logger.debug("Processing URL");
34 34
		if(obj == null){
......
36 36
		}
37 37
		URI uri = (URI) obj;
38 38
		return uri.toString();
39
	};
40

  
41
}
39
	}
40
}

Also available in: Unified diff