Revision 55423
Added by Andreas Czerniak almost 4 years ago
modules/uoa-validator-service/trunk/src/main/java/eu/dnetlib/validator/service/impl/ValidatorManagerImpl.java | ||
---|---|---|
11 | 11 |
import eu.dnetlib.validator.commons.dao.jobs.JobsDAO; |
12 | 12 |
import eu.dnetlib.validator.commons.dao.rules.RulesDAO; |
13 | 13 |
import eu.dnetlib.validator.commons.dao.rules.RulesetsDAO; |
14 |
import eu.dnetlib.validator.commons.email.Emailer; |
|
14 | 15 |
import eu.dnetlib.validator.engine.Validator; |
15 | 16 |
import eu.dnetlib.validator.engine.ValidatorException; |
16 | 17 |
import eu.dnetlib.validator.engine.data.Rule; |
... | ... | |
31 | 32 |
@Transactional |
32 | 33 |
public class ValidatorManagerImpl implements ValidatorManager { |
33 | 34 |
|
34 |
private Validator validator; |
|
35 |
private Emailer emailer; |
|
36 |
private Validator validator; |
|
35 | 37 |
private JobsDAO jobsDao; |
36 | 38 |
private RulesetsDAO rulesetsDao; |
37 | 39 |
private RulesDAO rulesDao; |
... | ... | |
227 | 229 |
} |
228 | 230 |
} |
229 | 231 |
|
230 |
if ( |
|
232 |
if ( job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire4.0$") ) { |
|
233 |
logger.debug("Chosen set: OpenAIRE For Thematic + Institutional Repositories"); |
|
234 |
logger.debug("Setting METADATA_PREFIX to: oai_openaire"); |
|
235 |
job.setMetadataPrefix("oai_openaire"); |
|
236 |
} else if ( |
|
231 | 237 |
// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0") || |
232 | 238 |
job.getDesiredCompatibilityLevel().toLowerCase().matches("^openaire\\d.\\d$") || |
233 | 239 |
// job.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire3.0") || |
... | ... | |
380 | 386 |
logger.debug("Total content jobs: " + contentJobs); |
381 | 387 |
// logger.debug("Selected content rules number: " + job.getSelectedContentRules().size()); |
382 | 388 |
jobContent = new Job(jobIdStored, 4, rulesContent, props); |
383 |
validator.submitJobForCris(jobContent, entityChosenRulesMap, entityChosenRulesMapReferential, listenerContent, compTestListener); |
|
384 |
} else { |
|
389 |
// acz validator.submitJobForCris(jobContent, entityChosenRulesMap, entityChosenRulesMapReferential, listenerContent, compTestListener); |
|
390 |
// send cris validation to Guideline team member. Could be moved into MemoryThreadValidator.submitJobForCris method |
|
391 |
List<String> recipientsMailAddr = new ArrayList<String>(); |
|
392 |
recipientsMailAddr.add("andreas.czerniak@uni-bielefeld.de"); |
|
393 |
emailer.sendMail( recipientsMailAddr, "CrisJob submitting", "baseUrl: " + job.getBaseUrl() , false, recipientsMailAddr); |
|
394 |
} else { |
|
385 | 395 |
|
386 | 396 |
logger.debug("Selected content rules number: " + job.getSelectedContentRules().size()); |
387 | 397 |
for (Integer ruleId : job.getSelectedContentRules()){ |
Also available in: Unified diff
add metadataPrefix oai_openaire for compatibility of Lit.v4 guidelines