public class DetachedFinding extends java.lang.Object implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CATEGORY_NAME_PROPERTY
The name of the JSON property name for
categoryName . |
protected static java.lang.String |
GROUP_NAME_PROPERTY
The name of the JSON property name for
groupName . |
protected static java.lang.String |
LOCATION_PROPERTY
The name of the JSON property name for
location . |
protected static java.lang.String |
MESSAGE_PROPERTY
The name of the JSON property name for
message . |
Modifier | Constructor and Description |
---|---|
protected |
DetachedFinding(DetachedFinding other)
Copy constructor.
|
|
DetachedFinding(java.lang.String groupName,
java.lang.String categoryName,
java.lang.String message,
ElementLocation location)
Constructor.
|
|
DetachedFinding(java.lang.String groupName,
java.lang.String categoryName,
java.lang.String message,
ElementLocation location,
ETrafficLightColor assessment)
Constructor.
|
|
DetachedFinding(java.lang.String groupName,
java.lang.String categoryName,
java.lang.String message,
ElementLocation location,
ETrafficLightColor assessment,
java.util.Map<java.lang.String,java.lang.Object> findingProperties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSecondaryLocation(ElementLocation location)
Adds a secondary location to this finding.
|
void |
addSecondaryLocations(java.util.Collection<ElementLocation> locations)
Adds the given locations as secondary locations.
|
void |
addSiblingFinding(DetachedFinding sibling)
Adds the given
DetachedFinding to the list of sibling findings. |
void |
addSiblingFindings(java.util.Collection<DetachedFinding> findings)
Adds the given list of locations as sibling findings.
|
void |
addSiblingLocation(ElementLocation location)
Adds all previously unknown locations of sibling findings (already known
locations are skipped).
|
void |
addSiblingLocations(java.util.Collection<ElementLocation> siblingLocations)
Add the given sibling locations
|
ETrafficLightColor |
getAssessment()
Returns assessment.
|
java.lang.String |
getCategoryName()
Get category name.
|
java.lang.String |
getGroupName()
Get group name.
|
ElementLocation |
getLocation()
Get location.
|
java.lang.String |
getLocationString()
Get location string.
|
java.lang.String |
getMessage()
Get message.
|
UnmodifiableMap<java.lang.String,java.lang.Object> |
getProperties()
Returns the properties of this finding.
|
java.util.List<ElementLocation> |
getSecondaryLocations() |
java.util.List<ElementLocation> |
getSiblingLocations()
Returns the locations of sibling findings.
|
java.util.List<StatementPathElement> |
getStatementPath()
Returns the statement path if there is one attached to this finding.
|
boolean |
hasSiblings()
Returns whether this findings has siblings.
|
void |
removeMatchingSiblingLocations(java.util.function.Predicate<? super ElementLocation> filter)
Removes all sibling locations matching the given filter.
|
void |
setAssessment(ETrafficLightColor assessment)
Sets the assessment.
|
void |
setCategoryName(java.lang.String categoryName)
Sets category name.
|
void |
setGroupName(java.lang.String groupName)
Sets group name.
|
void |
setLocation(ElementLocation location)
Sets location.
|
void |
setMessage(java.lang.String message) |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets a property for this finding.
|
void |
setStatementPath(java.util.List<StatementPathElement> path) |
java.lang.String |
toString()
Returns a string representation that contains the, message, the group and and
location hint.
|
protected static final java.lang.String LOCATION_PROPERTY
location
.protected static final java.lang.String GROUP_NAME_PROPERTY
groupName
.protected static final java.lang.String CATEGORY_NAME_PROPERTY
categoryName
.protected static final java.lang.String MESSAGE_PROPERTY
message
.public DetachedFinding(java.lang.String groupName, java.lang.String categoryName, java.lang.String message, ElementLocation location)
public DetachedFinding(java.lang.String groupName, java.lang.String categoryName, java.lang.String message, ElementLocation location, ETrafficLightColor assessment, java.util.Map<java.lang.String,java.lang.Object> findingProperties)
null
.public DetachedFinding(java.lang.String groupName, java.lang.String categoryName, java.lang.String message, ElementLocation location, ETrafficLightColor assessment)
null
protected DetachedFinding(DetachedFinding other)
public java.lang.String getGroupName()
public void setGroupName(java.lang.String groupName)
public java.lang.String getCategoryName()
public void setCategoryName(java.lang.String categoryName)
public ElementLocation getLocation()
public void setLocation(ElementLocation location)
public java.lang.String getLocationString()
public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
public boolean hasSiblings()
public java.util.List<ElementLocation> getSiblingLocations()
public void removeMatchingSiblingLocations(java.util.function.Predicate<? super ElementLocation> filter)
public java.util.List<ElementLocation> getSecondaryLocations()
secondaryLocations
public void addSiblingLocation(ElementLocation location)
public void addSiblingFindings(java.util.Collection<DetachedFinding> findings)
findings
- a collection of DetachedFinding
that will be added as
siblings.public void addSiblingLocations(java.util.Collection<ElementLocation> siblingLocations)
public void addSiblingFinding(DetachedFinding sibling)
DetachedFinding
to the list of sibling findings.public void addSecondaryLocation(ElementLocation location)
public void addSecondaryLocations(java.util.Collection<ElementLocation> locations)
public UnmodifiableMap<java.lang.String,java.lang.Object> getProperties()
public void setProperty(java.lang.String name, java.lang.Object value)
public ETrafficLightColor getAssessment()
public void setAssessment(ETrafficLightColor assessment)
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<StatementPathElement> getStatementPath()
public void setStatementPath(java.util.List<StatementPathElement> path)
getStatementPath()