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
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @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-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;
|
|
|
|
|
private Map<String, Object> constraints;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Map<String, Object> getConstraints() {
|
|
|
|
|
return constraints;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setConstraints(Map<String, Object> constraints) {
|
|
|
|
|
this.constraints = constraints;
|
|
|
|
|
}
|
|
|
|
|
}
|