Class OrcidSimpleValueObjectFactory
- java.lang.Object
-
- org.dspace.orcid.model.factory.impl.AbstractOrcidProfileSectionFactory
-
- org.dspace.orcid.model.factory.impl.OrcidSimpleValueObjectFactory
-
- All Implemented Interfaces:
OrcidProfileSectionFactory
- Direct Known Subclasses:
OrcidPersonExternalIdentifierFactory
public class OrcidSimpleValueObjectFactory extends AbstractOrcidProfileSectionFactory
Implementation ofOrcidProfileSectionFactorythat creates ORCID objects with a single value.- Author:
- Luca Giamminonni (luca.giamminonni at 4science.it)
-
-
Field Summary
-
Fields inherited from class org.dspace.orcid.model.factory.impl.AbstractOrcidProfileSectionFactory
itemService, metadataSignatureGenerator, orcidCommonObjectFactory, preference, sectionType
-
-
Constructor Summary
Constructors Constructor Description OrcidSimpleValueObjectFactory(OrcidProfileSectionType sectionType, OrcidProfileSyncPreference preference)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectcreate(Context context, List<MetadataValue> metadataValues)Creates an instance of an ORCID object starting from the metadata valuesprotected Objectcreate(Context context, MetadataValue metadataValue)Create an instance of ORCID profile section based on the configured profile section type, taking the value from the given metadataValue.StringgetDescription(Context context, Item item, String signature)Returns a description of the item's metadata values related to the given signature.List<String>getMetadataFields()Returns all the metadata fields involved in the profile section configuration.List<String>getMetadataSignatures(Context context, Item item)Given the input item's metadata values generate a metadata signature for each metadata field groups handled by this factory or for each metadata fields if the factory is configured with single metadata fields.List<OrcidProfileSectionType>getSupportedTypes()voidsetMetadataFields(String metadataFields)-
Methods inherited from class org.dspace.orcid.model.factory.impl.AbstractOrcidProfileSectionFactory
getMetadataValues, getProfileSectionType, getSynchronizationPreference
-
-
-
-
Constructor Detail
-
OrcidSimpleValueObjectFactory
public OrcidSimpleValueObjectFactory(OrcidProfileSectionType sectionType, OrcidProfileSyncPreference preference)
-
-
Method Detail
-
getSupportedTypes
public List<OrcidProfileSectionType> getSupportedTypes()
- Specified by:
getSupportedTypesin classAbstractOrcidProfileSectionFactory
-
create
public Object create(Context context, List<MetadataValue> metadataValues)
Description copied from interface:OrcidProfileSectionFactoryCreates an instance of an ORCID object starting from the metadata values- Parameters:
context- the DSpace ContextmetadataValues- the metadata values- Returns:
- the ORCID object
-
getMetadataSignatures
public List<String> getMetadataSignatures(Context context, Item item)
Description copied from interface:OrcidProfileSectionFactoryGiven the input item's metadata values generate a metadata signature for each metadata field groups handled by this factory or for each metadata fields if the factory is configured with single metadata fields.- Parameters:
context- the DSpace contextitem- the item- Returns:
- the metadata signatures
-
getDescription
public String getDescription(Context context, Item item, String signature)
Description copied from interface:OrcidProfileSectionFactoryReturns a description of the item's metadata values related to the given signature.- Parameters:
context- the DSpace contextitem- the itemsignature- the metadata signature- Returns:
- the metadata values description
-
create
protected Object create(Context context, MetadataValue metadataValue)
Create an instance of ORCID profile section based on the configured profile section type, taking the value from the given metadataValue.
-
setMetadataFields
public void setMetadataFields(String metadataFields)
-
getMetadataFields
public List<String> getMetadataFields()
Description copied from interface:OrcidProfileSectionFactoryReturns all the metadata fields involved in the profile section configuration.- Returns:
- the metadataFields
-
-