use of org.activityinfo.server.endpoint.odk.OdkSymbolHandler in project activityinfo by bedatadriven.
the class XFormBuilder method build.
public XForm build(FormClass formClass) {
this.formClass = formClass;
startDateFieldId = field(formClass.getId(), START_DATE_FIELD);
endDateFieldId = field(formClass.getId(), END_DATE_FIELD);
dateFields = Sets.newHashSet(startDateFieldId, endDateFieldId);
locationNameFieldId = field(formClass.getId(), LOCATION_NAME_FIELD);
gpsFieldId = field(formClass.getId(), GPS_FIELD);
fields = createFieldBuilders(formClass);
odkSymbolHandler = new OdkSymbolHandler(fields);
xPathBuilder = new XPathBuilder(odkSymbolHandler);
xform = new XForm();
xform.getHead().setTitle(formClass.getLabel());
xform.getHead().setModel(createModel());
xform.setBody(createBody());
return xform;
}
Aggregations