All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mosip.kernel.masterdata.dto.SchemaDto Maven / Gradle / Ivy

There is a newer version: 1.2.1.0
Show newest version
package io.mosip.kernel.masterdata.dto;

import java.util.List;
import java.util.Map;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(onlyExplicitlyIncluded = true)
public class SchemaDto {
	
	@NotBlank
	@Pattern(regexp = "^[a-zA-Z]+$")
	@Size(min = 2, max = 20)
	private String id;
	
	private String description;
	
	@NotEmpty
	private Map label;
	
	@NotBlank
	private String type;
	
	private int minimum;
	private int maximum;
	
	@NotBlank
	private String controlType;
	
	@NotBlank
	private String fieldType;
	private String format;
	
	@NotBlank
	private String fieldCategory;
	private boolean inputRequired;
	private boolean isRequired;	
	private List validators;
	private List bioAttributes;
	private List requiredOn;
	private String subType;
	private String contactType;
	private String group;

	private String alignmentGroup;
	private RequiredOnDto visible;
	
	@EqualsAndHashCode.Include
	public String caseIgnoredId() {
		return this.id.toLowerCase();
	}
	
	public String getSubType() {
		return this.subType == null ? "none" : this.subType; 
	}
}

@Data
class ValidatorDto {
	
	@NotBlank
	private String type;
	
	@NotBlank
	private String validator;
	
	private List arguments;
}

@Data
class RequiredOnDto {	
	@NotBlank
	private String engine;	
	@NotBlank
	private String expr;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy