public class RuleData extends java.lang.Object implements DataTables
The class creates one table for each element type for which there are elements with rule violations. Each row of the table reports the violation of one design rule by one model element. Each table has five columns describing various properties of the rule violation:
Constructor and Description |
---|
RuleData(RuleEngine engine)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
checkFilterIdentifiers()
Checks the application areas of the rule filter for plausibility.
|
boolean |
checkRules(MessageHandler msgHandler,
int startPercent,
int finishPercent)
Checks all design rules, 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)
Returns the name of the object a column represents (column header).
|
int |
getNumberOfColumns(int index)
Returns the number of columns of a table.
|
int |
getNumberOfRows(int index)
Gets the number of design rule violations for a table.
|
int |
getNumberOfTables()
Returns the number of available tables.
|
java.lang.String |
getRowName(int index,
int row)
Gets the fully qualified name of the violating 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 detailed information about a rule violation in the specified
column.
|
boolean |
setRuleFilter(MessageHandler msgHandler,
java.lang.String filter)
Sets the rule filter that specifies the rules to apply.
|
public RuleData(RuleEngine engine)
engine
- The rule engine to do the actual work.public boolean setRuleFilter(MessageHandler msgHandler, java.lang.String filter)
msgHandler
- Handler for error messagesfilter
- The rule filter string.true
if the filter was correctly installed,
false
if an error occurred. The error will be
reported to the message handler.public java.lang.String checkFilterIdentifiers()
public boolean checkRules(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 all rule were checked without any errors,
false
if an error occurred.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 java.lang.String getTypeName(int index)
DataTables
getTypeName
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)
DataTables
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)
DataTables
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)
DataTables
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