Revision 29605
Added by Claudio Atzori almost 10 years ago
OAIEnsureIndexesJobNode.java | ||
---|---|---|
17 | 17 |
|
18 | 18 |
private static final Log log = LogFactory.getLog(OAIEnsureIndexesJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM |
19 | 19 |
|
20 |
private String mdPrefix;
|
|
20 |
private String oaiStoreCollectionParam;
|
|
21 | 21 |
|
22 | 22 |
@Override |
23 | 23 |
protected String getXqueryForServiceId(final NodeToken token) { |
... | ... | |
27 | 27 |
@Override |
28 | 28 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) throws ResultSetException { |
29 | 29 |
job.setAction("ENSURE_INDEXES"); |
30 |
if (StringUtils.isNotBlank(mdPrefix)) { |
|
31 |
job.getParameters().put("ensure_mdPrefix", mdPrefix); |
|
30 |
|
|
31 |
final String collection = token.getEnv().getAttribute(getOaiStoreCollectionParam()); |
|
32 |
|
|
33 |
if (StringUtils.isNotBlank(collection)) { |
|
34 |
job.getParameters().put("collection", collection); |
|
32 | 35 |
} else { |
33 |
log.debug("mdPrefix not set");
|
|
36 |
log.debug("collection not set");
|
|
34 | 37 |
} |
35 | 38 |
} |
36 | 39 |
|
... | ... | |
39 | 42 |
return new InaccurateProgressProvider(); |
40 | 43 |
} |
41 | 44 |
|
42 |
public String getMdPrefix() {
|
|
43 |
return mdPrefix;
|
|
45 |
public String getOaiStoreCollectionParam() {
|
|
46 |
return oaiStoreCollectionParam;
|
|
44 | 47 |
} |
45 | 48 |
|
46 |
public void setMdPrefix(final String mdPrefix) {
|
|
47 |
this.mdPrefix = mdPrefix;
|
|
49 |
public void setOaiStoreCollectionParam(final String oaiStoreCollectionParam) {
|
|
50 |
this.oaiStoreCollectionParam = oaiStoreCollectionParam;
|
|
48 | 51 |
} |
49 | 52 |
|
50 | 53 |
} |
Also available in: Unified diff
collection aware OAI store job nodes