Search in sources :

Example 26 with SurveyContext

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

SurveyContext (org.openforis.idm.metamodel.SurveyContext)26 ExpressionEvaluator (org.openforis.idm.model.expression.ExpressionEvaluator)9 Survey (org.openforis.idm.metamodel.Survey)8 CodeListService (org.openforis.idm.metamodel.CodeListService)6 InvalidExpressionException (org.openforis.idm.model.expression.InvalidExpressionException)6 EntityDefinition (org.openforis.idm.metamodel.EntityDefinition)5 CollectSurvey (org.openforis.collect.model.CollectSurvey)4 IdmInterpretationError (org.openforis.idm.metamodel.IdmInterpretationError)4 Schema (org.openforis.idm.metamodel.Schema)4 Record (org.openforis.idm.model.Record)4 ArrayList (java.util.ArrayList)3 SurveyIdmlBinder (org.openforis.idm.metamodel.xml.SurveyIdmlBinder)3 Node (org.openforis.idm.model.Node)3 InputStream (java.io.InputStream)2 AttributeDefault (org.openforis.idm.metamodel.AttributeDefault)2 AttributeDefinition (org.openforis.idm.metamodel.AttributeDefinition)2 CodeAttributeDefinition (org.openforis.idm.metamodel.CodeAttributeDefinition)2 CodeListItem (org.openforis.idm.metamodel.CodeListItem)2 NodeDefinition (org.openforis.idm.metamodel.NodeDefinition)2 NumberAttributeDefinition (org.openforis.idm.metamodel.NumberAttributeDefinition)2