mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
fixed the imports of the new validation classes
This commit is contained in:
@@ -30,7 +30,6 @@ import ninja.javafx.smartcsv.fx.table.model.ColumnValueProvider;
|
|||||||
import ninja.javafx.smartcsv.validation.checker.*;
|
import ninja.javafx.smartcsv.validation.checker.*;
|
||||||
import ninja.javafx.smartcsv.validation.configuration.Constraints;
|
import ninja.javafx.smartcsv.validation.configuration.Constraints;
|
||||||
import ninja.javafx.smartcsv.validation.configuration.Field;
|
import ninja.javafx.smartcsv.validation.configuration.Field;
|
||||||
import ninja.javafx.smartcsv.validation.configuration.StringFormat;
|
|
||||||
import ninja.javafx.smartcsv.validation.configuration.ValidationConfiguration;
|
import ninja.javafx.smartcsv.validation.configuration.ValidationConfiguration;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -202,6 +201,10 @@ public class Validator {
|
|||||||
if (column.getType() == STRING && column.getFormat().equalsIgnoreCase(BINARY.getExternalValue())) {
|
if (column.getType() == STRING && column.getFormat().equalsIgnoreCase(BINARY.getExternalValue())) {
|
||||||
add(column.getName(), new BinaryValidation());
|
add(column.getName(), new BinaryValidation());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (column.getType() == STRING && column.getFormat() == null) {
|
||||||
|
columnValidationMap.get(column).remove(Validation.Type.STRING);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String groovy = column.getGroovy();
|
String groovy = column.getGroovy();
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ package ninja.javafx.smartcsv.validation.checker;
|
|||||||
import ninja.javafx.smartcsv.validation.ValidationError;
|
import ninja.javafx.smartcsv.validation.ValidationError;
|
||||||
|
|
||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* checks if the value is a base64 encoded string representing binary data
|
* checks if the value is a base64 encoded string representing binary data
|
||||||
@@ -46,6 +45,6 @@ public class BinaryValidation extends EmptyValueIsValid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type getType() {
|
public Type getType() {
|
||||||
return Type.BINARY;
|
return Type.STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,6 @@ public class EmailValidation extends EmptyValueIsValid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type getType() {
|
public Type getType() {
|
||||||
return Type.EMAIL;
|
return Type.STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,6 @@ public class UriValidation extends EmptyValueIsValid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type getType() {
|
public Type getType() {
|
||||||
return Type.URI;
|
return Type.STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ package ninja.javafx.smartcsv.validation.checker;
|
|||||||
|
|
||||||
import ninja.javafx.smartcsv.validation.ValidationError;
|
import ninja.javafx.smartcsv.validation.ValidationError;
|
||||||
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,6 +45,6 @@ public class UuidValidation extends EmptyValueIsValid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type getType() {
|
public Type getType() {
|
||||||
return Type.UUID;
|
return Type.STRING;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import ninja.javafx.smartcsv.validation.ValidationError;
|
|||||||
*/
|
*/
|
||||||
public interface Validation {
|
public interface Validation {
|
||||||
|
|
||||||
enum Type { NOT_EMPTY, UNIQUE, DOUBLE, INTEGER, MIN_LENGTH, MAX_LENGTH, DATE, REGEXP, VALUE_OF, EMAIL, UUID, URI, BINARY, GROOVY }
|
enum Type { NOT_EMPTY, UNIQUE, DOUBLE, INTEGER, MIN_LENGTH, MAX_LENGTH, DATE, REGEXP, VALUE_OF, STRING, GROOVY }
|
||||||
void check(int row, String value, ValidationError error);
|
void check(int row, String value, ValidationError error);
|
||||||
Type getType();
|
Type getType();
|
||||||
boolean canBeChecked(String value);
|
boolean canBeChecked(String value);
|
||||||
|
|||||||
Reference in New Issue
Block a user