org.eclipse.actf.visualization.eval.problem

## Class ProblemItemImpl

- java.lang.Object
- - org.eclipse.actf.visualization.eval.problem.ProblemItemImpl

All Implemented Interfaces:
  IProblemItem

    public class ProblemItemImpl
    extends Object
    implements IProblemItem

Default implementation of `IProblemItem`

### Field Summary

### Fields inherited from interface org.eclipse.actf.visualization.eval.problem.IProblemItem

`SEV_ERROR, SEV_INFO, SEV_USER, SEV_WARNING`

### Constructor Summary

Constructors
Constructor and Description
`ProblemItemImpl(String id)` Create new ProblemItemImpl for the evaluation item
`ProblemItemImpl(String id, Node targetNode)` Create new ProblemItemImpl for the evaluation item and set target Node

### Method Summary

Methods
`void` `accept(IProblemItemVisitor visitor)` Accept `IProblemItemVisitor`.
`String` `getDescription()`
`IEvaluationItem` `getEvaluationItem()`
`HighlightTargetId[]` `getHighlightTargetIds()`
`HighlightTargetNodeInfo` `getHighlightTargetNodeInfo()`
`HighlightTargetSourceInfo[]` `getHighlightTargetSoruceInfo()`
`String` `getId()`
`int` `getLine()`
`String` `getLineStr()`
`String` `getLineStrMulti()`
`Image[]` `getMetricsIcons()`
`int[]` `getMetricsScores()`
`int` `getSerialNumber()`
`int` `getSeverity()`
`String` `getSeverityStr()`
`int` `getSubType()`
`String[]` `getTableDataGuideline()`
`Node` `getTargetNode()`
`String` `getTargetString()`
`String` `getTargetStringForExport()`
`boolean` `isCanHighlight()`
`void` `setCanHighlight(boolean canHighlight)` Set if his error position can highlight in visualization result view
`void` `setDescription(String description)` Set description about this problem
`void` `setEvaluationItem(IEvaluationItem checkItem)` Set `IEvaluationItem` relates to this problem
`void` `setHighlightTargetIds(HighlightTargetId targetId)` Set `HighlightTargetId` corresponds to this problem
`void` `setHighlightTargetIds(HighlightTargetId[] targetIds)` Set array of `HighlightTargetId` corresponds to this problem
`void` `setHighlightTargetNodeInfo(HighlightTargetNodeInfo targetNodeInfo)` Set `HighlightTargetNodeInfo`.
`void` `setHighlightTargetSourceInfo(HighlightTargetSourceInfo targetSourceInfo)` Set `HighlightTargetSourceInfo` corresponds to this problem
`void` `setHighlightTargetSourceInfo(HighlightTargetSourceInfo[] targetSourceInfo)` Set array of `HighlightTargetSourceInfo` corresponds to this problem
`void` `setLine(int line)` Set line number of the problem position
`void` `setSerialNumber(int serialNumber)` Set serial number for this problem
`void` `setSubType(int subType)` Set problem sub type
`void` `setTargetNode(Node targetNode)` Set target `Node` of this problem
`void` `setTargetString(String targetString)` Set target String will be embedded into description
`void` `setTargetStringForExport(String targetString)` Set target String will be used to export this problem item

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ProblemItemImpl

    public ProblemItemImpl(String id)

Create new ProblemItemImpl for the evaluation item

Parameters:
  `id` - evaluation item ID
See Also:
  `GuidelineHolder.getEvaluationItem(String)`

#### ProblemItemImpl

    public ProblemItemImpl(String id,
                   Node targetNode)

Create new ProblemItemImpl for the evaluation item and set target Node

Parameters:
  `id` - evaluation item ID
  `targetNode` - target Node
See Also:
  `GuidelineHolder.getEvaluationItem(String)`

### Method Detail

#### getEvaluationItem

    public IEvaluationItem getEvaluationItem()

Specified by:
  `getEvaluationItem` in interface `IProblemItem`
Returns:
  related evaluation item information

#### getId

    public String getId()

Specified by:
  `getId` in interface `IProblemItem`
Returns:
  evaluation item ID

#### getTableDataGuideline

    public String[] getTableDataGuideline()

Specified by:
  `getTableDataGuideline` in interface `IProblemItem`
Returns:
  get related guideline information as String array

#### getMetricsScores

    public int[] getMetricsScores()

Specified by:
  `getMetricsScores` in interface `IProblemItem`
Returns:
  get evaluation metrics scores relate to this problem

#### getMetricsIcons

    public Image[] getMetricsIcons()

Specified by:
  `getMetricsIcons` in interface `IProblemItem`
Returns:
  get icons for evaluation metrics

#### getSeverity

    public int getSeverity()

Specified by:
  `getSeverity` in interface `IProblemItem`
Returns:
  get severity of this problem

#### getSeverityStr

    public String getSeverityStr()

Specified by:
  `getSeverityStr` in interface `IProblemItem`
Returns:
  get severity as String

#### getDescription

    public String getDescription()

Specified by:
  `getDescription` in interface `IProblemItem`
Returns:
  description about the problem

#### getSerialNumber

    public int getSerialNumber()

Specified by:
  `getSerialNumber` in interface `IProblemItem`
Returns:
  serial number

#### getTargetNode

    public Node getTargetNode()

Specified by:
  `getTargetNode` in interface `IProblemItem`
Returns:
  target `Node` of the problem

#### getTargetStringForExport

    public String getTargetStringForExport()

Specified by:
  `getTargetStringForExport` in interface `IProblemItem`
Returns:
  target String will be used to export this problem item

#### isCanHighlight

    public boolean isCanHighlight()

Specified by:
  `isCanHighlight` in interface `IProblemItem`
Returns:
  true if this error position can highlight in visualization result view

#### setCanHighlight

    public void setCanHighlight(boolean canHighlight)

Description copied from interface: `IProblemItem`
Set if his error position can highlight in visualization result view

Specified by:
  `setCanHighlight` in interface `IProblemItem`
Parameters:
  `canHighlight` - true if this error position can highlight in visualization result view

#### setEvaluationItem

    public void setEvaluationItem(IEvaluationItem checkItem)

Description copied from interface: `IProblemItem`
Set `IEvaluationItem` relates to this problem

Specified by:
  `setEvaluationItem` in interface `IProblemItem`

#### setDescription

    public void setDescription(String description)

Description copied from interface: `IProblemItem`
Set description about this problem

Specified by:
  `setDescription` in interface `IProblemItem`

#### setSerialNumber

    public void setSerialNumber(int serialNumber)

Description copied from interface: `IProblemItem`
Set serial number for this problem

Specified by:
  `setSerialNumber` in interface `IProblemItem`
Parameters:
  `serialNumber` - serial number

#### setHighlightTargetIds

    public void setHighlightTargetIds(HighlightTargetId[] targetIds)

Description copied from interface: `IProblemItem`
Set array of `HighlightTargetId` corresponds to this problem

Specified by:
  `setHighlightTargetIds` in interface `IProblemItem`
Parameters:
  `targetIds` - array of target `HighlightTargetId`

#### getHighlightTargetIds

    public HighlightTargetId[] getHighlightTargetIds()

Specified by:
  `getHighlightTargetIds` in interface `IProblemItem`
Returns:
  array of `HighlightTargetId` corresponds to this problem

#### setTargetNode

    public void setTargetNode(Node targetNode)

Description copied from interface: `IProblemItem`
Set target `Node` of this problem

Specified by:
  `setTargetNode` in interface `IProblemItem`
Parameters:
  `targetNode` - target Node

#### setTargetStringForExport

    public void setTargetStringForExport(String targetString)

Description copied from interface: `IProblemItem`
Set target String will be used to export this problem item

Specified by:
  `setTargetStringForExport` in interface `IProblemItem`
Parameters:
  `targetString` - target String

