Examples of BracketName


Examples of biz.smart.mdx.olap.data.BracketName

    if(cube==null) throw new IllegalArgumentException("Cube cannot be null");
    this.name=cube;
  }
 
  public BracketName getUniqueName(){
    return new BracketName("["+name+"]");
  }
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

    MdxSet<Member<?>> set = hierarchy.getSetBy4LevelValues(valuesMap);
    return (MdxSet<Member<H>>) getSummary(hierarchy, getOrder(set, measure, direction, count), summary);
  }
 
  public static <H extends HShare> MdxSet<Member<H>> getShare(H shareHierarchy, Axis shareAxis){
    BracketName name = shareHierarchy.getMemberExpression(shareHierarchy.getCaption()).getDefinition();
    Member<?> sectionWithMember =
      new Member<H>(shareHierarchy,
          name,
          new ParentShareValueGenerator(shareHierarchy.getCaption(), shareAxis)
      );
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

  private static <H extends Hierarchy> MdxSet<?> getSummary(
      H hierarchy, MdxSet<?> set, SummaryPosition position){
    if(null==position || position==SummaryPosition.NONE)
      return set;
   
    BracketName sumName = hierarchy.getMemberExpression(LABEL_SUMMARY).getDefinition();
    Member<H> sumMember =
      new Member<H>(hierarchy, new Sum<H>(set).getReturn().setName(sumName));
   
    //#doc: 1.2.3-1.2.6
    set = position==SummaryPosition.TOP ?
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

   * @param variableName - e.g. [variable] will be renamed if variableName already exists in MdxQuery
   * @param sectionWithRow - variableName mdx definition
   * @return computed variableName e.g. [alteredVariable]
   */
  private BracketName addSectionWithRow(BracketName variableName, String sectionWithRow) {
    BracketName entryVariableName = variableName;

    if(querySectionWithLines.containsKey(entryVariableName.toString())){
//      throw new IllegalArgumentException("Mdx query section WITH already defines: "+variableName);
      variableName = new BracketName(computeAlterVariableName(variableName, querySectionWithLines.keySet()));
//      sectionWithRow = sectionWithRow.replaceFirst(entryVariableName.toString(), variableName.toString());
      sectionWithRow = sectionWithRow.replaceFirst(Pattern.quote(entryVariableName.toString()), Matcher.quoteReplacement(variableName.toString()));
    }
    querySectionWithLines.put(variableName.toString(), sectionWithRow);
   
    return variableName;
  }
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

   * @param set - Set Name will be used if exists
   * @param orientation
   * @return computed Set Name e.g. [alteredSetName]
   */
  public BracketName addSelection(MdxSet set, Axis orientation) {
    BracketName setName = set.getName();
   
    //TODO: check elements names recursively?
    addSectionWithSetsMembers(set);
   
    if(setName==null)
      addSectionSelectRow(set.toString(), orientation);
    else if(setName!=null){
      setName = addSectionWithSet(setName, set);
      addSectionSelectRow(setName.toString(), orientation);
    }
   
    addHierarchies(set.getHierarchies(), orientation);
   
    return setName;
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

   * @param member - Member Name will be used if exists
   * @param orientation
   * @return computed Member Name e.g. [alteredMemberName]
   */
  public BracketName addSelection(Member<?> member, Axis orientation) {
    BracketName name = member.getName();
   
    if(name==null)
      addSectionSelectRow(member.toString(), orientation);
    else if(name!=null){
      name = addSectionWithMember(name, member);
      addSectionSelectRow(name.toString(), orientation);
    }
    addHierarchy(member.getHierarchy(), orientation);
   
    return name;
 
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

   
    return name;
 
   
  public BracketName addSelection(MdxValueExpression expression, Axis orientation) {
    BracketName name = expression.getName();
   
    if(name==null)
      addSectionSelectRow(expression.toString(), orientation);
    else if(name!=null){
      name = addSectionWithMember(name, expression);
      addSectionSelectRow(name.toString(), orientation);
    }
    addHierarchies(expression.getHierarchies(), orientation);
   
    return name;
 
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

  }
 
  private void addSectionWithSetsMembers(MdxSet<?> set){ 
    if(set!=null)
      for(OLAPNamedStructure element : set.getElements()){
        BracketName elementName=element.getName();
        if(elementName!=null){
          if(element instanceof MdxSet<?>){
            this.addSectionWithSet(elementName, (MdxSet<?>) element);
          }else if(element instanceof Member){
            this.addSectionWithMember(elementName, element);
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

//     *      BDESC)
    MdxSetOrdered<Member> orderedSetToRank = new Order(mdxSetToRank, sortMeasure, direction).getReturn();
    orderedSetToRank = new Head(orderedSetToRank, topCount).getReturn();

    if(orderedSetToRank.getName()==null)
      orderedSetToRank.setName(new BracketName("[OrderedSet]"));
   
   
//     *    MEMBER [Measures].[Rank] AS
//           RANK([Hierarchy].CurrentMember,
//               [OrderedSet])
//       {HEAD([OrderedSet], 10)} ON 1
   
    MdxValueExpression rankingMeasure =
      new Rank(
          orderedSetToRank.getMembersHierarchy().getCurrentMember(),
//          orderedSetToRank.getName())
          orderedSetToRank)
    .getReturn();
   
    //rankName
    //[Measures].[Ranking] !
//    BracketName rankingName = Measures.getInstance().getMemberExpression("Ranking").getDefinition();
    BracketName rankingName = mdxQuery.getMeasure().getMemberExpression("Ranking").getDefinition();
   
    //SELECT
//       {[Measures].[Ranking], [Measures].[MeasureSum]} ON 0,
    mdxQuery.addSelection(orderedSetToRank, axis);
    Member rankingMember= new Member(orderedSetToRank.getMembersHierarchy(),rankingMeasure);
View Full Code Here

Examples of biz.smart.mdx.olap.data.BracketName

    MdxSet<Member<?>> rangeSet = hierarchy.getHierarchyRangeMembers(
        hierarchy.getMemberExpression(computedBounds.getStringFrom()),
        hierarchy.getMemberExpression(computedBounds.getStringTo()));
   
    String rangeSetlabel = "["+bounds.getFrom().toString() + " - " + bounds.getTo().toString()+"]";
    rangeSet.setName(new BracketName(rangeSetlabel));
   
    mdxQuery.addSelection(rangeSet, orientation);
    return mdxQuery;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.