public class RelationMatrices extends java.lang.Object implements DataTables
Creates one table for each relation matrix. Rows are the source design elements from which the relationship originates, columns are the target design elements of the relationship. The class hides empty matrices. A matrix is empty if there are no source or target elements, or if it is a null matrix.
Constructor and Description |
---|
RelationMatrices(MatrixEngine engine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
calculateMatrices(MessageHandler msgHandler,
int startPercent,
int finishPercent)
Calculates all relation matrices, reports any errors.
|
java.lang.String |
getColumnDescription(int index,
int col)
Returns a short description of a column.
|
java.lang.String |
getColumnName(int index,
int col)
Gets the name of a target element in specific column.
|
int |
getNumberOfColumns(int index)
Gets the number of target design elements (columns) in a table.
|
int |
getNumberOfRows(int index)
Gets the number of source design elements (rows) in a table.
|
int |
getNumberOfTables()
Returns the number of available tables.
|
java.lang.String |
getRowName(int index,
int row)
Gets the name of a source element in specific row.
|
java.lang.String |
getTableName(int index)
Returns the name of the relation matrix.
|
java.lang.String |
getTablesDescription()
Returns a short description of the tables contents.
|
java.lang.String |
getTypeName(int index)
Returns the metamodel type name of the elements of a table.
|
java.lang.Object |
getValueAt(int index,
int row,
int col)
Returns the value of a table cell.
|
public RelationMatrices(MatrixEngine engine)
engine
- The relation matrices to calculate and display.public boolean calculateMatrices(MessageHandler msgHandler, int startPercent, int finishPercent)
msgHandler
- Handler for progress and error messagesstartPercent
- Initial value of the progress indicatorfinishPercent
- Value of the progress indicator at the completion of
this calculation runtrue
if the matrices were calculated without errors,
false
if an error occurred.public int getNumberOfTables()
DataTables
getNumberOfTables
in interface DataTables
public java.lang.String getTableName(int index)
getTableName
in interface DataTables
index
- Index of the table to access.public int getNumberOfRows(int index)
getNumberOfRows
in interface DataTables
index
- Index of the table to access.public int getNumberOfColumns(int index)
getNumberOfColumns
in interface DataTables
index
- Index of the table to access.public java.lang.Object getValueAt(int index, int row, int col)
DataTables
getValueAt
in interface DataTables
index
- Index of the table to access.row
- Index of the row to access.col
- Index of the column to access.public java.lang.String getRowName(int index, int row)
getRowName
in interface DataTables
index
- Index of the table to access.row
- Index of the row to access.public java.lang.String getColumnName(int index, int col)
getColumnName
in interface DataTables
index
- Index of the table to access.col
- Index of the column to access.public java.lang.String getColumnDescription(int index, int col)
getColumnDescription
in interface DataTables
index
- Index of the table to access.col
- Index of the column to access.public java.lang.String getTablesDescription()
DataTables
getTablesDescription
in interface DataTables
public java.lang.String getTypeName(int index)
getTypeName
in interface DataTables
index
- Index of the table to access.