use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class SamplingDesignSummariesProxy method getInfoAttributes.
@ExternalizedProperty
public List<String> getInfoAttributes() {
ReferenceDataSchema referenceDataSchema = survey.getReferenceDataSchema();
SamplingPointDefinition samplingPoint = referenceDataSchema == null ? null : referenceDataSchema.getSamplingPointDefinition();
if (samplingPoint == null) {
return Collections.emptyList();
} else {
List<String> result = new ArrayList<String>();
List<ReferenceDataDefinition.Attribute> infoAttributes = samplingPoint.getAttributes(false);
for (ReferenceDataDefinition.Attribute attribute : infoAttributes) {
result.add(attribute.getName());
}
return result;
}
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class DataImportSummaryItemProxy method getWarnings.
@ExternalizedProperty
public List<NodeUnmarshallingErrorProxy> getWarnings() {
List<NodeUnmarshallingError> result = new ArrayList<NodeUnmarshallingError>();
Map<Step, List<NodeUnmarshallingError>> warnings = item.getWarnings();
if (warnings != null) {
Set<Step> steps = warnings.keySet();
for (Step step : steps) {
List<NodeUnmarshallingError> warningsPerStep = warnings.get(step);
result.addAll(warningsPerStep);
}
}
List<NodeUnmarshallingErrorProxy> proxies = NodeUnmarshallingErrorProxy.fromList(result);
return proxies;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class SurveyBackupJobProxy method getOutputFileName.
@ExternalizedProperty
public String getOutputFileName() {
SurveyBackupJob job = (SurveyBackupJob) this.getJob();
File outputFile = job.getOutputFile();
return outputFile == null ? null : outputFile.getAbsolutePath();
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityDefinitionProxy method getDirection.
@ExternalizedProperty
public Direction getDirection() {
CollectSurvey survey = (CollectSurvey) entityDefinition.getSurvey();
UIOptions uiOpts = survey.getUIOptions();
Direction result = uiOpts.getDirection(entityDefinition);
return result;
}
use of org.granite.messaging.amf.io.util.externalizer.annotation.ExternalizedProperty in project collect by openforis.
the class EntityDefinitionProxy method getLayout.
@ExternalizedProperty
public String getLayout() {
CollectSurvey survey = (CollectSurvey) entityDefinition.getSurvey();
UIOptions uiOpts = survey.getUIOptions();
Layout layout = uiOpts.getLayout(entityDefinition);
return layout.name().toLowerCase(Locale.ENGLISH);
}
Aggregations