|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.actf.validation.reports.ReportElement
org.eclipse.actf.validation.reports.ValidationReportRecord
public class ValidationReportRecord
used as the basic reporting unit for a validation report. Hard-coded fields include the level of the violation and its corresponding string representation, the unique id of the component causing the problem, the class name of the component, the message describing the problem, a component name (if available), a long description of the violation, and a timestamp. Other fields can be added.
Field Summary | |
---|---|
protected String |
compName
|
protected HashMap |
fieldMap
|
protected static ArrayList |
fieldNames
|
protected HashMap |
fieldStringMap
|
protected String |
id
|
protected int |
level
|
static String |
LEVEL_FIELDNAME
|
protected String |
locationPath
|
static String |
LOCATIONPATH_FIELDNAME
|
protected String |
longMessage
|
static String |
LONGMESSAGE_FIELDNAME
|
protected String |
message
|
static String |
MESSAGE_FIELDNAME
|
static String |
NAME_FIELDNAME
|
static String |
NODEID_FIELDNAME
|
protected String |
nodeName
|
static String |
NODENAME_FIELDNAME
|
protected String |
ruleId
|
static String |
RULEID_FIELDNAME
|
protected static String |
sortKey
|
protected Calendar |
timestamp
|
static String |
TIMESTAMP_FIELDNAME
|
Constructor Summary | |
---|---|
ValidationReportRecord()
create a new record for a validation report |
Method Summary | |
---|---|
protected static void |
addAttributeName(String name)
|
static void |
addAttributeNames(String[] fieldNames)
set the field names for all records. |
int |
compareTo(Object o)
|
boolean |
equals(Object o)
|
Object |
getAttribute(String field)
get the value for the specified field |
String |
getAttributeAsString(String field)
get the value for the specified field as a String. |
static String[] |
getAttributeNames()
get the field names being used for generated records |
String |
getComponentName()
|
int |
getLevel()
|
String |
getLevelAsString()
return the level as a string or label stripped of its prefix |
String |
getLocationPath()
Gets the location path for a component. |
String |
getLongMessage()
|
String |
getMessage()
|
String |
getNodeId()
|
String |
getNodeName()
|
String |
getRuleId()
returns the rule id responsible for generating this record |
static String |
getSortKey()
return the sort key, the key according to which records are sorted |
Calendar |
getTimestamp()
|
int |
hashCode()
|
void |
setAttribute(String field,
Object val)
set the specified field using the given value |
void |
setAttributeAsString(String field,
String val)
set the specified field using the given String value. |
void |
setComponentName(String name)
|
void |
setLevel(int level)
set the level of the violation or message. |
void |
setLocationPath(String path)
Sets the location path for this component. |
void |
setLongMessage(String message)
|
void |
setMessage(String message)
|
void |
setNodeId(String id)
id of the component corresponding to this record. |
void |
setNodeName(String name)
|
void |
setRuleId(String id)
id of the rule corresponding to this record |
static void |
setSortKey(String field)
set the sort key which must be one of the defined field names or a field added by user |
void |
setTimestamp(Calendar timestamp)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NODEID_FIELDNAME
public static final String RULEID_FIELDNAME
public static final String NAME_FIELDNAME
public static final String LEVEL_FIELDNAME
public static final String MESSAGE_FIELDNAME
public static final String LONGMESSAGE_FIELDNAME
public static final String NODENAME_FIELDNAME
public static final String LOCATIONPATH_FIELDNAME
public static final String TIMESTAMP_FIELDNAME
protected static String sortKey
protected static ArrayList fieldNames
protected int level
protected String nodeName
protected String compName
protected String id
protected String message
protected String longMessage
protected Calendar timestamp
protected String locationPath
protected String ruleId
protected HashMap fieldMap
protected HashMap fieldStringMap
Constructor Detail |
---|
public ValidationReportRecord()
Method Detail |
---|
public static void addAttributeNames(String[] fieldNames)
fieldNames
- -
names of fieldspublic static String[] getAttributeNames()
protected static void addAttributeName(String name)
public static void setSortKey(String field)
field
- -
field according to which records are sortedpublic static String getSortKey()
public String getLocationPath()
public void setLocationPath(String path)
path
- -
the path to set.public String getNodeName()
public void setNodeName(String name)
name
- -
the node name of the componentIModel.getNodeName(Object)
public String getNodeId()
public void setNodeId(String id)
id
- public String getRuleId()
null
if no id was givenpublic void setRuleId(String id)
id
- rule idpublic String getComponentName()
public void setComponentName(String name)
name
- -
the name to set.public String getLevelAsString()
public int getLevel()
public void setLevel(int level)
Reporter
.
level
- The level to set.IReporter
public String getMessage()
public void setMessage(String message)
message
- The message to set.public String getLongMessage()
public void setLongMessage(String message)
message
- The long message to set.public Calendar getTimestamp()
public void setTimestamp(Calendar timestamp)
timestamp
- The timestamp to set.public void setAttribute(String field, Object val)
field
- -
field to setval
- -
value of fieldpublic Object getAttribute(String field)
field
- -
field of which value is desired
public void setAttributeAsString(String field, String val)
field
- -
field to setval
- -
String representation of value of fieldpublic String getAttributeAsString(String field)
field
- -
field of which value is desired
public int compareTo(Object o)
compareTo
in interface Comparable
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |