Class LoadCsvModelTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.epsilon.workflow.tasks.EpsilonTask
org.eclipse.epsilon.workflow.tasks.AbstractLoadModelTask
org.eclipse.epsilon.workflow.tasks.csv.LoadCsvModelTask
- All Implemented Interfaces:
Cloneable
The Ant task to load Csv Models.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The alias.protected boolean
The cached.protected String
The field separator.protected File
The file.protected String
The field that can be used as idprotected boolean
The has known headers.protected char
The quote char.protected boolean
The read on load.protected boolean
The store on disposal.protected boolean
The has varargs headers.Fields inherited from class org.eclipse.epsilon.workflow.tasks.AbstractLoadModelTask
name
Fields inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
failOnErrors, failOnWarnings, profile
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CsvModel
Creates the csv model.getAlias()
Gets the alias.Gets the field separator.getFile()
Gets the file.char
boolean
isCached()
Checks if is cached.boolean
Checks if is known headers.boolean
isRead()
Checks if is read.boolean
isStore()
Checks if is store.boolean
Checks if is varargs headers.void
Sets the alias.void
setCached
(boolean cached) Sets the cached.void
setFieldSeparator
(String fieldSeparator) Sets the field separator.void
Sets the file.void
setIdFieldValue
(String idFieldValue) void
setKnownHeaders
(boolean knownHeaders) Sets the known headers.void
setQuoteChar
(char quoteChar) void
setRead
(boolean read) Sets the read.void
setStore
(boolean store) Sets the store.void
setVarargsHeaders
(boolean varargsHeaders) Sets the varargs headers.Methods inherited from class org.eclipse.epsilon.workflow.tasks.AbstractLoadModelTask
executeImpl, getName, setName
Methods inherited from class org.eclipse.epsilon.workflow.tasks.EpsilonTask
execute, fail, getActiveTransactions, getBaseDir, getExtendedProperties, getModelRepository, getProjectRepository, getProjectStackFrame, isFailOnErrors, isFailOnWarnings, isProfile, setFailOnErrors, setFailOnWarnings, setProfile, setProjectRepository, usesSharedModelRepository, warn
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
fieldSeparator
The field separator. -
quoteChar
protected char quoteCharThe quote char. -
knownHeaders
protected boolean knownHeadersThe has known headers. -
varargsHeaders
protected boolean varargsHeadersThe has varargs headers. -
idFieldValue
The field that can be used as id -
file
The file. -
alias
The alias. -
cached
protected boolean cachedThe cached. -
read
protected boolean readThe read on load. -
store
protected boolean storeThe store on disposal.
-
-
Constructor Details
-
LoadCsvModelTask
public LoadCsvModelTask()
-
-
Method Details
-
loadModel
- Specified by:
loadModel
in classAbstractLoadModelTask
- Throws:
org.apache.tools.ant.BuildException
-
createCsvModel
Creates the csv model. This logic has been extracted so that it can be stubbed out in tests- Returns:
- the csv model
-
getFieldSeparator
Gets the field separator.- Returns:
- the fieldSeparator
-
setFieldSeparator
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
Gets the file.- Returns:
- the file
-
setFile
Sets the file.- Parameters:
file
- the file to set
-
getAlias
Gets the alias.- Returns:
- the alias
-
setAlias
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
- Returns:
- the idFieldValue
-
setIdFieldValue
- Parameters:
idFieldValue
- the idFieldValue to set
-