Package gov.nasa.pds.tools.validate
Interface ProblemListener
- All Superinterfaces:
ProblemHandler
- All Known Implementing Classes:
ListenerExceptionPropagator,ProblemContainer
public interface ProblemListener extends ProblemHandler
Defines an interface for receiving problems during the validation.
-
Method Summary
Modifier and Type Method Description voidaddLocation(String location)Adds a location to the listener.intgetErrorCount()Gets the number of error problems encountered.intgetInfoCount()Gets the number of informational problems encountered.Collection<ValidationProblem>getProblemsForLocation(String location, boolean includeChildren)Gets a collection of problems for a given location.ExceptionTypegetSeverity(String location, boolean includeChildren)Gets the maximum severity of problems related to a location.intgetWarningCount()Gets the number of warning problems encountered.booleanhasProblems(String location, boolean includeChildren)Tests whether a target has had problems reported.Methods inherited from interface gov.nasa.pds.tools.validate.ProblemHandler
addProblem
-
Method Details
-
addLocation
Adds a location to the listener.- Parameters:
location- the location of the label being validated.
-
getErrorCount
int getErrorCount()Gets the number of error problems encountered.- Returns:
- the error count
-
getWarningCount
int getWarningCount()Gets the number of warning problems encountered.- Returns:
- the warning count
-
getInfoCount
int getInfoCount()Gets the number of informational problems encountered.- Returns:
- the info count
-
hasProblems
Tests whether a target has had problems reported.- Parameters:
location- the target locationincludeChildren- true, if problems for child locations should be included- Returns:
- true, if problems have been reported
-
getSeverity
Gets the maximum severity of problems related to a location.- Parameters:
location- the target locationincludeChildren- true, if problems in children of the target should be included- Returns:
- the maximum problem severity
-
getProblemsForLocation
Gets a collection of problems for a given location.- Parameters:
location- the target locationincludeChildren- true, if problems for child locations should be included- Returns:
- a collection of problems
-