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 ofMetadataContributorThis 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
Constructors Constructor Description WosAttribute2ValueContributor()WosAttribute2ValueContributor(String query, Map<String,String> prefixToNamespaceMapping, Map<String,MetadataFieldConfig> attributeValue2metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<MetadatumDTO>contributeMetadata(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 objectsStringgetAttribute()Map<String,MetadataFieldConfig>getAttributeValue2metadata()StringgetChildName()MetadataFieldMapping<org.jdom2.Element,MetadataContributor<org.jdom2.Element>>getMetadataFieldMapping()Map<String,String>getPrefixToNamespaceMapping()StringgetQuery()booleanisFirstChild()voidsetAttribute(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)voidsetQuery(String query)
-
-
-
Method Detail
-
contributeMetadata
public Collection<MetadatumDTO> contributeMetadata(org.jdom2.Element t)
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
public void setPrefixToNamespaceMapping(Map<String,String> prefixToNamespaceMapping)
-
getAttribute
public String getAttribute()
-
setAttribute
public void setAttribute(String attribute)
-
getAttributeValue2metadata
public Map<String,MetadataFieldConfig> getAttributeValue2metadata()
-
setAttributeValue2metadata
public void setAttributeValue2metadata(Map<String,MetadataFieldConfig> attributeValue2metadata)
-
getQuery
public String getQuery()
-
setQuery
public void setQuery(String query)
-
isFirstChild
public boolean isFirstChild()
-
setFirstChild
public void setFirstChild(boolean firstChild)
-
getChildName
public String getChildName()
-
setChildName
public void setChildName(String childName)
-
-