Class MultipleMetadataContributor<T>

  • All Implemented Interfaces:
    MetadataContributor<T>

    public class MultipleMetadataContributor<T>
    extends Object
    implements MetadataContributor<T>
    This Contributor is helpful to avoid the limit of the Live Import Framework. In Live Import, one dc schema/element/qualifier could be associate with one and only one MetadataContributor, because the map they're saved in use dc entity as key. In fact, in this implementation we use the MetadataFieldConfig present in this MultipleMetadataContributor contributor, but the data (values of the dc metadatum) will be loaded using any of the contributor defined in the List metadatumContributors, by iterating over them.
    Author:
    Pasquale Cavallo (pasquale.cavallo at 4science dot it)
    See Also:
    org.dspace.importer.external.metadatamapping.AbstractMetadataFieldMapping
    • Constructor Detail

      • MultipleMetadataContributor

        public MultipleMetadataContributor()
        Empty constructor
    • Method Detail

      • contributeMetadata

        public Collection<MetadatumDTO> contributeMetadata​(T t)
        a separate Metadatum object is created for each index of Metadatum returned from the calls to MetadatumContributor.contributeMetadata(t) for each MetadatumContributor in the metadatumContributors list. All of them have as dc schema/element/qualifier the values defined in MetadataFieldConfig.
        Specified by:
        contributeMetadata in interface MetadataContributor<T>
        Parameters:
        t - the object we are trying to translate
        Returns:
        a collection of metadata got from each MetadataContributor
      • getField

        public MetadataFieldConfig getField()
        Return the MetadataFieldConfig used while retrieving MetadatumDTO
        Returns:
        MetadataFieldConfig
      • setField

        public void setField​(MetadataFieldConfig field)
        Setting the MetadataFieldConfig
        Parameters:
        field - MetadataFieldConfig used while retrieving MetadatumDTO
      • getMetadatumContributors

        public List<MetadataContributor> getMetadatumContributors()
        Return the List of MetadataContributor objects set to this class
        Returns:
        metadatumContributors, list of MetadataContributor
      • setMetadatumContributors

        public void setMetadatumContributors​(List<MetadataContributor> metadatumContributors)
        Set the List of MetadataContributor objects set to this class
        Parameters:
        metadatumContributors - A list of MetadatumContributor classes