2016-09-01 00:01:13 +02:00
|
|
|
package ninja.javafx.smartcsv.validation;
|
|
|
|
|
|
2016-09-01 08:12:26 +02:00
|
|
|
import com.google.gson.annotations.SerializedName;
|
|
|
|
|
|
2016-09-01 00:01:13 +02:00
|
|
|
/**
|
|
|
|
|
* @author abi
|
|
|
|
|
*/
|
|
|
|
|
public class FieldConfiguration {
|
|
|
|
|
|
2016-09-01 08:12:26 +02:00
|
|
|
public enum Type {
|
|
|
|
|
@SerializedName("string") STRING,
|
|
|
|
|
@SerializedName("integer") INTEGER,
|
|
|
|
|
@SerializedName("number") NUMBER,
|
|
|
|
|
@SerializedName("date") DATE,
|
|
|
|
|
@SerializedName("datetime") DATETIME,
|
|
|
|
|
@SerializedName("time") TIME
|
2016-09-07 17:27:50 +02:00
|
|
|
// TODO: currently not supported
|
|
|
|
|
// @SerializedName("object") OBJECT,
|
|
|
|
|
// @SerializedName("array") ARRAY,
|
|
|
|
|
// @SerializedName("duration") DURATION,
|
|
|
|
|
// @SerializedName("geopoint") GEOPOINT,
|
|
|
|
|
// @SerializedName("geojson") GEOJSON
|
2016-09-01 08:12:26 +02:00
|
|
|
}
|
|
|
|
|
|
2016-09-01 00:01:13 +02:00
|
|
|
private String name;
|
|
|
|
|
private String title;
|
2016-09-01 08:12:26 +02:00
|
|
|
private Type type;
|
2016-09-01 00:01:13 +02:00
|
|
|
private String description;
|
|
|
|
|
private String format;
|
|
|
|
|
private Object missingValue;
|
2016-09-05 22:49:49 +02:00
|
|
|
private ConstraintsConfiguration constraints;
|
|
|
|
|
private String groovy;
|
|
|
|
|
|
2016-09-01 00:01:13 +02:00
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setName(String name) {
|
|
|
|
|
this.name = name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getTitle() {
|
|
|
|
|
return title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
|
|
|
this.title = title;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-01 08:12:26 +02:00
|
|
|
public Type getType() {
|
2016-09-01 00:01:13 +02:00
|
|
|
return type;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-01 08:12:26 +02:00
|
|
|
public void setType(Type type) {
|
2016-09-01 00:01:13 +02:00
|
|
|
this.type = type;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getDescription() {
|
|
|
|
|
return description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setDescription(String description) {
|
|
|
|
|
this.description = description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getFormat() {
|
|
|
|
|
return format;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setFormat(String format) {
|
|
|
|
|
this.format = format;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Object getMissingValue() {
|
|
|
|
|
return missingValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMissingValue(Object missingValue) {
|
|
|
|
|
this.missingValue = missingValue;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-05 22:49:49 +02:00
|
|
|
public ConstraintsConfiguration getConstraints() {
|
2016-09-01 00:01:13 +02:00
|
|
|
return constraints;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-05 22:49:49 +02:00
|
|
|
public void setConstraints(ConstraintsConfiguration constraints) {
|
2016-09-01 00:01:13 +02:00
|
|
|
this.constraints = constraints;
|
|
|
|
|
}
|
2016-09-05 22:49:49 +02:00
|
|
|
|
|
|
|
|
public String getGroovy() {
|
|
|
|
|
return groovy;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setGroovy(String groovy) {
|
|
|
|
|
this.groovy = groovy;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-01 00:01:13 +02:00
|
|
|
}
|