Class OrcidValidatorImpl
- java.lang.Object
-
- org.dspace.orcid.model.validator.impl.OrcidValidatorImpl
-
- All Implemented Interfaces:
OrcidValidator
public class OrcidValidatorImpl extends Object implements OrcidValidator
Implementation ofOrcidValidator.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Constructor Summary
Constructors Constructor Description OrcidValidatorImpl(ConfigurationService configurationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OrcidValidationError>validate(Object object)Validate the given orcid object and returns the validation errors, if any.List<OrcidValidationError>validateFunding(org.orcid.jaxb.model.v3.release.record.Funding funding)A funding is valid if has title, a valid funder organization and at least one external id.List<OrcidValidationError>validateWork(org.orcid.jaxb.model.v3.release.record.Work work)A work is valid if has title, type, a valid publication date and at least one external id.
-
-
-
Constructor Detail
-
OrcidValidatorImpl
public OrcidValidatorImpl(ConfigurationService configurationService)
-
-
Method Detail
-
validate
public List<OrcidValidationError> validate(Object object)
Description copied from interface:OrcidValidatorValidate the given orcid object and returns the validation errors, if any.- Specified by:
validatein interfaceOrcidValidator- Parameters:
object- the ORCID object to validate- Returns:
- the validation errors, if any
-
validateWork
public List<OrcidValidationError> validateWork(org.orcid.jaxb.model.v3.release.record.Work work)
A work is valid if has title, type, a valid publication date and at least one external id.- Specified by:
validateWorkin interfaceOrcidValidator- Parameters:
work- the work to validate- Returns:
- the validation errors, if any
-
validateFunding
public List<OrcidValidationError> validateFunding(org.orcid.jaxb.model.v3.release.record.Funding funding)
A funding is valid if has title, a valid funder organization and at least one external id. If it has an amount, the amount currency is required.- Specified by:
validateFundingin interfaceOrcidValidator- Parameters:
funding- the funding to validate- Returns:
- the validation errors, if any
-
-