returning fair guidelines as such

This commit is contained in:
Antonis Lempesis 2021-04-16 08:16:09 +00:00
parent a8143fe775
commit 25ff488405
2 changed files with 3 additions and 0 deletions

View File

@ -32,6 +32,7 @@ public class Constants{
public static final String VALIDATION_MODE_LITERATURE = "literature"; public static final String VALIDATION_MODE_LITERATURE = "literature";
public static final String VALIDATION_MODE_DATA = "data"; public static final String VALIDATION_MODE_DATA = "data";
public static final String VALIDATION_MODE_CRIS = "cris"; public static final String VALIDATION_MODE_CRIS = "cris";
public static final String VALIDATION_MODE_FAIR = "fair";
public static final String VALIDATION_JOB_TYPE_COMPATIBILITY_TEST = "Compatibility Test"; public static final String VALIDATION_JOB_TYPE_COMPATIBILITY_TEST = "Compatibility Test";
public static final String VALIDATION_JOB_TYPE_REGISTRATION_REQUEST = "Registration Request"; public static final String VALIDATION_JOB_TYPE_REGISTRATION_REQUEST = "Registration Request";

View File

@ -79,6 +79,8 @@ public class ValidatorServiceImpl implements ValidatorService {
key = Constants.VALIDATION_MODE_LITERATURE; key = Constants.VALIDATION_MODE_LITERATURE;
else if (ruleSet.getGuidelinesAcronym().matches("^openaire[1-9].0_cris$")) else if (ruleSet.getGuidelinesAcronym().matches("^openaire[1-9].0_cris$"))
key = Constants.VALIDATION_MODE_CRIS; key = Constants.VALIDATION_MODE_CRIS;
else if (ruleSet.getGuidelinesAcronym().matches(".*fair$"))
key = Constants.VALIDATION_MODE_FAIR;
if (rulesetMap.containsKey(key)) if (rulesetMap.containsKey(key))
rulesetMap.get(key).add(ruleSet); rulesetMap.get(key).add(ruleSet);