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.model.name.TaxonNameBase;
|
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
|
* @date 27.05.2014
|
22
|
*
|
23
|
*/
|
24
|
public class GbifResponse {
|
25
|
|
26
|
private final DerivedUnitFacade derivedUnitFacade;
|
27
|
private final URI dataSetUri;
|
28
|
private final GbifDataSetProtocol dataSetProtocol;
|
29
|
private final String[] tripleID;
|
30
|
private final TaxonNameBase scientificName;
|
31
|
/**
|
32
|
* @param derivedUnitFacade
|
33
|
* @param dataSetUrl
|
34
|
*/
|
35
|
public GbifResponse(DerivedUnitFacade derivedUnitFacade, URI dataSetUrl, GbifDataSetProtocol dataSetProtocol, String [] tripleID, TaxonNameBase scientificName) {
|
36
|
super();
|
37
|
this.derivedUnitFacade = derivedUnitFacade;
|
38
|
this.dataSetUri = dataSetUrl;
|
39
|
this.dataSetProtocol = dataSetProtocol;
|
40
|
this.tripleID = tripleID;
|
41
|
this.scientificName = scientificName;
|
42
|
|
43
|
}
|
44
|
|
45
|
public DerivedUnitFacade getDerivedUnitFacade() {
|
46
|
return derivedUnitFacade;
|
47
|
}
|
48
|
|
49
|
public URI getDataSetUri() {
|
50
|
return dataSetUri;
|
51
|
}
|
52
|
|
53
|
/**
|
54
|
* @return the dataSetProtocol
|
55
|
*/
|
56
|
public GbifDataSetProtocol getDataSetProtocol() {
|
57
|
return dataSetProtocol;
|
58
|
}
|
59
|
|
60
|
public String[] getTripleID(){
|
61
|
return tripleID;
|
62
|
}
|
63
|
|
64
|
/**
|
65
|
* @return the scientificName
|
66
|
*/
|
67
|
public TaxonNameBase getScientificName() {
|
68
|
return scientificName;
|
69
|
}
|
70
|
|
71
|
}
|