use of org.openforis.idm.model.expression.ExpressionFactory in project collect by openforis.
the class UIOptionsTest method initSurvey.
protected void initSurvey() {
SurveyContext ctx = new CollectSurveyContext(new ExpressionFactory(), new CollectValidator());
survey = (CollectSurvey) ctx.createSurvey();
schema = survey.getSchema();
populateSchema();
initUIOptions();
}
use of org.openforis.idm.model.expression.ExpressionFactory in project collect by openforis.
the class CollectRelationalTest method loadSurvey.
@BeforeClass
public static void loadSurvey() throws IdmlParseException, FileNotFoundException {
InputStream is = ClassLoader.getSystemResourceAsStream("test.idm.xml");
// InputStream is = new FileInputStream("/home/gino/workspace/of/idm/idm-test/src/main/resources/test.idm.xml");
// InputStream is = new FileInputStream("D:/data/workspace/idm/idm-test/src/main/resources/test.idm.xml");
// InputStream is = new FileInputStream("/home/gino/workspace/faofin/tz/naforma-idm/tanzania-naforma.idm.xml");
CollectSurveyContext ctx = new CollectSurveyContext(new ExpressionFactory(), null);
// DefaultSurveyContext ctx = new DefaultSurveyContext();
CollectSurveyIdmlBinder binder = new CollectSurveyIdmlBinder(ctx);
survey = (CollectSurvey) binder.unmarshal(is);
}
Aggregations