#### getTargetString

    public String getTargetString()

Specified by:
  `getTargetString` in interface `IProblemItem`
Returns:
  target String will be embedded into description

#### setTargetString

    public void setTargetString(String targetString)

Description copied from interface: `IProblemItem`
Set target String will be embedded into description

Specified by:
  `setTargetString` in interface `IProblemItem`
Parameters:
  `targetString` - target String

#### getLine

    public int getLine()

Specified by:
  `getLine` in interface `IProblemItem`
Returns:
  line number of the problem position

#### setLine

    public void setLine(int line)

Description copied from interface: `IProblemItem`
Set line number of the problem position

Specified by:
  `setLine` in interface `IProblemItem`
Parameters:
  `line` - line number

#### getLineStr

    public String getLineStr()

Specified by:
  `getLineStr` in interface `IProblemItem`
Returns:
  line number of the problem position as String

#### getLineStrMulti

    public String getLineStrMulti()

Specified by:
  `getLineStrMulti` in interface `IProblemItem`
Returns:
  related line numbers of the problem as comma separated String

#### setHighlightTargetSourceInfo

    public void setHighlightTargetSourceInfo(HighlightTargetSourceInfo[] targetSourceInfo)

Description copied from interface: `IProblemItem`
Set array of `HighlightTargetSourceInfo` corresponds to this problem

Specified by:
  `setHighlightTargetSourceInfo` in interface `IProblemItem`
Parameters:
  `targetSourceInfo` - array of target `HighlightTargetSourceInfo`

#### getHighlightTargetSoruceInfo

    public HighlightTargetSourceInfo[] getHighlightTargetSoruceInfo()

Specified by:
  `getHighlightTargetSoruceInfo` in interface `IProblemItem`
Returns:
  corresponding `HighlightTargetSourceInfo` of this problem

#### accept

    public void accept(IProblemItemVisitor visitor)

Description copied from interface: `IProblemItem`
Accept `IProblemItemVisitor`. This method can be used to export problem list, filter some problem items, etc.

Specified by:
  `accept` in interface `IProblemItem`
Parameters:
  `visitor` - target `IProblemItemVisitor` to accept

#### getHighlightTargetNodeInfo

    public HighlightTargetNodeInfo getHighlightTargetNodeInfo()

Specified by:
  `getHighlightTargetNodeInfo` in interface `IProblemItem`
Returns:
  corresponding `HighlightTargetNodeInfo` of this problem

#### setHighlightTargetNodeInfo

    public void setHighlightTargetNodeInfo(HighlightTargetNodeInfo targetNodeInfo)

Description copied from interface: `IProblemItem`
Set `HighlightTargetNodeInfo`.

Specified by:
  `setHighlightTargetNodeInfo` in interface `IProblemItem`
Parameters:
  `targetNodeInfo` - target `HighlightTargetNodeInfo`

#### setHighlightTargetIds

    public void setHighlightTargetIds(HighlightTargetId targetId)

Description copied from interface: `IProblemItem`
Set `HighlightTargetId` corresponds to this problem

Specified by:
  `setHighlightTargetIds` in interface `IProblemItem`
Parameters:
  `targetId` - target `HighlightTargetId`

#### setHighlightTargetSourceInfo

    public void setHighlightTargetSourceInfo(HighlightTargetSourceInfo targetSourceInfo)

Description copied from interface: `IProblemItem`
Set `HighlightTargetSourceInfo` corresponds to this problem

Specified by:
  `setHighlightTargetSourceInfo` in interface `IProblemItem`
Parameters:
  `targetSourceInfo` - target `HighlightTargetSourceInfo`

#### getSubType

    public int getSubType()

Specified by:
  `getSubType` in interface `IProblemItem`
Returns:
  sub type of the problem

#### setSubType

    public void setSubType(int subType)

Description copied from interface: `IProblemItem`
Set problem sub type

Specified by:
  `setSubType` in interface `IProblemItem`
Parameters:
  `subType` - problem sub type