Package com.storedobject.office
Class ODT.Table
java.lang.Object
com.storedobject.office.ODT.Table
Represents a table in the context of open document template (ODT) processing.
This class provides functionality for managing table rows, adding new rows,
copying existing rows, and finalizing the processing of the table.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ODT.TableRow row) Adds a specified TableRow as such to the output.voidadd(ODT.TableRow row, int variableIndex) Adds a table row to the output with array variables adjusted as per the index.voidcopy(int index) Copies the row at the specified index and adds it to the output as such.voidcopy(int index, int count) Copies a specified number of rows starting from a given index.getName()Retrieves the name associated with this object.getRow(int n) Retrieves a specific row from the table by its index.
-
Method Details
-
getName
Retrieves the name associated with this object.- Returns:
- the name as a String
-
getRow
Retrieves a specific row from the table by its index.- Parameters:
n- The zero-based index of the row to retrieve. Must be within the range of existing rows (0 to the number of rows - 1).- Returns:
- A
ODT.TableRowobject representing the row at the specified index, ornullif the index is out of bounds or the row cannot be retrieved.
-
add
Adds a specified TableRow as such to the output.- Parameters:
row- the TableRow to be added to the table; must not be null
-
add
Adds a table row to the output with array variables adjusted as per the index.- Parameters:
row- the TableRow object to be added; must not be nullvariableIndex- index of the array variables- Throws:
Exception- if an error occurs during the operation
-
copy
public void copy(int index) Copies the row at the specified index and adds it to the output as such.- Parameters:
index- the index of the row to be copied
-
copy
public void copy(int index, int count) Copies a specified number of rows starting from a given index.- Parameters:
index- the starting index from which copying beginscount- the number of rows to be copied
-