1
|
package eu.dnetlib.parthenos.catalogue;
|
2
|
|
3
|
import eu.dnetlib.parthenos.publisher.ParthenosPublisherException;
|
4
|
import eu.dnetlib.parthenos.publisher.SaxonHelper;
|
5
|
import org.apache.commons.logging.Log;
|
6
|
import org.apache.commons.logging.LogFactory;
|
7
|
import org.springframework.beans.factory.annotation.Autowired;
|
8
|
import org.springframework.beans.factory.annotation.Value;
|
9
|
import org.springframework.stereotype.Component;
|
10
|
|
11
|
/**
|
12
|
* Created by Alessia Bardi on 26/09/2017.
|
13
|
*
|
14
|
* @author Alessia Bardi
|
15
|
*/
|
16
|
@Component
|
17
|
@Deprecated
|
18
|
public class CatalogueClientFactory {
|
19
|
|
20
|
private static final Log log = LogFactory.getLog(CatalogueClientFactory.class);
|
21
|
|
22
|
@Value("${gcube.catalogue.baseurl}")
|
23
|
private String baseURL;
|
24
|
@Value("${gcube.registry.application.token}")
|
25
|
private String gcubeToken;
|
26
|
@Autowired
|
27
|
private SaxonHelper saxonHelper;
|
28
|
@Autowired
|
29
|
private CatalogueRegistrator catalogueRegistrator;
|
30
|
|
31
|
|
32
|
|
33
|
public CatalogueClient getCatalogueClient() throws ParthenosPublisherException {
|
34
|
log.debug("Creating CatalogueClient");
|
35
|
return new CatalogueClient(saxonHelper, catalogueRegistrator);
|
36
|
}
|
37
|
|
38
|
public String getBaseURL() {
|
39
|
return baseURL;
|
40
|
}
|
41
|
|
42
|
public void setBaseURL(final String baseURL) {
|
43
|
this.baseURL = baseURL;
|
44
|
}
|
45
|
|
46
|
public String getGcubeToken() {
|
47
|
return gcubeToken;
|
48
|
}
|
49
|
|
50
|
public void setGcubeToken(final String gcubeToken) {
|
51
|
this.gcubeToken = gcubeToken;
|
52
|
}
|
53
|
|
54
|
public SaxonHelper getSaxonHelper() {
|
55
|
return saxonHelper;
|
56
|
}
|
57
|
|
58
|
public void setSaxonHelper(final SaxonHelper saxonHelper) {
|
59
|
this.saxonHelper = saxonHelper;
|
60
|
}
|
61
|
}
|