Module dev.metaschema.core
Class ConstraintValidationFinding
java.lang.Object
dev.metaschema.core.model.constraint.ConstraintValidationFinding
- All Implemented Interfaces:
IValidationFinding
Represents an individual constraint validation issue.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImplements a builder pattern for creating constraint findings.Nested classes/interfaces inherited from interface dev.metaschema.core.model.validation.IValidationFinding
IValidationFinding.Kind -
Method Summary
Modifier and TypeMethodDescriptionbuilder(IConstraint constraint, INodeItem node) Construct a new finding builder.builder(List<? extends IConstraint> constraints, INodeItem node) Construct a new finding builder.getCause()Get the exception associated with the finding.List<? extends IConstraint>Get the constraints associated with the finding.Get the document's URI.Get the unique identifier for the finding.getKind()Get the finding type.Get the location in the associated resource associated with the finding.Get the finding message.getNode()Get the context node used to evaluate the constraints.getPath()A format specific path to the finding in the source document.Get the path expression type provided by theIValidationFinding.getPath()method.Get the finding's severity.Get the subjects of the finding, which are resolved by evaluating the constraint target expression.Get the target of the finding.
-
Method Details
-
getIdentifier
Description copied from interface:IValidationFindingGet the unique identifier for the finding.- Specified by:
getIdentifierin interfaceIValidationFinding- Returns:
- the identifier
-
getConstraints
Get the constraints associated with the finding.- Returns:
- the constraints
-
getMessage
Description copied from interface:IValidationFindingGet the finding message.- Specified by:
getMessagein interfaceIValidationFinding- Returns:
- the message or
nullif there is no message
-
getNode
Get the context node used to evaluate the constraints.- Returns:
- the context node
-
getTarget
Get the target of the finding.- Returns:
- the target node
-
getSubjects
Get the subjects of the finding, which are resolved by evaluating the constraint target expression.- Returns:
- the subject nodes
-
getLocation
Description copied from interface:IValidationFindingGet the location in the associated resource associated with the finding.- Specified by:
getLocationin interfaceIValidationFinding- Returns:
- the location or
nullif no location is known
-
getPathKind
Description copied from interface:IValidationFindingGet the path expression type provided by theIValidationFinding.getPath()method.- Specified by:
getPathKindin interfaceIValidationFinding- Returns:
- the path type identifier or
nullif unknown
-
getPath
Description copied from interface:IValidationFindingA format specific path to the finding in the source document.- Specified by:
getPathin interfaceIValidationFinding- Returns:
- the path or
nullif unknown
-
getCause
Description copied from interface:IValidationFindingGet the exception associated with the finding.- Specified by:
getCausein interfaceIValidationFinding- Returns:
- the
Throwableornullif no thowable is associated with the finding
-
getKind
Description copied from interface:IValidationFindingGet the finding type.- Specified by:
getKindin interfaceIValidationFinding- Returns:
- the finding type
-
getSeverity
Description copied from interface:IValidationFindingGet the finding's severity.- Specified by:
getSeverityin interfaceIValidationFinding- Returns:
- the severity
-
getDocumentUri
Description copied from interface:IValidationFindingGet the document's URI.- Specified by:
getDocumentUriin interfaceIValidationFinding- Returns:
- the document's URI or
nullif it is not known
-
builder
@NonNull public static ConstraintValidationFinding.Builder builder(@NonNull List<? extends IConstraint> constraints, @NonNull INodeItem node) Construct a new finding builder.- Parameters:
constraints- the constraints associated with this findingnode- the context node used to evaluate the constraints- Returns:
- a new builder
-
builder
@NonNull public static ConstraintValidationFinding.Builder builder(@NonNull IConstraint constraint, @NonNull INodeItem node) Construct a new finding builder.- Parameters:
constraint- the constraint associated with this findingnode- the context node used to evaluate the constraints- Returns:
- a new builder
-