40 lines
1.0 KiB
Java
40 lines
1.0 KiB
Java
package models.admin.composite;
|
|
|
|
import utilities.builders.ModelBuilder;
|
|
import utilities.helpers.ModelBuilderCollector;
|
|
|
|
import java.util.List;
|
|
|
|
import models.admin.components.datasetprofile.*;
|
|
|
|
public class DatasetProfile {
|
|
private String label;
|
|
private List<Section> sections;
|
|
|
|
public List<Section> getSections() {
|
|
return sections;
|
|
}
|
|
|
|
public void setSections(List<Section> sections) {
|
|
this.sections = sections;
|
|
}
|
|
|
|
public String getLabel() {
|
|
return label;
|
|
}
|
|
|
|
public void setLabel(String label) {
|
|
this.label = label;
|
|
}
|
|
|
|
public void buildProfile(entities.xmlmodels.modeldefinition.FieldGroup fieldGroup,entities.xmlmodels.viewstyledefinition.ViewStyleModel viewStyle){
|
|
this.sections = new ModelBuilder().fromViewStyleDefinition(viewStyle.getSections(), Section.class);
|
|
updateProfile(fieldGroup,viewStyle);
|
|
}
|
|
|
|
private void updateProfile(entities.xmlmodels.modeldefinition.FieldGroup fieldGroup,entities.xmlmodels.viewstyledefinition.ViewStyleModel viewStyle){
|
|
ModelBuilderCollector.mapSections(sections, fieldGroup.getFieldSets());
|
|
}
|
|
|
|
}
|