use of org.openforis.idm.transform2.Transformation in project collect by openforis.
the class RelationalTransformer method initDataTableTransformations.
/**
* Recursively init table transformations
* @param defn
*/
private void initDataTableTransformations(EntityDefinition defn) {
List<NodeDefinition> children = defn.getChildDefinitions();
for (NodeDefinition child : children) {
if (child instanceof EntityDefinition) {
initDataTableTransformations((EntityDefinition) child);
}
}
if (defn.isMultiple()) {
Transformation xform = Transformation.createDefaultTransformation(defn);
Path path = (Path) xform.getRowAxis();
dataTransforms.put(path, xform);
System.out.println(path);
}
}
use of org.openforis.idm.transform2.Transformation in project collect by openforis.
the class RelationalTransformer method initDataTableTransformations.
private void initDataTableTransformations() {
this.dataTransforms = new LinkedHashMap<Path, Transformation>();
this.schema = survey.getSchema();
List<EntityDefinition> roots = schema.getRootEntityDefinitions();
for (EntityDefinition root : roots) {
initDataTableTransformations(root);
}
}
use of org.openforis.idm.transform2.Transformation in project collect by openforis.
the class IdmDatabaseSnapshotBuilder method createDataTables.
private void createDataTables() throws DatabaseException {
RelationalTransformer rt = database.getRelationalTransformer();
List<Transformation> xforms = rt.getTransformations();
for (Transformation xform : xforms) {
createDataTable(xform);
}
// List<EntityDefinition> rootDefns = schema.getRootEntityDefinitions();
// for (EntityDefinition defn : rootDefns) {
// createDataTable(defn);
// }
}
Aggregations