Class CsvResourceMetadata

java.lang.Object
com.aquima.interactions.framework.connectivity.CsvResourceMetadata
All Implemented Interfaces:
ICsvResourceMetadata

public class CsvResourceMetadata extends Object implements ICsvResourceMetadata
Class to create a ICsvResourceMetadata implementation base on a connection that is available in a project.
Since:
8.3
Author:
Jon van Leuven
  • Method Details

    • createFor

      public static CsvResourceMetadata createFor(String connectionName, IProject project)
      This method may be used to create an ICsvResourceMetadata implementation for a connection that is available in the project.
      Parameters:
      connectionName - The name of the connection that contains the available metadata.
      project - The project that contains the connection definitions.
      Returns:
      The ICsvResourceMetadata implementation, never null.
      Throws:
      UnknownConnectionException - Is throw when there is no connection definition available in the project for the specified name.
      UnknownValueFormatException - Is throw when there there is a reference to an unknown value format.
      PatternException - Is throw when there there is an invalid format pattern defined.
    • isFixedWidthText

      public boolean isFixedWidthText()
      Description copied from interface: ICsvResourceMetadata
      This method returns true the resource should be parsed as a fixed width text resource.
      Specified by:
      isFixedWidthText in interface ICsvResourceMetadata
      Returns:
      True if it is a fixed width resource, false if it is a standard CSV resource.
    • getColumnWidths

      public int[] getColumnWidths()
      Description copied from interface: ICsvResourceMetadata
      This method returns the column widths for a fixed width text resource.
      Specified by:
      getColumnWidths in interface ICsvResourceMetadata
      Returns:
      An array of column widths.
    • getDelimiter

      public char getDelimiter()
      Description copied from interface: ICsvResourceMetadata
      This method returns the delimiter to use for separating entries.
      Specified by:
      getDelimiter in interface ICsvResourceMetadata
      Returns:
      The delimiter to use for separating entries, may only be one character.
    • getQuoteCharacter

      public char getQuoteCharacter()
      Description copied from interface: ICsvResourceMetadata
      This method returns the character to use for quoted elements.
      Specified by:
      getQuoteCharacter in interface ICsvResourceMetadata
      Returns:
      The character for quoted elements.
    • hasRowHeaders

      public boolean hasRowHeaders()
      Description copied from interface: ICsvResourceMetadata
      This method returns true if the CSV resource's first row contains the headers.
      Specified by:
      hasRowHeaders in interface ICsvResourceMetadata
      Returns:
      True if the first row are the headers.
    • getColumnMetadata

      public ICsvColumnMetadata[] getColumnMetadata()
      Description copied from interface: ICsvResourceMetadata
      This method returns the metadata for all the columns.
      Specified by:
      getColumnMetadata in interface ICsvResourceMetadata
      Returns:
      All the columns metadata objects, never null.
    • getCharset

      public String getCharset()
      Description copied from interface: ICsvResourceMetadata
      This method returns the charset used for decoding the csv resource.
      Specified by:
      getCharset in interface ICsvResourceMetadata
      Returns:
      Charset defined, or null.