public class ListenerExceptionPropagator extends Object implements ProblemListener
Constructor and Description |
---|
ListenerExceptionPropagator(ValidateExceptionHandler handler) |
Modifier and Type | Method and Description |
---|---|
void |
addLocation(String location)
Adds a location to the listener.
|
void |
addProblem(LabelException exception)
Indicates another problem during the validation.
|
void |
addProblem(ValidationProblem problem)
Indicates another problem during the validation.
|
int |
getErrorCount()
Gets the number of error problems encountered.
|
int |
getInfoCount()
Gets the number of informational problems encountered.
|
Collection<ValidationProblem> |
getProblemsForLocation(String location,
boolean includeChildren)
Gets a collection of problems for a given location.
|
ExceptionType |
getSeverity(String location,
boolean includeChildren)
Gets the maximum severity of problems related to a location.
|
int |
getWarningCount()
Gets the number of warning problems encountered.
|
boolean |
hasProblems(String location,
boolean includeChildren)
Tests whether a target has had problems reported.
|
void |
printHeader(String title) |
void |
record(String location) |
public ListenerExceptionPropagator(ValidateExceptionHandler handler)
public void addProblem(ValidationProblem problem)
ProblemListener
addProblem
in interface ProblemListener
problem
- the validation problem encounteredpublic void addProblem(LabelException exception)
ProblemListener
addProblem
in interface ProblemListener
exception
- the label exception encountered.public int getErrorCount()
ProblemListener
getErrorCount
in interface ProblemListener
public int getWarningCount()
ProblemListener
getWarningCount
in interface ProblemListener
public int getInfoCount()
ProblemListener
getInfoCount
in interface ProblemListener
public boolean hasProblems(String location, boolean includeChildren)
ProblemListener
hasProblems
in interface ProblemListener
location
- the target locationincludeChildren
- true, if problems for child locations should be includedpublic ExceptionType getSeverity(String location, boolean includeChildren)
ProblemListener
getSeverity
in interface ProblemListener
location
- the target locationincludeChildren
- true, if problems in children of the target should be includedpublic Collection<ValidationProblem> getProblemsForLocation(String location, boolean includeChildren)
ProblemListener
getProblemsForLocation
in interface ProblemListener
location
- the target locationincludeChildren
- true, if problems for child locations should be includedpublic void addLocation(String location)
ProblemListener
addLocation
in interface ProblemListener
location
- the location of the label being validated.public void record(String location)
public void printHeader(String title)
Copyright © 2010–2018 Planetary Data System. All rights reserved.