本文整理汇总了Java中org.olap4j.metadata.Hierarchy.getDimension方法的典型用法代码示例。如果您正苦于以下问题:Java Hierarchy.getDimension方法的具体用法?Java Hierarchy.getDimension怎么用?Java Hierarchy.getDimension使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.olap4j.metadata.Hierarchy
的用法示例。
在下文中一共展示了Hierarchy.getDimension方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: outputProperty
import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputProperty(Property property, Catalog catalog, Cube cube, Level level, List<Row> rows) {
Hierarchy hierarchy = level.getHierarchy();
Dimension dimension = hierarchy.getDimension();
String propertyName = property.getName();
Row row = new Row();
row.set(CatalogName.name, catalog.getName());
row.set(CubeName.name, cube.getName());
row.set(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
row.set(PropertyName.name, propertyName);
row.set(PropertyCaption.name, property.getCaption());
// Only member properties now
row.set(PropertyType.name, 1);
row.set(PropertyContentType.name, Property.ContentType.REGULAR.xmlaOrdinal());
XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
row.set(DataType.name, 0);
row.set(PropertyOrigin.name, 1);
String desc = cube.getName() + " Cube - " + getHierarchyName(hierarchy) + " Hierarchy - " + level.getName() + " Level - " + property.getName() + " Property";
row.set(Description.name, desc);
row.set(PropertyCardinality.name, "MANY");
row.set(PropertyAttributeHierarchyName.name, propertyName);
//row.set(PropertyVisibility.name, 1);
row.set(PropertyIsVisible.name, true);
addRow(row, rows);
}
示例2: outputMember
import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputMember(
OlapConnection connection,
Member member,
final Catalog catalog,
Cube cube,
List<Row> rows)
throws SQLException
{
if (!memberNameCond.apply(member)) {
return;
}
if (!memberTypeCond.apply(member)) {
return;
}
getExtra(connection).checkMemberOrdinal(member);
// Check whether the member is visible, otherwise do not dump.
Boolean visible =
(Boolean) member.getPropertyValue(
Property.StandardMemberProperty.$visible);
if (visible == null) {
visible = true;
}
if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
return;
}
final Level level = member.getLevel();
final Hierarchy hierarchy = level.getHierarchy();
final Dimension dimension = hierarchy.getDimension();
int adjustedLevelDepth = level.getDepth();
Row row = new Row();
row.set(CatalogName.name, catalog.getName());
row.set(SchemaName.name, cube.getSchema().getName());
row.set(CubeName.name, cube.getName());
row.set(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
row.set(LevelNumber.name, adjustedLevelDepth);
row.set(MemberOrdinal.name, member.getOrdinal());
row.set(MemberName.name, member.getName());
row.set(MemberUniqueName.name, member.getUniqueName());
row.set(MemberType.name, member.getMemberType().ordinal());
//row.set(MemberGuid.name, "");
row.set(MemberCaption.name, member.getCaption());
row.set(
ChildrenCardinality.name,
member.getPropertyValue(
Property.StandardMemberProperty.CHILDREN_CARDINALITY));
row.set(ChildrenCardinality.name, 100);
if (adjustedLevelDepth == 0) {
row.set(ParentLevel.name, 0);
} else {
row.set(ParentLevel.name, adjustedLevelDepth - 1);
final Member parentMember = member.getParentMember();
if (parentMember != null) {
row.set(
ParentUniqueName.name, parentMember.getUniqueName());
}
}
row.set(ParentCount.name, member.getParentMember() == null ? 0 : 1);
row.set(Depth.name, member.getDepth());
addRow(row, rows);
}
示例3: outputProperty
import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputProperty(
Property property,
Catalog catalog,
Cube cube,
Level level,
List<Row> rows)
{
Hierarchy hierarchy = level.getHierarchy();
Dimension dimension = hierarchy.getDimension();
String propertyName = property.getName();
Row row = new Row();
row.set(CatalogName.name, catalog.getName());
row.set(SchemaName.name, cube.getSchema().getName());
row.set(CubeName.name, cube.getName());
row.set(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
//TODO: what is the correct value here
//row.set(MemberUniqueName.name, "");
row.set(PropertyName.name, propertyName);
// Only member properties now
row.set(
PropertyType.name,
Property.TypeFlag.MEMBER.xmlaOrdinal());
row.set(
PropertyContentType.name,
Property.ContentType.REGULAR.xmlaOrdinal());
row.set(PropertyCaption.name, property.getCaption());
XmlaConstants.DBType dbType = getDBTypeFromProperty(property);
row.set(DataType.name, dbType.xmlaOrdinal());
String desc =
cube.getName() + " Cube - "
+ getHierarchyName(hierarchy) + " Hierarchy - "
+ level.getName() + " Level - "
+ property.getName() + " Property";
row.set(Description.name, desc);
addRow(row, rows);
}
示例4: outputMember
import org.olap4j.metadata.Hierarchy; //导入方法依赖的package包/类
private void outputMember(OlapConnection connection, Member member, final Catalog catalog, Cube cube, List<Row> rows) throws SQLException {
if (!memberNameCond.apply(member)) {
return;
}
if (!memberTypeCond.apply(member)) {
return;
}
getExtra(connection).checkMemberOrdinal(member);
// Check whether the member is visible, otherwise do not dump.
Boolean visible = (Boolean) member.getPropertyValue(Property.StandardMemberProperty.$visible);
if (visible == null) {
visible = true;
}
if (!visible && !XmlaUtil.shouldEmitInvisibleMembers(request)) {
return;
}
final Level level = member.getLevel();
final Hierarchy hierarchy = level.getHierarchy();
final Dimension dimension = hierarchy.getDimension();
int adjustedLevelDepth = level.getDepth();
Row row = new Row();
row.set(CatalogName.name, catalog.getName());
row.set(SchemaName.name, cube.getSchema().getName());
row.set(CubeName.name, cube.getName());
row.set(DimensionUniqueName.name, dimension.getUniqueName());
row.set(HierarchyUniqueName.name, hierarchy.getUniqueName());
row.set(LevelUniqueName.name, level.getUniqueName());
row.set(LevelNumber.name, adjustedLevelDepth);
row.set(MemberOrdinal.name, member.getOrdinal());
row.set(MemberName.name, member.getName());
row.set(MemberUniqueName.name, member.getUniqueName());
row.set(MemberType.name, member.getMemberType().ordinal());
//row.set(MemberGuid.name, "");
row.set(MemberCaption.name, member.getCaption());
row.set(ChildrenCardinality.name, member.getPropertyValue(Property.StandardMemberProperty.CHILDREN_CARDINALITY));
row.set(ChildrenCardinality.name, 100);
if (adjustedLevelDepth == 0) {
row.set(ParentLevel.name, 0);
} else {
row.set(ParentLevel.name, adjustedLevelDepth - 1);
final Member parentMember = member.getParentMember();
if (parentMember != null) {
row.set(ParentUniqueName.name, parentMember.getUniqueName());
}
}
row.set(ParentCount.name, member.getParentMember() == null ? 0 : 1);
row.set(Depth.name, member.getDepth());
row.set(MemberKey.name, member.getCaption());// Member_Key =
// Member_Caption?
row.set(IsPlaceHolderMember.name, false);
row.set(IsDatamember.name, false);
addRow(row, rows);
}