Class TfsResultImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.result.tfs.TfsResultImpl
-
-
Constructor Summary
Constructors Constructor Description TfsResultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRow(java.util.List<java.lang.String> values)
adds a new line of data to the dataset.void
clear()
clears all internal variables.void
convert()
Converts all double data for fast retrieval.void
createColumn(java.lang.String key)
adds an empty column to the internal data.int
getColumnCount()
java.util.List<java.lang.Double>
getDoubleData(MadxVariable resultVariable)
returns one Column of Data as double-values.java.util.List<java.lang.Double>
getDoubleData(java.lang.String key)
returns one Column of Data ad double-valuesjava.lang.Integer
getElementIndex(java.lang.String elementName)
java.util.List<java.lang.String>
getKeys()
ResultType
getResultType()
java.util.List<java.lang.String>
getStringData(MadxVariable resultVariable)
returns one Column of Data as String-values.java.util.List<java.lang.String>
getStringData(java.lang.String key)
returns the Data-Column for the given Key asArrayList
TfsSummary
getSummary()
MadxVarType
getVarType(MadxVariable var)
returns the type of Data for a given ResultVariableMadxVarType
getVarType(java.lang.String key)
returns the type of Data for the given keyvoid
setTfsSummary(TfsSummary tfsSummary)
void
setVarType(java.lang.String key, MadxVarType varType)
sets the Type of the column corresponding to the given keyvoid
verify()
Validates, if all values can be correctly retrieved.
-
-
-
Method Detail
-
clear
public void clear()
clears all internal variables.
-
createColumn
public void createColumn(java.lang.String key)
adds an empty column to the internal data.- Parameters:
key
- the key for this column.
-
setVarType
public void setVarType(java.lang.String key, MadxVarType varType)
sets the Type of the column corresponding to the given key- Parameters:
key
- the key for which to set the typevarType
- the type for the key
-
addRow
public void addRow(java.util.List<java.lang.String> values)
adds a new line of data to the dataset.- Parameters:
values
- the values to set as Strings.
-
verify
public void verify() throws TfsResultException
Validates, if all values can be correctly retrieved. If not, it throws an exception.- Throws:
TfsResultException
- if the verification fails.
-
convert
public void convert() throws TfsResultException
Converts all double data for fast retrieval.- Throws:
TfsResultException
- if the conversion from string to double values is not possible
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTfsResult
- Returns:
- the amount of data-columns (amount of variables)
-
getElementIndex
public java.lang.Integer getElementIndex(java.lang.String elementName)
- Specified by:
getElementIndex
in interfaceTfsResult
- Parameters:
elementName
- the name of the element for which one wants to retrieve the index.- Returns:
- the index of Element in a list of values.
-
getDoubleData
public java.util.List<java.lang.Double> getDoubleData(MadxVariable resultVariable)
Description copied from interface:TfsResult
returns one Column of Data as double-values.- Specified by:
getDoubleData
in interfaceTfsResult
- Parameters:
resultVariable
- the ResultVariable for which to get the Data.- Returns:
- the Values
-
getDoubleData
public java.util.List<java.lang.Double> getDoubleData(java.lang.String key)
Description copied from interface:TfsResult
returns one Column of Data ad double-values- Specified by:
getDoubleData
in interfaceTfsResult
- Parameters:
key
- the key for the data- Returns:
- the values
-
getStringData
public java.util.List<java.lang.String> getStringData(MadxVariable resultVariable)
Description copied from interface:TfsResult
returns one Column of Data as String-values.- Specified by:
getStringData
in interfaceTfsResult
- Parameters:
resultVariable
- the ResultVariable for which to get the Data.- Returns:
- the Values
-
getStringData
public java.util.List<java.lang.String> getStringData(java.lang.String key)
Description copied from interface:TfsResult
returns the Data-Column for the given Key asArrayList
- Specified by:
getStringData
in interfaceTfsResult
- Parameters:
key
- the key for which to get the data.- Returns:
- the Double values
-
getKeys
public java.util.List<java.lang.String> getKeys()
-
getVarType
public MadxVarType getVarType(java.lang.String key)
Description copied from interface:TfsResult
returns the type of Data for the given key- Specified by:
getVarType
in interfaceTfsResult
- Parameters:
key
- the key for which to get the DataType- Returns:
- the Data-Type
-
getVarType
public MadxVarType getVarType(MadxVariable var)
Description copied from interface:TfsResult
returns the type of Data for a given ResultVariable- Specified by:
getVarType
in interfaceTfsResult
- Parameters:
var
- the ResultVariable- Returns:
- the VarType
-
getResultType
public final ResultType getResultType()
- Specified by:
getResultType
in interfaceResult
-
getSummary
public TfsSummary getSummary()
- Specified by:
getSummary
in interfaceTfsResult
- Returns:
- the summary parameters
-
setTfsSummary
public void setTfsSummary(TfsSummary tfsSummary)
-
-