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 Details

    • WosAttribute2ValueContributor

      public WosAttribute2ValueContributor()
    • WosAttribute2ValueContributor

      public WosAttribute2ValueContributor(String query, Map<String,String> prefixToNamespaceMapping, Map<String,MetadataFieldConfig> attributeValue2metadata)
  • Method Details

    • contributeMetadata

      public Collection<MetadatumDTO> contributeMetadata(org.jdom2.Element t)
      Description copied from interface: MetadataContributor
      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 objects
      Specified by:
      contributeMetadata in interface MetadataContributor<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: MetadataContributor
      Set the metadataFieldMapping
      Specified by:
      setMetadataFieldMapping in interface MetadataContributor<org.jdom2.Element>
      Parameters:
      metadataFieldMapping - the MetadataFieldMapping object to set to the MetadataContributor
    • setPrefixToNamespaceMapping

      public void setPrefixToNamespaceMapping(Map<String,String> prefixToNamespaceMapping)
    • getPrefixToNamespaceMapping

      public Map<String,String> getPrefixToNamespaceMapping()
    • 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)