/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.dnetlib.espas.util;

import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import org.geotoolkit.gml.xml.GMLMarshallerPool;
import org.geotoolkit.xml.MarshallerPool;

/**
 *
 * @author gathanas
 */
public class GMLTransformationHandler {
    protected static final String SUPPORT_GML_SPEC = "http://www.opengis.net/gml/3.2";
    protected MarshallerPool pool;

    public GMLTransformationHandler() {        
        pool = GMLMarshallerPool.getInstance();
       
    }

    ///////////////////////////////////////////////////////////
    //     Internal methods performing housekeeping operations
    protected Unmarshaller acquireUnMarshaller() throws JAXBException {
        return pool.acquireUnmarshaller();
    }

    protected void releaseUnMarshaller(Unmarshaller unmarshaller) {
        pool.release(unmarshaller);
    }
    
    protected Marshaller acquireMarshaller() throws JAXBException{
        return pool.acquireMarshaller();
    }
    
    protected void releaseMarshaller(Marshaller marshaller){
        pool.release(marshaller);
    }
}


class GMLTransformationException extends Exception {

    public GMLTransformationException(String message) {
        super(message);
    }
}
