/** * Returns the hierarchies on a non-filter axis. * * @return List of hierarchies, never null */ private List<Hierarchy> getHierarchiesNonFilter() { final Exp exp = queryAxis.getSet(); if (exp == null) { return Collections.emptyList(); } Type type = exp.getType(); if (type instanceof SetType) { type = ((SetType) type).getElementType(); } final MondrianOlap4jConnection olap4jConnection = cellSetMetaData.olap4jStatement.olap4jConnection; if (type instanceof TupleType) { final TupleType tupleType = (TupleType) type; List<Hierarchy> hierarchyList = new ArrayList<Hierarchy>(); for (Type elementType : tupleType.elementTypes) { hierarchyList.add(olap4jConnection.toOlap4j(elementType.getHierarchy())); } return hierarchyList; } else { return Collections.singletonList((Hierarchy) olap4jConnection.toOlap4j(type.getHierarchy())); } }
public boolean acceptsURL(String url) throws SQLException { return MondrianOlap4jConnection.acceptsURL(url); }
public Connection connect(String url, Properties info) throws SQLException { if (!MondrianOlap4jConnection.acceptsURL(url)) { return null; } return factory.newConnection(this, url, info); }