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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLocation(String location)
Adds a location to the listener.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.-
Methods inherited from interface gov.nasa.pds.tools.validate.ProblemHandler
addProblem
-
-
-
-
Method Detail
-
addLocation
void addLocation(String location)
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
boolean hasProblems(String location, boolean includeChildren)
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
ExceptionType getSeverity(String location, boolean includeChildren)
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
Collection<ValidationProblem> getProblemsForLocation(String location, boolean includeChildren)
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
-
-