Class WosAttribute2ValueContributor
java.lang.Object
org.dspace.importer.external.metadatamapping.contributor.WosAttribute2ValueContributor
- All Implemented Interfaces:
MetadataContributor<org.jdom2.Element>
public class WosAttribute2ValueContributor
extends Object
implements MetadataContributor<org.jdom2.Element>
Web Of Science specific implementation of
MetadataContributor
This contributor checks for each node returned for the given path if the node contains "this.attribute"
and then checks if the attribute value is one of the values configured
in the "this.attributeValue2metadata" map, if the value of the current known is taken.
If "this.firstChild" is true, it takes the value of the child of the known.
The mapping and configuration of this class can be found in the following wos-integration.xml file.- Author:
- Boychuk Mykhaylo (boychuk.mykhaylo at 4Science dot it)
-
Constructor Summary
ConstructorsConstructorDescriptionWosAttribute2ValueContributor(String query, Map<String, String> prefixToNamespaceMapping, Map<String, MetadataFieldConfig> attributeValue2metadata) -
Method Summary
Modifier and TypeMethodDescriptioncontributeMetadata(org.jdom2.Element t) Implementations have the responsibility to process/map their own type of metadata based on a given record and return a collection of the generalised MetadatumDTO objectsMetadataFieldMapping<org.jdom2.Element,MetadataContributor<org.jdom2.Element>> getQuery()booleanvoidsetAttribute(String attribute) voidsetAttributeValue2metadata(Map<String, MetadataFieldConfig> attributeValue2metadata) voidsetChildName(String childName) voidsetFirstChild(boolean firstChild) voidsetMetadataFieldMapping(MetadataFieldMapping<org.jdom2.Element, MetadataContributor<org.jdom2.Element>> metadataFieldMapping) Set the metadataFieldMappingvoidsetPrefixToNamespaceMapping(Map<String, String> prefixToNamespaceMapping) void
-
Constructor Details
-
WosAttribute2ValueContributor
public WosAttribute2ValueContributor() -
WosAttribute2ValueContributor
-
-
Method Details
-
contributeMetadata
Description copied from interface:MetadataContributorImplementations have the responsibility to process/map their own type of metadata based on a given record and return a collection of the generalised MetadatumDTO objects- Specified by:
contributeMetadatain interfaceMetadataContributor<org.jdom2.Element>- Parameters:
t- The recordType object to retrieve metadata from- Returns:
- A collection of MetadatumDTO objects, retrieve from the recordtype
-
getMetadataFieldMapping
public MetadataFieldMapping<org.jdom2.Element,MetadataContributor<org.jdom2.Element>> getMetadataFieldMapping() -
setMetadataFieldMapping
public void setMetadataFieldMapping(MetadataFieldMapping<org.jdom2.Element, MetadataContributor<org.jdom2.Element>> metadataFieldMapping) Description copied from interface:MetadataContributorSet the metadataFieldMapping- Specified by:
setMetadataFieldMappingin interfaceMetadataContributor<org.jdom2.Element>- Parameters:
metadataFieldMapping- the MetadataFieldMapping object to set to the MetadataContributor
-
setPrefixToNamespaceMapping
-
getPrefixToNamespaceMapping
-
getAttribute
-
setAttribute
-
getAttributeValue2metadata
-
setAttributeValue2metadata
-
getQuery
-
setQuery
-
isFirstChild
public boolean isFirstChild() -
setFirstChild
public void setFirstChild(boolean firstChild) -
getChildName
-
setChildName
-