Search in sources :

Example 6 with SurveyIdmlBinder

use of org.openforis.idm.metamodel.xml.SurveyIdmlBinder 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

SurveyIdmlBinder (org.openforis.idm.metamodel.xml.SurveyIdmlBinder)6 InputStream (java.io.InputStream)5 URL (java.net.URL)3 SurveyContext (org.openforis.idm.metamodel.SurveyContext)3 File (java.io.File)1 FileOutputStream (java.io.FileOutputStream)1 StringReader (java.io.StringReader)1 StringWriter (java.io.StringWriter)1 Before (org.junit.Before)1 BeforeClass (org.junit.BeforeClass)1 Test (org.junit.Test)1 CollectTestSurveyContext (org.openforis.collect.model.CollectTestSurveyContext)1 UIOptionsBinder (org.openforis.collect.persistence.xml.UIOptionsBinder)1 DefaultSurveyContext (org.openforis.idm.metamodel.DefaultSurveyContext)1 Survey (org.openforis.idm.metamodel.Survey)1 SurveyMarshaller (org.openforis.idm.metamodel.xml.internal.marshal.SurveyMarshaller)1 TestSurveyContext (org.openforis.idm.model.TestSurveyContext)1