Search in sources :

Example 1 with DefaultSurveyContext

use of org.openforis.idm.metamodel.DefaultSurveyContext in project collect by openforis.

the class ProtostuffSerializationTest method getTestSurvey.

private Survey getTestSurvey() throws IOException, IdmlParseException {
    URL idm = ClassLoader.getSystemResource("test.idm.xml");
    InputStream is = idm.openStream();
    SurveyContext surveyContext = new DefaultSurveyContext();
    SurveyIdmlBinder parser = new SurveyIdmlBinder(surveyContext);
    return parser.unmarshal(is);
}
Also used : InputStream(java.io.InputStream) DefaultSurveyContext(org.openforis.idm.metamodel.DefaultSurveyContext) SurveyIdmlBinder(org.openforis.idm.metamodel.xml.SurveyIdmlBinder) URL(java.net.URL) SurveyContext(org.openforis.idm.metamodel.SurveyContext) DefaultSurveyContext(org.openforis.idm.metamodel.DefaultSurveyContext)

Aggregations

InputStream (java.io.InputStream)1 URL (java.net.URL)1 DefaultSurveyContext (org.openforis.idm.metamodel.DefaultSurveyContext)1 SurveyContext (org.openforis.idm.metamodel.SurveyContext)1 SurveyIdmlBinder (org.openforis.idm.metamodel.xml.SurveyIdmlBinder)1