142 lines
3.7 KiB
Java
142 lines
3.7 KiB
Java
package eu.eudat.commons.types.descriptiontemplate;
|
|
|
|
import jakarta.xml.bind.annotation.*;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
@XmlAccessorType(XmlAccessType.FIELD)
|
|
public class SectionEntity{
|
|
@XmlAttribute(name="id")
|
|
private String id;
|
|
@XmlAttribute(name="ordinal")
|
|
private int ordinal;
|
|
@XmlAttribute(name="defaultVisibility")
|
|
private boolean defaultVisibility;
|
|
@XmlAttribute(name="numbering")
|
|
private String numbering;
|
|
@XmlAttribute(name="title")
|
|
private String title;
|
|
@XmlAttribute(name="description")
|
|
private String description;
|
|
@XmlAttribute(name="extendedDescription")
|
|
private String extendedDescription;
|
|
|
|
@XmlElementWrapper(name = "sections")
|
|
@XmlElement(name = "section")
|
|
private List<SectionEntity> sections;
|
|
@XmlElementWrapper(name = "fieldSets")
|
|
@XmlElement(name = "fieldSet")
|
|
private List<FieldSetEntity> fieldSets;
|
|
@XmlAttribute(name="multiplicity")
|
|
private Boolean multiplicity;
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public int getOrdinal() {
|
|
return ordinal;
|
|
}
|
|
|
|
public void setOrdinal(int ordinal) {
|
|
this.ordinal = ordinal;
|
|
}
|
|
|
|
public boolean isDefaultVisibility() {
|
|
return defaultVisibility;
|
|
}
|
|
|
|
public void setDefaultVisibility(boolean defaultVisibility) {
|
|
this.defaultVisibility = defaultVisibility;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public List<SectionEntity> getSections() {
|
|
return sections;
|
|
}
|
|
|
|
public void setSections(List<SectionEntity> sections) {
|
|
this.sections = sections;
|
|
}
|
|
|
|
public List<FieldSetEntity> getFieldSets() {
|
|
return fieldSets;
|
|
}
|
|
|
|
public void setFieldSets(List<FieldSetEntity> fieldSetEntities) {
|
|
this.fieldSets = fieldSetEntities;
|
|
}
|
|
|
|
public String getExtendedDescription() {
|
|
return extendedDescription;
|
|
}
|
|
|
|
public void setExtendedDescription(String extendedDescription) {
|
|
this.extendedDescription = extendedDescription;
|
|
}
|
|
|
|
public String getNumbering() {
|
|
return numbering;
|
|
}
|
|
|
|
public void setNumbering(String numbering) {
|
|
this.numbering = numbering;
|
|
}
|
|
|
|
public Boolean getMultiplicity() {
|
|
return multiplicity;
|
|
}
|
|
|
|
public void setMultiplicity(Boolean multiplicity) {
|
|
this.multiplicity = multiplicity;
|
|
}
|
|
|
|
public List<FieldEntity> getAllField(){
|
|
List<FieldEntity> fieldEntities = new ArrayList<>();
|
|
if (this.getFieldSets() != null){
|
|
for (FieldSetEntity fieldSetEntity: this.getFieldSets()) {
|
|
fieldEntities.addAll(fieldSetEntity.getAllField());
|
|
}
|
|
}
|
|
if (this.getSections() != null){
|
|
for (SectionEntity sectionEntity: this.getSections()) {
|
|
fieldEntities.addAll(sectionEntity.getAllField());
|
|
}
|
|
}
|
|
return fieldEntities;
|
|
}
|
|
|
|
public List<FieldSetEntity> getAllFieldSets(){
|
|
List<FieldSetEntity> fieldSetEntities = new ArrayList<>();
|
|
if (this.getFieldSets() != null){
|
|
fieldSetEntities.addAll(this.getFieldSets());
|
|
}
|
|
if (this.getSections() != null){
|
|
for (SectionEntity sectionEntity: this.getSections()) {
|
|
fieldSetEntities.addAll(sectionEntity.getAllFieldSets());
|
|
}
|
|
}
|
|
return fieldSetEntities;
|
|
}
|
|
}
|