use of org.openforis.idm.metamodel.CalculatedAttributeDefinition.Type in project collect by openforis.
the class CalculatedAttributeDefinitionFormObject method loadFrom.
@Override
public void loadFrom(T source, String languageCode) {
super.loadFrom(source, languageCode);
Type typeEnum = source.getType();
type = typeEnum.name();
formulas = new ArrayList<CalculatedAttributeDefinition.Formula>(source.getFormulas());
CollectSurvey survey = (CollectSurvey) source.getSurvey();
// show in UI
UIOptions uiOptions = survey.getUIOptions();
showInUI = uiOptions.isShownInUI(source);
CollectAnnotations annotations = survey.getAnnotations();
includeInDataExport = annotations.isIncludedInDataExport(source);
}
Aggregations