Class LoadCsvModelTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
All Implemented Interfaces:
Cloneable

public class LoadCsvModelTask extends AbstractLoadModelTask
The Ant task to load Csv Models.
  • Field Details

    • fieldSeparator

      protected String fieldSeparator
      The field separator.
    • quoteChar

      protected char quoteChar
      The quote char.
    • knownHeaders

      protected boolean knownHeaders
      The has known headers.
    • varargsHeaders

      protected boolean varargsHeaders
      The has varargs headers.
    • idFieldValue

      protected String idFieldValue
      The field that can be used as id
    • file

      protected File file
      The file.
    • alias

      protected String alias
      The alias.
    • cached

      protected boolean cached
      The cached.
    • read

      protected boolean read
      The read on load.
    • store

      protected boolean store
      The store on disposal.
  • Constructor Details

    • LoadCsvModelTask

      public LoadCsvModelTask()
  • Method Details

    • loadModel

      public IModel loadModel() throws org.apache.tools.ant.BuildException
      Specified by:
      loadModel in class AbstractLoadModelTask
      Throws:
      org.apache.tools.ant.BuildException
    • createCsvModel

      protected CsvModel createCsvModel()
      Creates the csv model. This logic has been extracted so that it can be stubbed out in tests
      Returns:
      the csv model
    • getFieldSeparator

      public String getFieldSeparator()
      Gets the field separator.
      Returns:
      the fieldSeparator
    • setFieldSeparator

      public void setFieldSeparator(String fieldSeparator)
      Sets the field separator.
      Parameters:
      fieldSeparator - the fieldSeparator to set
    • isKnownHeaders

      public boolean isKnownHeaders()
      Checks if is known headers.
      Returns:
      the knownHeaders
    • setKnownHeaders

      public void setKnownHeaders(boolean knownHeaders)
      Sets the known headers.
      Parameters:
      knownHeaders - the knownHeaders to set
    • isVarargsHeaders

      public boolean isVarargsHeaders()
      Checks if is varargs headers.
      Returns:
      the varargsHeaders
    • setVarargsHeaders

      public void setVarargsHeaders(boolean varargsHeaders)
      Sets the varargs headers.
      Parameters:
      varargsHeaders - the varargsHeaders to set
    • getFile

      public File getFile()
      Gets the file.
      Returns:
      the file
    • setFile

      public void setFile(File file)
      Sets the file.
      Parameters:
      file - the file to set
    • getAlias

      public String getAlias()
      Gets the alias.
      Returns:
      the alias
    • setAlias

      public void setAlias(String alias)
      Sets the alias.
      Parameters:
      alias - the alias to set
    • isCached

      public boolean isCached()
      Checks if is cached.
      Returns:
      the cached
    • setCached

      public void setCached(boolean cached)
      Sets the cached.
      Parameters:
      cached - the cached to set
    • isRead

      public boolean isRead()
      Checks if is read.
      Returns:
      the read
    • setRead

      public void setRead(boolean read)
      Sets the read.
      Parameters:
      read - the read to set
    • isStore

      public boolean isStore()
      Checks if is store.
      Returns:
      the store
    • setStore

      public void setStore(boolean store)
      Sets the store.
      Parameters:
      store - the store to set
    • getQuoteChar

      public char getQuoteChar()
      Returns:
      the quoteChar
    • setQuoteChar

      public void setQuoteChar(char quoteChar)
      Parameters:
      quoteChar - the quoteChar to set
    • getIdFieldValue

      public String getIdFieldValue()
      Returns:
      the idFieldValue
    • setIdFieldValue

      public void setIdFieldValue(String idFieldValue)
      Parameters:
      idFieldValue - the idFieldValue to set