Search in sources :

Example 1 with SurveyContext

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

the class CodeTableDataExtractor method getCodeListService.

private CodeListService getCodeListService(CodeList list) {
    Survey survey = list.getSurvey();
    SurveyContext context = survey.getContext();
    CodeListService codeListService = context.getCodeListService();
    return codeListService;
}
Also used : CollectSurvey(org.openforis.collect.model.CollectSurvey) Survey(org.openforis.idm.metamodel.Survey) CodeListService(org.openforis.idm.metamodel.CodeListService) SurveyContext(org.openforis.idm.metamodel.SurveyContext)

Example 2 with SurveyContext

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

the class CodeTableDataExtractor method getCodeListService.

private CodeListService getCodeListService() {
    CollectSurvey survey = (CollectSurvey) table.getCodeList().getSurvey();
    SurveyContext context = survey.getContext();
    CodeListService codeListService = context.getCodeListService();
    return codeListService;
}
Also used : CodeListService(org.openforis.idm.metamodel.CodeListService) CollectSurvey(org.openforis.collect.model.CollectSurvey) SurveyContext(org.openforis.idm.metamodel.SurveyContext)

Example 3 with SurveyContext

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

the class CodeValueFKColumnValueExtractor method getCodeListService.

private CodeListService getCodeListService(CollectSurvey survey) {
    SurveyContext context = survey.getContext();
    CodeListService codeListService = context.getCodeListService();
    return codeListService;
}
Also used : CodeListService(org.openforis.idm.metamodel.CodeListService) SurveyContext(org.openforis.idm.metamodel.SurveyContext)

Example 4 with SurveyContext

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

the class SurveyUnmarshaller method initSurvey.

protected void initSurvey() {
    SurveyIdmlBinder surveyBinder = getSurveyBinder();
    SurveyContext surveyContext = surveyBinder.getSurveyContext();
    this.survey = surveyContext.createSurvey();
}
Also used : SurveyIdmlBinder(org.openforis.idm.metamodel.xml.SurveyIdmlBinder) SurveyContext(org.openforis.idm.metamodel.SurveyContext)

Example 5 with SurveyContext

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

the class AbsoluteModelPathExpressionTest method iterateExpression.

private List<Node<?>> iterateExpression(String expr, Record record) throws InvalidExpressionException {
    SurveyContext surveyContext = record.getSurveyContext();
    ExpressionEvaluator expressionEvaluator = surveyContext.getExpressionEvaluator();
    return expressionEvaluator.evaluateAbsolutePath(record, expr);
}
Also used : SurveyContext(org.openforis.idm.metamodel.SurveyContext)

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