Package org.dspace.orcid.model.factory
Interface OrcidCommonObjectFactory
- All Known Implementing Classes:
OrcidCommonObjectFactoryImpl
public interface OrcidCommonObjectFactory
Interface for factory classes that creates common ORCID objects.
- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
Method Summary
Modifier and TypeMethodDescriptionOptional<org.orcid.jaxb.model.v3.release.common.Contributor>createContributor(Context context, MetadataValue metadataValue, org.orcid.jaxb.model.common.ContributorRole role) Creates an instance ofContributorfrom the given metadata value.Optional<org.orcid.jaxb.model.v3.release.common.Country>createCountry(Context context, MetadataValue metadataValue) Creates an instance ofCountryfrom the given metadata value.Optional<org.orcid.jaxb.model.v3.release.record.FundingContributor>createFundingContributor(Context context, MetadataValue metadataValue, org.orcid.jaxb.model.common.FundingContributorRole role) Creates an instance ofFundingContributorfrom the given metadata value.Optional<org.orcid.jaxb.model.v3.release.common.FuzzyDate>createFuzzyDate(MetadataValue metadataValue) Creates an instance ofFuzzyDateif the given metadata value represent a date with a supported format.Optional<org.orcid.jaxb.model.v3.release.common.Organization>createOrganization(Context context, Item orgUnit) Creates an instance ofOrganizationfrom the given orgUnit item.Optional<org.orcid.jaxb.model.v3.release.common.Url>Creates an instance ofUrlfrom the given item.
-
Method Details
-
createFuzzyDate
Optional<org.orcid.jaxb.model.v3.release.common.FuzzyDate> createFuzzyDate(MetadataValue metadataValue) Creates an instance ofFuzzyDateif the given metadata value represent a date with a supported format.- Parameters:
metadataValue- the metadata value- Returns:
- the FuzzyDate instance, if any
-
createOrganization
Optional<org.orcid.jaxb.model.v3.release.common.Organization> createOrganization(Context context, Item orgUnit) Creates an instance ofOrganizationfrom the given orgUnit item.- Parameters:
context- the DSpace contextorgUnit- the orgUnit item- Returns:
- the created Organization's instance, if any
-
createContributor
Optional<org.orcid.jaxb.model.v3.release.common.Contributor> createContributor(Context context, MetadataValue metadataValue, org.orcid.jaxb.model.common.ContributorRole role) Creates an instance ofContributorfrom the given metadata value.- Parameters:
context- the DSpace contextmetadataValue- the metadata valuerole- the contributor role- Returns:
- the created Contributor instance, if any
-
createFundingContributor
Optional<org.orcid.jaxb.model.v3.release.record.FundingContributor> createFundingContributor(Context context, MetadataValue metadataValue, org.orcid.jaxb.model.common.FundingContributorRole role) Creates an instance ofFundingContributorfrom the given metadata value.- Parameters:
context- the DSpace contextmetadataValue- the metadata valuerole- the contributor role- Returns:
- the created FundingContributor instance, if any
-
createUrl
Creates an instance ofUrlfrom the given item.- Parameters:
context- the DSpace contextitem- the item- Returns:
- the created Url instance, if any
-
createCountry
Optional<org.orcid.jaxb.model.v3.release.common.Country> createCountry(Context context, MetadataValue metadataValue) throws OrcidValidationException Creates an instance ofCountryfrom the given metadata value.- Parameters:
context- the DSpace contextmetadataValue- the metadata value- Returns:
- the created Country instance, if any
- Throws:
OrcidValidationException- if the given metadata value is not a valid ISO 3611 country
-