public class LisInformationRecord extends LisRecord
Information records can be of two types, a one-dimensional list or a two-dimensional table.
A table is identified by having the first record as type = 73. Then each row of the table is started with a record of type = 0, being the component of the first column cell, and then N records of type = 69 being the cells for the consecutive columns.
See LIS 79 Documentation Section 4.1.3.
LisRecord.Type
Modifier and Type | Method and Description |
---|---|
void |
addRow()
Add a table row with empty values to this component.
|
void |
addRow(List<Object> values)
Add a table row to this component.
|
int |
findColumn(String columnName)
Find column with the specified name.
|
String |
getColumnName(int columnNo)
Return the name of the specified column.
|
LisComponent |
getComponent(int rowNo,
String columnName)
Return the component of from the specified column in the given row.
|
LisComponent |
getComponentAt(int rowNo,
int columnNo)
Return component at the specified index.
|
List<LisComponent> |
getComponents()
Return the components of this record.
|
String |
getName()
Return name of this information record.
|
int |
getNColumns()
Return number of columns of information.
|
int |
getNRows()
Return number of rows of information.
|
int |
getSize()
Return size (in bytes) of this record.
|
boolean |
isTable()
Check if this record contains a table of information.
|
void |
removeRow(int rowNo)
Remove the specified row from this record.
|
String |
toString() |
getAttributes, getType
public void addRow(List<Object> values)
values
- The values making up the table row. Should have as many entries
as the table has columns.public void addRow()
public void removeRow(int rowNo)
rowNo
- Row to remove. [0,nRows>.IllegalArgumentException
- If rowNo is out of bounds.public List<LisComponent> getComponents()
public boolean isTable()
public String getName()
A name is only provided for table data, and in that case it is the value of the table identifying component.
public int getNRows()
For a non-table record this will be the number of contained components.
public int getNColumns()
public LisComponent getComponentAt(int rowNo, int columnNo)
rowNo
- Row number index. [0,nRows>columnNo
- Column number index. [0,nRColumns>IllegalArgumentException
- If rowNo or columnNo are out of bounds.public LisComponent getComponent(int rowNo, String columnName)
rowNo
- Row number to pick from. [0,nRows>columnName
- Name of column to get value from. Non-null.IllegalArgumentException
- if rowNo is out of bounds or columnName is null.public String getColumnName(int columnNo)
columnNo
- Column to get name of. [0,nColumns>.public int findColumn(String columnName)
columnName
- Name of column to locate. Non-null.IllegalArgumentException
- If columnName is null.public int getSize()
Copyright © 2024 Petroware AS - https://petroware.no