Class EnhancedSimpleMetadataContributor

  • All Implemented Interfaces:
    MetadataContributor<PlainMetadataSourceDto>

    public class EnhancedSimpleMetadataContributor
    extends SimpleMetadataContributor
    This class implements functionalities to handle common situation regarding plain metadata. In some scenario, like csv or tsv, the format don't allow lists. We can use this MetadataContribut to parse a given plain metadata and split it into related list, based on the delimiter. No escape character is present. Default values are comma (,) for delimiter, and double quote (") for escape character
    Author:
    Pasquale Cavallo (pasquale.cavallo at 4science dot it)
    • Constructor Detail

      • EnhancedSimpleMetadataContributor

        public EnhancedSimpleMetadataContributor()
    • Method Detail

      • setDelimiter

        public void setDelimiter​(char delimiter)
        This method could be used to set the delimiter used during parse If no delimiter is set, comma will be used
      • getDelimiter

        public char getDelimiter()
        This method could be used to get the delimiter used in this class
      • getQuote

        public char getQuote()
        This method could be used to get the quote char used in this class
      • setQuote

        public void setQuote​(char quote)
        This method could be used to set the quote char used during parse If no quote char is set, " will be used
      • setEscape

        public void setEscape​(char escape)
        Method to inject the escape character, usually the ". This must be the ASCII integer related to the char. In example, 9 for tab, 44 for comma If no escape is set, double quote will be used
      • getEscape

        public char getEscape()
        Method to get the escape character.