public class ModelData extends java.lang.Object implements DataTables
Creates one table per model element type, table rows are model elements, columns present the model element attributes.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getColumnDescription(int index,
int col)
Gets the description of an attribute in a column.
|
java.lang.String |
getColumnName(int index,
int col)
Gets the name of the attribute in a column.
|
int |
getNumberOfColumns(int index)
Returns the number of attributes (columns) in a table.
|
int |
getNumberOfRows(int index)
Returns the number of model elements (rows) in a table.
|
int |
getNumberOfTables()
Returns the number of available tables.
|
java.util.Collection<java.lang.String> |
getReferencedIds(int index,
int row,
int col)
Gets the set of XMI IDs of model elements referenced by a (multi-valued)
cross-reference attribute.
|
java.lang.String |
getRowName(int index,
int row)
Gets the fully qualified name of a model element in a specific row.
|
java.lang.String |
getTableName(int index)
Returns the name of a table.
|
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)
Gets the value of an attribute for a specific model element.
|
java.lang.String |
getXMIID(int index,
int row)
Gets the XMI ID of a model element.
|
public ModelData(Model model)
model
- The model to display.public java.util.Collection<java.lang.String> getReferencedIds(int index, int row, int col)
index
- Index of the tablerow
- Row index of the model elementcol
- Column index of the cross reference attributepublic java.lang.String getXMIID(int index, int row)
index
- Index of the tablerow
- Row index of the model elementpublic java.lang.String getTypeName(int index)
DataTables
getTypeName
in interface DataTables
index
- Index of the table to access.public int getNumberOfTables()
DataTables
getNumberOfTables
in interface DataTables
public java.lang.String getTableName(int index)
DataTables
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)
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