Search in sources :

Example 6 with RelationalSchema

use of org.openforis.collect.relational.model.RelationalSchema in project collect by openforis.

the class NewMondrianSchemaGenerator method generateRdbSchema.

private RelationalSchema generateRdbSchema() {
    RelationalSchemaGenerator generator = new RelationalSchemaGenerator(rdbConfig);
    RelationalSchema rdbSchema = generator.generateSchema(survey, dbSchemaName);
    return rdbSchema;
}
Also used : RelationalSchemaGenerator(org.openforis.collect.relational.model.RelationalSchemaGenerator) RelationalSchema(org.openforis.collect.relational.model.RelationalSchema)

Example 7 with RelationalSchema

use of org.openforis.collect.relational.model.RelationalSchema in project collect by openforis.

the class RDBReportingRepositories method initializeRelationalSchemaDefinition.

private void initializeRelationalSchemaDefinition(CollectSurvey survey) {
    try {
        RelationalSchemaGenerator schemaGenerator = new RelationalSchemaGenerator(rdbConfig);
        RelationalSchema relationalSchema = schemaGenerator.generateSchema(survey, survey.getName());
        relationalSchemaDefinitionBySurvey.put(survey.getName(), relationalSchema);
    } catch (CollectRdbException e) {
        LOG.error("Error generating relational schema for survey " + survey.getName(), e);
    }
}
Also used : RelationalSchemaGenerator(org.openforis.collect.relational.model.RelationalSchemaGenerator) RelationalSchema(org.openforis.collect.relational.model.RelationalSchema)

Aggregations

RelationalSchema (org.openforis.collect.relational.model.RelationalSchema)7 RelationalSchemaGenerator (org.openforis.collect.relational.model.RelationalSchemaGenerator)5 Connection (java.sql.Connection)2 Test (org.junit.Test)2 CollectSurvey (org.openforis.collect.model.CollectSurvey)2 JooqRelationalSchemaCreator (org.openforis.collect.relational.jooq.JooqRelationalSchemaCreator)2 Table (org.openforis.collect.relational.model.Table)2 IOException (java.io.IOException)1 SQLException (java.sql.SQLException)1 RecordEvent (org.openforis.collect.event.RecordEvent)1 RecordStep (org.openforis.collect.event.RecordStep)1 CollectRecord (org.openforis.collect.model.CollectRecord)1 DataTable (org.openforis.collect.relational.model.DataTable)1 Dataset (org.openforis.collect.relational.model.Dataset)1