Search in sources :

Example 6 with RelationalSchemaGenerator

use of org.openforis.collect.relational.model.RelationalSchemaGenerator 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)

Example 7 with RelationalSchemaGenerator

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

the class MondrianCubeGenerator method generateSchema.

public Schema generateSchema() {
    this.rdbSchema = new RelationalSchemaGenerator(rdbConfig).generateSchema(survey, survey.getName());
    Cube cube = generateCube();
    Schema schema = new Schema(survey.getName());
    schema.cube = cube;
    return schema;
}
Also used : RelationalSchemaGenerator(org.openforis.collect.relational.model.RelationalSchemaGenerator) RelationalSchema(org.openforis.collect.relational.model.RelationalSchema)

Aggregations

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