2023-10-27 17:46:34 +02:00
|
|
|
package eu.eudat.commons.types.descriptiontemplate;
|
2017-11-30 11:10:42 +01:00
|
|
|
|
2024-01-30 15:31:03 +01:00
|
|
|
import jakarta.xml.bind.annotation.*;
|
2017-11-30 11:10:42 +01:00
|
|
|
|
2023-11-03 13:53:10 +01:00
|
|
|
import java.util.ArrayList;
|
2018-02-16 11:34:02 +01:00
|
|
|
import java.util.List;
|
|
|
|
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAccessorType(XmlAccessType.FIELD)
|
2024-02-01 15:58:05 +01:00
|
|
|
public class SectionEntity{
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="id")
|
2018-02-16 11:34:02 +01:00
|
|
|
private String id;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="ordinal")
|
2018-02-16 11:34:02 +01:00
|
|
|
private int ordinal;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="defaultVisibility")
|
2018-02-16 11:34:02 +01:00
|
|
|
private boolean defaultVisibility;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="numbering")
|
2018-10-18 11:34:11 +02:00
|
|
|
private String numbering;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="title")
|
2018-02-16 11:34:02 +01:00
|
|
|
private String title;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="description")
|
2018-02-16 11:34:02 +01:00
|
|
|
private String description;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlAttribute(name="extendedDescription")
|
2018-02-16 11:34:02 +01:00
|
|
|
private String extendedDescription;
|
2024-01-30 15:31:03 +01:00
|
|
|
|
|
|
|
@XmlElementWrapper(name = "sections")
|
|
|
|
@XmlElement(name = "section")
|
2023-10-27 17:46:34 +02:00
|
|
|
private List<SectionEntity> sections;
|
2024-01-30 15:31:03 +01:00
|
|
|
@XmlElementWrapper(name = "fieldSets")
|
|
|
|
@XmlElement(name = "fieldSet")
|
2023-10-27 17:46:34 +02:00
|
|
|
private List<FieldSetEntity> fieldSets;
|
2018-02-16 11:34:02 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2023-10-27 17:46:34 +02:00
|
|
|
public List<SectionEntity> getSections() {
|
2018-02-16 11:34:02 +01:00
|
|
|
return sections;
|
|
|
|
}
|
|
|
|
|
2023-10-27 17:46:34 +02:00
|
|
|
public void setSections(List<SectionEntity> sections) {
|
2018-02-16 11:34:02 +01:00
|
|
|
this.sections = sections;
|
|
|
|
}
|
|
|
|
|
2023-10-27 17:46:34 +02:00
|
|
|
public List<FieldSetEntity> getFieldSets() {
|
2018-02-16 11:34:02 +01:00
|
|
|
return fieldSets;
|
|
|
|
}
|
|
|
|
|
2023-10-27 17:46:34 +02:00
|
|
|
public void setFieldSets(List<FieldSetEntity> fieldSetEntities) {
|
|
|
|
this.fieldSets = fieldSetEntities;
|
2018-02-16 11:34:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public String getExtendedDescription() {
|
|
|
|
return extendedDescription;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setExtendedDescription(String extendedDescription) {
|
|
|
|
this.extendedDescription = extendedDescription;
|
|
|
|
}
|
|
|
|
|
2018-10-18 11:34:11 +02:00
|
|
|
public String getNumbering() {
|
|
|
|
return numbering;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setNumbering(String numbering) {
|
|
|
|
this.numbering = numbering;
|
|
|
|
}
|
|
|
|
|
2024-01-05 17:32:24 +01:00
|
|
|
public List<FieldEntity> getAllField(){
|
2023-11-03 13:53:10 +01:00
|
|
|
List<FieldEntity> fieldEntities = new ArrayList<>();
|
|
|
|
if (this.getFieldSets() != null){
|
|
|
|
for (FieldSetEntity fieldSetEntity: this.getFieldSets()) {
|
2024-01-05 17:32:24 +01:00
|
|
|
fieldEntities.addAll(fieldSetEntity.getAllField());
|
2023-11-03 13:53:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.getSections() != null){
|
|
|
|
for (SectionEntity sectionEntity: this.getSections()) {
|
2024-01-05 17:32:24 +01:00
|
|
|
fieldEntities.addAll(sectionEntity.getAllField());
|
2023-11-03 13:53:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return fieldEntities;
|
|
|
|
}
|
2024-02-01 15:40:11 +01:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2017-11-30 11:10:42 +01:00
|
|
|
}
|