Project

General

Profile

Download (1.21 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 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.io.common;
11

    
12
import java.io.ByteArrayOutputStream;
13

    
14
import org.apache.log4j.Logger;
15

    
16
import eu.etaxonomy.cdm.io.common.mapping.out.IExportTransformer;
17
import eu.etaxonomy.cdm.model.common.CdmBase;
18

    
19
/**
20
 * @author a.mueller
21
 * @created 01.07.2008
22
 * @version 1.0
23
 */
24
public abstract class CdmExportBase<CONFIG extends IExportConfigurator<STATE, TRANSFORM>, STATE extends ExportStateBase, TRANSFORM extends IExportTransformer> extends CdmIoBase<STATE> implements ICdmExport<CONFIG, STATE>{
25
	private static Logger logger = Logger.getLogger(CdmExportBase.class);
26

    
27
    protected ByteArrayOutputStream exportStream;
28

    
29
	public Object getDbId(CdmBase cdmBase, STATE state){
30
		logger.warn("Not yet implemented for export base class");
31
		return null;
32
	}
33

    
34
	@Override
35
	public  byte[] getByteArray() {
36
	    if (exportStream != null){
37
	        return exportStream.toByteArray();
38
	    }else{
39
	        return null;
40
	    }
41
	}
42

    
43
}
(9-9/59)