Revision 45455
Added by Alessia Bardi over 7 years ago
SyncAction.java | ||
---|---|---|
6 | 6 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardServerHandler; |
7 | 7 |
import eu.dnetlib.miscutils.functional.xml.ApplyXslt; |
8 | 8 |
import eu.dnetlib.oai.sync.OAIStoreSynchronizer; |
9 |
import eu.dnetlib.oai.utils.OAIParameterNames; |
|
9 | 10 |
import eu.dnetlib.rmi.common.ResultSet; |
10 |
import eu.dnetlib.rmi.provision.MDFInfo; |
|
11 | 11 |
import eu.dnetlib.utils.MetadataReference; |
12 | 12 |
import eu.dnetlib.utils.MetadataReferenceFactory; |
13 | 13 |
import org.apache.commons.logging.Log; |
14 | 14 |
import org.apache.commons.logging.LogFactory; |
15 |
import org.dom4j.io.SAXReader; |
|
16 | 15 |
import org.springframework.beans.factory.annotation.Autowired; |
17 | 16 |
import org.springframework.core.io.ClassPathResource; |
18 | 17 |
|
19 | 18 |
public class SyncAction extends AbstractOAIStoreAction { |
20 | 19 |
|
21 | 20 |
private static final Log log = LogFactory.getLog(SyncAction.class); // NOPMD by marko on 11/24/08 5:02 PM |
22 |
private final SAXReader saxReader = new SAXReader(); |
|
21 |
|
|
23 | 22 |
org.springframework.core.io.Resource dmfXsltResource = new ClassPathResource("/eu/dnetlib/oai/xslt/addDMFBlock.xslt"); |
24 | 23 |
@Autowired |
25 | 24 |
private OAIStoreSynchronizer synchronizer; |
... | ... | |
28 | 27 |
|
29 | 28 |
@Override |
30 | 29 |
public void execute(final BlackboardServerHandler handler, final BlackboardJob job) throws Exception { |
31 |
String epr = job.getParameters().get("oai_syncEpr");
|
|
32 |
String recordSource = job.getParameters().get("oai_recordSource");
|
|
33 |
boolean alwaysNewRecord = Boolean.valueOf(job.getParameters().get("oai_alwaysNewRecord"));
|
|
34 |
final String dbName = job.getParameters().get("oai_dbName");
|
|
30 |
String epr = job.getParameters().get(OAIParameterNames.OAI_SYNC_EPR);
|
|
31 |
String recordSource = job.getParameters().get(OAIParameterNames.OAI_SOURCE);
|
|
32 |
boolean alwaysNewRecord = Boolean.valueOf(job.getParameters().get(OAIParameterNames.OAI_ALWAYS_NEW_RECORD));
|
|
33 |
final String dbName = job.getParameters().get(OAIParameterNames.OAI_DB);
|
|
35 | 34 |
|
36 |
final String collectionName = job.getParameters().get("oai_collectionName");
|
|
35 |
final String collectionName = job.getParameters().get(OAIParameterNames.OAI_COLLECTON);
|
|
37 | 36 |
final MetadataReference mdRef = MetadataReferenceFactory.decode(collectionName, MDREF_SEPARATOR); |
38 | 37 |
|
39 | 38 |
final ResultSet<?> rs = ResultSet.fromJson(epr); |
Also available in: Unified diff
Included changes about the CQL translation as in most recent version of cnr-cql-utils of DNet40 + refactoring of OAI parameters