Class Suppression

    • Method Detail

      • suppressEvent

        public static ValidationEvent suppressEvent​(ValidationEvent validationEvent,
                                                    java.util.List<Suppression> suppressions)

        Applies a list of suppressions to a validation event.

        Suppressions are applied, in order, until the event is marked as suppressed or there are no more suppressions to apply. The list of suppressions is short-circuited as soon as the first suppression suppresses the event.

        Parameters:
        validationEvent - Validation event to suppress if needed.
        suppressions - Ordered list of suppressions to apply.
        Returns:
        Returns the event that is mapped over by the list of suppressions.
      • getReason

        public java.util.Optional<java.lang.String> getReason()
        Returns:
        Returns the optional reason string.
      • getValidatorIds

        public java.util.Set<java.lang.String> getValidatorIds()
        Returns:
        Returns the list of validator IDs.
      • getShapes

        public java.util.Set<ShapeId> getShapes()
        Returns:
        Returns the possibly empty list of shapes to suppress.
      • getNamespaceNames

        public java.util.Set<java.lang.String> getNamespaceNames()
        Returns:
        Returns the namespaces that are suppressed.
      • suppress

        public ValidationEvent suppress​(ValidationEvent event)
        Given an event returns a mapped event that is either the same event or a suppressed version of it.
        Parameters:
        event - Event to map over.
        Returns:
        Returns the suppressed event or the original event.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object