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 eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
|
12
|
import eu.etaxonomy.cdm.common.URI;
|
13
|
import eu.etaxonomy.cdm.ext.occurrence.DataResponse;
|
14
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
15
|
|
16
|
/**
|
17
|
* Wrapper class which holds a {@link DerivedUnitFacade} which was parsed from a GBIF JSON response.
|
18
|
* Additionally it holds the {@link URI} to query the GBIF data set web service which
|
19
|
* holds the endpoint URL of the original record and the {@link GbifDataSetProtocol}
|
20
|
* @author pplitzner
|
21
|
* @since 27.05.2014
|
22
|
*/
|
23
|
public class GbifResponse extends DataResponse {
|
24
|
|
25
|
private final GbifDataSetProtocol dataSetProtocol;
|
26
|
|
27
|
private final TaxonName scientificName;
|
28
|
|
29
|
/**
|
30
|
* @param derivedUnitFacade
|
31
|
* @param dataSetUrl
|
32
|
*/
|
33
|
public GbifResponse(DerivedUnitFacade derivedUnitFacade, URI dataSetUrl, GbifDataSetProtocol dataSetProtocol, String [] tripleID, TaxonName scientificName) {
|
34
|
super(derivedUnitFacade,dataSetUrl, tripleID);
|
35
|
this.dataSetProtocol = dataSetProtocol;
|
36
|
this.scientificName = scientificName;
|
37
|
}
|
38
|
|
39
|
public DerivedUnitFacade getDerivedUnitFacade() {
|
40
|
return (DerivedUnitFacade)dataHolder;
|
41
|
}
|
42
|
|
43
|
public URI getDataSetUri() {
|
44
|
return dataSetUri;
|
45
|
}
|
46
|
|
47
|
public GbifDataSetProtocol getDataSetProtocol() {
|
48
|
return dataSetProtocol;
|
49
|
}
|
50
|
|
51
|
public String[] getTripleID(){
|
52
|
return tripleID;
|
53
|
}
|
54
|
|
55
|
public TaxonName getScientificName() {
|
56
|
return scientificName;
|
57
|
}
|
58
|
}
|