Project

General

Profile

Download (1.83 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2014 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
package eu.etaxonomy.cdm.ext.occurrence.gbif;
10

    
11
import java.net.URI;
12

    
13
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
14
import eu.etaxonomy.cdm.ext.occurrence.DataResponse;
15
import eu.etaxonomy.cdm.model.name.TaxonName;
16

    
17
/**
18
 * Wrapper class which holds a {@link DerivedUnitFacade} which was parsed from a GBIF JSON response.
19
 * Additionally it holds the {@link URI} to query the GBIF data set web service which
20
 * holds the endpoint URL of the original record and the {@link GbifDataSetProtocol}
21
 * @author pplitzner
22
 \* @since 27.05.2014
23
 *
24
 */
25
public class GbifResponse extends DataResponse {
26

    
27

    
28

    
29
    private final GbifDataSetProtocol dataSetProtocol;
30

    
31
    private final TaxonName scientificName;
32
    /**
33
     * @param derivedUnitFacade
34
     * @param dataSetUrl
35
     */
36
    public GbifResponse(DerivedUnitFacade derivedUnitFacade, URI dataSetUrl, GbifDataSetProtocol dataSetProtocol, String [] tripleID, TaxonName scientificName) {
37
        super(derivedUnitFacade,dataSetUrl, tripleID);
38
       this.dataSetProtocol = dataSetProtocol;
39

    
40
        this.scientificName = scientificName;
41

    
42
    }
43

    
44
    public DerivedUnitFacade getDerivedUnitFacade() {
45
        return (DerivedUnitFacade)dataHolder;
46
    }
47

    
48
    public URI getDataSetUri() {
49
        return dataSetUri;
50
    }
51

    
52
    /**
53
     * @return the dataSetProtocol
54
     */
55
    public GbifDataSetProtocol getDataSetProtocol() {
56
        return dataSetProtocol;
57
    }
58

    
59
    public String[] getTripleID(){
60
        return tripleID;
61
    }
62

    
63
    /**
64
     * @return the scientificName
65
     */
66
    public TaxonName getScientificName() {
67
        return scientificName;
68
    }
69

    
70
}
(6-6/6)