@Test public void testValidationViolation() { ValidationViolation violation = new ValidationViolation("myid2", ValidationMessageSeverity.DEBUG, "message1", Paths.get("child1"), Paths.get("base1"), "nodepath2", 10, 20, null); Assert.assertEquals("myid2", violation.getValidatorId()); Assert.assertEquals(ValidationMessageSeverity.DEBUG, violation.getSeverity()); Assert.assertEquals("message1", violation.getMessage()); Assert.assertEquals(Paths.get("base1","child1"), violation.getAbsoluteFilePath()); Assert.assertEquals("nodepath2", violation.getNodePath()); Assert.assertEquals(10, violation.getLine()); Assert.assertEquals(20, violation.getColumn()); }
ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t) { super(message.getSeverity(), message.getMessage(), message.getNodePath() != null ? message.getNodePath() : nodePath, message.getFilePath() != null ? message.getFilePath() : filePath, message.getBasePath() != null ? message.getBasePath() : basePath, message.getLine() != 0 ? message.getLine() : line, message.getColumn() != 0 ? message.getColumn() : column, message.getThrowable() != null ? message.getThrowable() : t); this.validatorId = validatorId; }
ValidationViolation extends ValidationMessage { ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t) { super(message.getSeverity(), message.getMessage(), message.getNodePath() != null ? message.getNodePath() : nodePath, message.getFilePath() != null ? message.getFilePath() : filePath, message.getBasePath() != null ? message.getBasePath() : basePath, message.getLine() != 0 ? message.getLine() : line, message.getColumn() != 0 ? message.getColumn() : column, message.getThrowable() != null ? message.getThrowable() : t); this.validatorId = validatorId; } }
ValidationViolation extends ValidationMessage { ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t) { super(message.getSeverity(), message.getMessage(), message.getNodePath() != null ? message.getNodePath() : nodePath, message.getFilePath() != null ? message.getFilePath() : filePath, message.getBasePath() != null ? message.getBasePath() : basePath, message.getLine() != 0 ? message.getLine() : line, message.getColumn() != 0 ? message.getColumn() : column, message.getThrowable() != null ? message.getThrowable() : t); this.validatorId = validatorId; } ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); private  ValidationViolation(String validatorId, ValidationMessage message);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); }
ValidationViolation extends ValidationMessage { ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t) { super(message.getSeverity(), message.getMessage(), message.getNodePath() != null ? message.getNodePath() : nodePath, message.getFilePath() != null ? message.getFilePath() : filePath, message.getBasePath() != null ? message.getBasePath() : basePath, message.getLine() != 0 ? message.getLine() : line, message.getColumn() != 0 ? message.getColumn() : column, message.getThrowable() != null ? message.getThrowable() : t); this.validatorId = validatorId; } ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); private  ValidationViolation(String validatorId, ValidationMessage message);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); static final Collection<ValidationViolation> wrapMessages(String validatorId, Collection<? extends ValidationMessage> messages, Path filePath, Path basePath, String nodePath, int line, int column); static final ValidationViolation wrapMessage(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column); @Nullable Path getAbsoluteFilePath(); @Nullable String getValidatorId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
ValidationViolation extends ValidationMessage { ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t) { super(message.getSeverity(), message.getMessage(), message.getNodePath() != null ? message.getNodePath() : nodePath, message.getFilePath() != null ? message.getFilePath() : filePath, message.getBasePath() != null ? message.getBasePath() : basePath, message.getLine() != 0 ? message.getLine() : line, message.getColumn() != 0 ? message.getColumn() : column, message.getThrowable() != null ? message.getThrowable() : t); this.validatorId = validatorId; } ValidationViolation(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); private  ValidationViolation(String validatorId, ValidationMessage message);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message);  ValidationViolation(@NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t);  ValidationViolation(String validatorId, @NotNull ValidationMessageSeverity severity, @NotNull String message, Path filePath, Path basePath, String nodePath, int line, int column, Throwable t); static final Collection<ValidationViolation> wrapMessages(String validatorId, Collection<? extends ValidationMessage> messages, Path filePath, Path basePath, String nodePath, int line, int column); static final ValidationViolation wrapMessage(String validatorId, ValidationMessage message, Path filePath, Path basePath, String nodePath, int line, int column); @Nullable Path getAbsoluteFilePath(); @Nullable String getValidatorId(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }