Package org.yamcs.xtce
Class BaseSpreadsheetLoader
- java.lang.Object
-
- org.yamcs.xtce.AbstractFileLoader
-
- org.yamcs.xtce.BaseSpreadsheetLoader
-
- All Implemented Interfaces:
SpaceSystemLoader
- Direct Known Subclasses:
SpreadsheetLoader,V6LoaderBase,V7LoaderBase
public abstract class BaseSpreadsheetLoader extends AbstractFileLoader
Base for spreadsheet loader - this contains common properties for both V6 and V7 loaders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseSpreadsheetLoader.BasicPrefFactorystatic classBaseSpreadsheetLoader.EnumerationDefinitionTemporary value holder for the enumeration definition; needed because enumerations are read before parameters, and reading sharing the same EPT among all parameters is not a good approach (think different alarm definitions)static classBaseSpreadsheetLoader.Range
-
Field Summary
-
Fields inherited from class org.yamcs.xtce.AbstractFileLoader
configName, log, path
-
-
Constructor Summary
Constructors Constructor Description BaseSpreadsheetLoader(String path)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static BaseSpreadsheetLoader.RangefindRange(jxl.Sheet sheet, int startRow, int col1, int col2)protected jxl.CellgetCell(jxl.Cell[] cells, String colName)protected StringgetContent(jxl.Cell[] cells, String colName)protected StringgetContent(jxl.Cell[] cells, String colName, String defaultValue)static ParameterReferencegetParameterReference(SpaceSystem spaceSystem, String paramName, boolean typeRequired)protected booleanhasColumn(jxl.Cell[] cells, int idx)protected booleanhasColumn(jxl.Cell[] cells, String colName)protected static booleanisCellEmpty(jxl.Cell[] cells, int col)protected booleanisEmptyOrCommentedOut(jxl.Cell[] cells)protected static booleanisRowEmpty(jxl.Cell[] cells)protected jxl.Cell[]jumpToRow(jxl.Sheet sheet, int row)protected voidloadWorkbook()protected static byteparseByte(SpreadsheetLoadContext ctx, String s)protected doubleparseDouble(jxl.Cell cell)protected static doubleparseDouble(SpreadsheetLoadContext ctx, jxl.Cell cell)protected intparseInt(String s)protected static intparseInt(SpreadsheetLoadContext ctx, String s)protected jxl.SheetswitchToSheet(String sheetName, boolean required)protected voidvalidateNameType(String name)-
Methods inherited from class org.yamcs.xtce.AbstractFileLoader
getConfigName, needsUpdate, writeConsistencyDate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.yamcs.xtce.SpaceSystemLoader
load, loadList
-
-
-
-
Field Detail
-
SHEET_GENERAL
protected static final String SHEET_GENERAL
- See Also:
- Constant Field Values
-
SHEET_CHANGELOG
protected static final String SHEET_CHANGELOG
- See Also:
- Constant Field Values
-
SHEET_CALIBRATION
protected static final String SHEET_CALIBRATION
- See Also:
- Constant Field Values
-
SHEET_TELEMETERED_PARAMETERS
protected static final String SHEET_TELEMETERED_PARAMETERS
- See Also:
- Constant Field Values
-
SHEET_LOCAL_PARAMETERS
protected static final String SHEET_LOCAL_PARAMETERS
- See Also:
- Constant Field Values
-
SHEET_DERIVED_PARAMETERS
protected static final String SHEET_DERIVED_PARAMETERS
- See Also:
- Constant Field Values
-
SHEET_CONTAINERS
protected static final String SHEET_CONTAINERS
- See Also:
- Constant Field Values
-
SHEET_ALGORITHMS
protected static final String SHEET_ALGORITHMS
- See Also:
- Constant Field Values
-
SHEET_ALARMS
protected static final String SHEET_ALARMS
- See Also:
- Constant Field Values
-
SHEET_COMMANDS
protected static final String SHEET_COMMANDS
- See Also:
- Constant Field Values
-
SHEET_COMMANDOPTIONS
protected static final String SHEET_COMMANDOPTIONS
- See Also:
- Constant Field Values
-
SHEET_COMMANDVERIFICATION
protected static final String SHEET_COMMANDVERIFICATION
- See Also:
- Constant Field Values
-
CN_CONTEXT
protected static final String CN_CONTEXT
- See Also:
- Constant Field Values
-
CN_CALIB_NAME
protected static final String CN_CALIB_NAME
- See Also:
- Constant Field Values
-
CN_CALIB_TYPE
protected static final String CN_CALIB_TYPE
- See Also:
- Constant Field Values
-
CN_CALIB_CALIB1
protected static final String CN_CALIB_CALIB1
- See Also:
- Constant Field Values
-
CN_CALIB_CALIB2
protected static final String CN_CALIB_CALIB2
- See Also:
- Constant Field Values
-
CN_CALIB_DESCRIPTION
protected static final String CN_CALIB_DESCRIPTION
- See Also:
- Constant Field Values
-
CALIB_TYPE_ENUMERATION
protected static final String CALIB_TYPE_ENUMERATION
- See Also:
- Constant Field Values
-
CALIB_TYPE_POLYNOMIAL
protected static final String CALIB_TYPE_POLYNOMIAL
- See Also:
- Constant Field Values
-
CALIB_TYPE_SPLINE
protected static final String CALIB_TYPE_SPLINE
- See Also:
- Constant Field Values
-
CALIB_TYPE_JAVA_EXPRESSION
protected static final String CALIB_TYPE_JAVA_EXPRESSION
- See Also:
- Constant Field Values
-
CALIB_TYPE_TIME
protected static final String CALIB_TYPE_TIME
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_STRING
protected static final String PARAM_ENGTYPE_STRING
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_BOOLEAN
protected static final String PARAM_ENGTYPE_BOOLEAN
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_BINARY
protected static final String PARAM_ENGTYPE_BINARY
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_ENUMERATED
protected static final String PARAM_ENGTYPE_ENUMERATED
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_DOUBLE
protected static final String PARAM_ENGTYPE_DOUBLE
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_UINT32
protected static final String PARAM_ENGTYPE_UINT32
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_INT32
protected static final String PARAM_ENGTYPE_INT32
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_UINT64
protected static final String PARAM_ENGTYPE_UINT64
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_INT64
protected static final String PARAM_ENGTYPE_INT64
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_FLOAT
protected static final String PARAM_ENGTYPE_FLOAT
- See Also:
- Constant Field Values
-
PARAM_ENGTYPE_TIME
protected static final String PARAM_ENGTYPE_TIME
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_FLOAT
protected static final String PARAM_RAWTYPE_FLOAT
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_INT
protected static final String PARAM_RAWTYPE_INT
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_UINT
protected static final String PARAM_RAWTYPE_UINT
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_DOUBLE
protected static final String PARAM_RAWTYPE_DOUBLE
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_BOOLEAN
protected static final String PARAM_RAWTYPE_BOOLEAN
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_BINARY
protected static final String PARAM_RAWTYPE_BINARY
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_BINARY_PREPENDED
protected static final String PARAM_RAWTYPE_BINARY_PREPENDED
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_BINARY_TERMINATED
protected static final String PARAM_RAWTYPE_BINARY_TERMINATED
- See Also:
- Constant Field Values
-
PARAM_RAWTYPE_STRING
protected static final String PARAM_RAWTYPE_STRING
- See Also:
- Constant Field Values
-
ctx
protected final SpreadsheetLoadContext ctx
-
workbook
protected jxl.Workbook workbook
-
enableXtceNameRestrictions
protected boolean enableXtceNameRestrictions
-
-
Constructor Detail
-
BaseSpreadsheetLoader
public BaseSpreadsheetLoader(String path) throws ConfigurationException
- Throws:
ConfigurationException
-
-
Method Detail
-
jumpToRow
protected jxl.Cell[] jumpToRow(jxl.Sheet sheet, int row)
-
loadWorkbook
protected void loadWorkbook()
-
switchToSheet
protected jxl.Sheet switchToSheet(String sheetName, boolean required)
-
isEmptyOrCommentedOut
protected boolean isEmptyOrCommentedOut(jxl.Cell[] cells)
-
hasColumn
protected boolean hasColumn(jxl.Cell[] cells, int idx)
-
hasColumn
protected boolean hasColumn(jxl.Cell[] cells, String colName)
-
parseInt
protected int parseInt(String s)
-
parseDouble
protected double parseDouble(jxl.Cell cell)
-
parseInt
protected static int parseInt(SpreadsheetLoadContext ctx, String s)
-
parseDouble
protected static double parseDouble(SpreadsheetLoadContext ctx, jxl.Cell cell)
-
parseByte
protected static byte parseByte(SpreadsheetLoadContext ctx, String s)
-
getCell
protected jxl.Cell getCell(jxl.Cell[] cells, String colName)
-
findRange
protected static BaseSpreadsheetLoader.Range findRange(jxl.Sheet sheet, int startRow, int col1, int col2)
-
isCellEmpty
protected static boolean isCellEmpty(jxl.Cell[] cells, int col)
-
isRowEmpty
protected static boolean isRowEmpty(jxl.Cell[] cells)
-
getParameterReference
public static ParameterReference getParameterReference(SpaceSystem spaceSystem, String paramName, boolean typeRequired)
-
validateNameType
protected void validateNameType(String name)
-
-