Package org.apache.uima.fit.validation
Class Validator.Builder
java.lang.Object
org.apache.uima.fit.validation.Validator.Builder
- Enclosing class:
- Validator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
excludingByName
(String... className) Skip any checks with the given names.excludingByPattern
(String... patterns) Skip any checks with names matching the given regular expressions.excludingByType
(Class<?>... types) Skips any checks of the given types (includes checks that are subclasses or implementations of the given types).includingByName
(String... className) Retain only checks with the given names.includingByPattern
(String... patterns) Retain any checks with names matching the given regular expressions.includingByType
(Class<?>... types) Retain any checks of the given types (includes checks that are subclasses or implementations of the given types).Enable auto-detection of checks (the default behavior).withCheck
(CasValidationCheck check) Add the given check instance to the validator.Disable auto-detection of checks.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withCheck
Add the given check instance to the validator. This allows even adding checks which are not available via the Java Service Locator, which take parameters or which are otherwise stateful (assuming that the resulting validator is not shared between threads).Note: Includes/excludes do also apply do checks added via this method.
- Parameters:
check
- a check instance to use.
-
withoutAutoDetectedChecks
Disable auto-detection of checks. -
withAutoDetectedChecks
Enable auto-detection of checks (the default behavior). -
excludingByName
Skip any checks with the given names. Subtypes of the given classes are not skipped.Note: Excludes are applied after includes.
- Parameters:
className
- names of check classes to be excluded.
-
excludingByPattern
Skip any checks with names matching the given regular expressions.Note: Excludes are applied after includes.
- Parameters:
patterns
- regular expressions matching check class names to be excluded.
-
excludingByType
Skips any checks of the given types (includes checks that are subclasses or implementations of the given types).Note: Excludes are applied after includes.
- Parameters:
types
- check type names to be excluded.
-
includingByName
Retain only checks with the given names. Subtypes of the given classes are not retained.Note: Excludes are applied after includes.
- Parameters:
className
- names of check classes to be included.
-
includingByPattern
Retain any checks with names matching the given regular expressions.Note: Excludes are applied after includes.
- Parameters:
patterns
- regular expressions matching check class names to be included.
-
includingByType
Retain any checks of the given types (includes checks that are subclasses or implementations of the given types).Note: Excludes are applied after includes.
- Parameters:
types
- check type names to be included.
-
build
-