1
|
package eu.dnetlib.parthenos.registry;
|
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 RegistryClientFactory {
|
19
|
|
20
|
private static final Log log = LogFactory.getLog(RegistryClientFactory.class);
|
21
|
|
22
|
@Value("${gcube.registry.uri.base.default}")
|
23
|
private String defaultBaseURI;
|
24
|
|
25
|
@Autowired
|
26
|
private SaxonHelper saxonHelper;
|
27
|
@Autowired
|
28
|
private GCubeResourceRegistrator gCubeResourceRegistrator;
|
29
|
|
30
|
public RegistryClient getRegistryClient() throws ParthenosPublisherException {
|
31
|
log.debug("Creating RegistryClient");
|
32
|
return new RegistryClient(getSaxonHelper(), defaultBaseURI, getgCubeResourceRegistrator());
|
33
|
}
|
34
|
|
35
|
public SaxonHelper getSaxonHelper() {
|
36
|
return saxonHelper;
|
37
|
}
|
38
|
|
39
|
public void setSaxonHelper(final SaxonHelper saxonHelper) {
|
40
|
this.saxonHelper = saxonHelper;
|
41
|
}
|
42
|
|
43
|
public String getDefaultBaseURI() {
|
44
|
return defaultBaseURI;
|
45
|
}
|
46
|
|
47
|
public void setDefaultBaseURI(final String defaultBaseURI) {
|
48
|
this.defaultBaseURI = defaultBaseURI;
|
49
|
}
|
50
|
|
51
|
public GCubeResourceRegistrator getgCubeResourceRegistrator() {
|
52
|
return gCubeResourceRegistrator;
|
53
|
}
|
54
|
|
55
|
public void setgCubeResourceRegistrator(final GCubeResourceRegistrator gCubeResourceRegistrator) {
|
56
|
this.gCubeResourceRegistrator = gCubeResourceRegistrator;
|
57
|
}
|
58
|
}
|