Java Code Examples for org.pentaho.aggdes.model.Schema#getDimensions()

The following examples show how to use org.pentaho.aggdes.model.Schema#getDimensions() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RuleBasedAggregateTableOutputFactory.java    From pentaho-aggdesigner with GNU General Public License v2.0 5 votes vote down vote up
private Level findLevel(Schema schema, Attribute attribute) {
    for (Dimension dimension : schema.getDimensions()) {
        for (Hierarchy hierarchy : dimension.getHierarchies()) {
            for (Level level : hierarchy.getLevels()) {
                if (level.getAttribute() == attribute) {
                    return level;
                }
            }
        }
    }
    System.out.println("failed to locate level for attribute " + attribute.getLabel());
    return null;
}
 
Example 2
Source File: MondrianSchemaGenerator.java    From pentaho-aggdesigner with GNU General Public License v2.0 5 votes vote down vote up
private Level findLevel(Schema schema, Attribute attribute) {
    for (Dimension dimension : schema.getDimensions()) {
        for (Hierarchy hierarchy : dimension.getHierarchies()) {
            for (Level level : hierarchy.getLevels()) {
                if (level.getAttribute() == attribute) {
                    return level;
                }
            }
        }
    }
    System.out.println("failed to locate level for attribute " + attribute.getLabel());
    return null;
}