Class SimpleXpathMetadatumAndAttributeContributor

java.lang.Object
org.dspace.importer.external.metadatamapping.contributor.SimpleXpathMetadatumContributor
org.dspace.importer.external.metadatamapping.contributor.SimpleXpathMetadatumAndAttributeContributor
All Implemented Interfaces:
MetadataContributor<org.jdom2.Element>

public class SimpleXpathMetadatumAndAttributeContributor extends SimpleXpathMetadatumContributor
This contributor checks for each node returned for the supplied path if node contains supplied attribute - the value of the current node is taken if exist.
Author:
Boychuk Mykhaylo (boychuk.mykhaylo at 4Science dot com)
  • Constructor Details

    • SimpleXpathMetadatumAndAttributeContributor

      public SimpleXpathMetadatumAndAttributeContributor()
  • Method Details

    • contributeMetadata

      public Collection<MetadatumDTO> contributeMetadata(org.jdom2.Element t)
      Description copied from class: SimpleXpathMetadatumContributor
      Retrieve the metadata associated with the given object. Depending on the retrieved node (using the query), different types of values will be added to the MetadatumDTO list
      Specified by:
      contributeMetadata in interface MetadataContributor<org.jdom2.Element>
      Overrides:
      contributeMetadata in class SimpleXpathMetadatumContributor
      Parameters:
      t - An element to retrieve metadata from.
      Returns:
      a collection of import records. Only the identifier of the found records may be put in the record.
    • getAttribute

      public String getAttribute()
    • setAttribute

      public void setAttribute(String attribute)