Class SplitMetadataContributor<T>
java.lang.Object
org.dspace.importer.external.metadatamapping.contributor.SplitMetadataContributor<T>
- All Implemented Interfaces:
MetadataContributor<T>
Wrapper class used to split another MetadataContributor's output into distinct values.
The split is performed by matching a regular expression against the wrapped MetadataContributor's output.
- Author:
- Philipp Rumpf (philipp.rumpf@uni-bamberg.de)
-
Constructor Summary
ConstructorsConstructorDescriptionSplitMetadataContributor(MetadataContributor<T> innerContributor, String regex) -
Method Summary
Modifier and TypeMethodDescriptionEach metadatum returned by the wrapped MetadataContributor is split into one or more metadata values based on the provided regular expression.voidSet the metadataFieldMapping
-
Constructor Details
-
SplitMetadataContributor
- Parameters:
innerContributor- The MetadataContributor whose output is splitregex- A regular expression matching the separator between different values
-
-
Method Details
-
setMetadataFieldMapping
Description copied from interface:MetadataContributorSet the metadataFieldMapping- Specified by:
setMetadataFieldMappingin interfaceMetadataContributor<T>- Parameters:
rt- the MetadataFieldMapping object to set to the MetadataContributor
-
contributeMetadata
Each metadatum returned by the wrapped MetadataContributor is split into one or more metadata values based on the provided regular expression.- Specified by:
contributeMetadatain interfaceMetadataContributor<T>- Parameters:
t- The recordType object to retrieve metadata from- Returns:
- The collection of processed metadata values
-