use of edu.harvard.iq.dataverse.ControlledVocabularyValue in project dataverse by IQSS.
the class DatasetFieldWalker method walk.
public void walk(DatasetField fld, SettingsServiceBean settingsService) {
l.startField(fld);
DatasetFieldType datasetFieldType = fld.getDatasetFieldType();
if (datasetFieldType.isControlledVocabulary()) {
for (ControlledVocabularyValue cvv : sort(fld.getControlledVocabularyValues(), ControlledVocabularyValue.DisplayOrder)) {
l.controledVocabularyValue(cvv);
}
} else if (datasetFieldType.isPrimitive()) {
for (DatasetFieldValue pv : sort(fld.getDatasetFieldValues(), DatasetFieldValue.DisplayOrder)) {
if (settingsService != null && settingsService.isTrueForKey(SettingsServiceBean.Key.ExcludeEmailFromExport, false) && DatasetFieldType.FieldType.EMAIL.equals(pv.getDatasetField().getDatasetFieldType().getFieldType())) {
continue;
}
l.primitiveValue(pv);
}
} else if (datasetFieldType.isCompound()) {
for (DatasetFieldCompoundValue dsfcv : sort(fld.getDatasetFieldCompoundValues(), DatasetFieldCompoundValue.DisplayOrder)) {
l.startCompoundValue(dsfcv);
for (DatasetField dsf : sort(dsfcv.getChildDatasetFields(), DatasetField.DisplayOrder)) {
walk(dsf, settingsService);
}
l.endCompoundValue(dsfcv);
}
}
l.endField(fld);
}
Aggregations