Project

General

Profile

1
/*
2
 * To change this template, choose Tools | Templates
3
 * and open the template in the editor.
4
 */
5
package eu.dnetlib.espas.util;
6

    
7
import java.util.Collection;
8
import javax.xml.bind.JAXBException;
9
import javax.xml.bind.Marshaller;
10
import javax.xml.bind.Unmarshaller;
11
import org.geotoolkit.gml.xml.v321.AbstractGMLType;
12
import org.geotoolkit.internal.jaxb.RegisterableAdapter;
13
import org.geotoolkit.internal.jaxb.RegisterableTypes;
14
import org.geotoolkit.internal.jaxb.gco.GO_Real;
15
import org.geotoolkit.referencing.crs.DefaultVerticalCRS;
16

    
17
/**
18
 *
19
 * @author gathanas
20
 */
21
public class JAXBContextTypeLoader implements RegisterableTypes, RegisterableAdapter{ 
22

    
23
    @Override
24
    public void getTypes(Collection<Class<?>> addTo) {
25
        addTo.add(AbstractGMLType.class);
26
        addTo.add(DefaultVerticalCRS.class);
27
    }
28

    
29
    @Override
30
    public void register(Marshaller marshaller) throws JAXBException {
31
        marshaller.setAdapter(GO_Real.class, new GO_Real());
32
    }
33

    
34
    @Override
35
    public void register(Unmarshaller unmarshaller) throws JAXBException {
36
        GO_Real adapter = new GO_Real();
37
        unmarshaller.setAdapter(GO_Real.class, adapter);
38
    }
39
    
40
}
(6-6/9)