Style Intelligence v12.0

inetsoft.uql.xmla
Class XMLAQuery

java.lang.Object
  extended by inetsoft.uql.XQuery
      extended by inetsoft.uql.xmla.XMLAQuery
All Implemented Interfaces:
inetsoft.util.XMLSerializable, Serializable, Cloneable

public class XMLAQuery
extends XQuery

XMLAQuery object represents a query for MDX request in XMLA.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class inetsoft.uql.XQuery
DERIVED, HINT_DEFAULT_MAX_ROWS, HINT_IGNORE_MAX_ROWS, HINT_MAX_ROWS, HINT_TIMEOUT
 
Constructor Summary
XMLAQuery()
          Create a query object with the specified type.
 
Method Summary
 void addMeasureRef(DataRef ref)
          Add a measure.
 void addMemberRef(DataRef ref)
          Add a dimension member.
protected  DataRef convertDataRef(DataRef ref)
          Convert data ref for backward compatibility.
 int diffLevel(DataRef ref0, DataRef ref1)
          Calculate the diff of level numbers.
protected  String getAttribute(DataRef ref)
          Get attribute of data ref.
 int getColumnCount()
          Get column count.
 ConditionList getConditionList()
          Get ConditionList.
 String getCube()
          Get cube name.
protected  String getEntity(DataRef ref)
          Get entity of data ref.
 Map getExpandedPaths()
          Get the dimension hierarchy expanded paths.
 XNode getFilterNode()
          Get filter node.
protected  int getLevelCount(inetsoft.uql.xmla.Dimension dim)
          Get suitable level count.
 int getLevelNumber(DataRef ref)
          Get dimension member level number.
 String getMDXDefinition()
          Get MDX String.
 String[] getMDXDefinitions()
          Get MDX String array.
 DataRef getMeasureRef(int index)
          Get data ref of measure.
 int getMeasuresCount()
          Get column count.
 DataRef getMemberRef(int index)
          Get data ref of dimension member.
 DataRef[] getMemberRefs(String dim)
          Get levels DataRef in the same dimension.
 DataRef[] getMemberRefs(String dim, boolean all)
          Get levels DataRef in the same dimension.
protected  List getMembers(String dim, boolean all)
          Get member DataRefs in the same dimension.
 int getMembersCount()
          Get column count.
 XTypeNode getOutputType(Object session, boolean full)
          Get the output type of the query.
 Collection getSelectedDimensions()
          Get selected dimensions on axis.
 XSelection getSelection()
          Get the XSelection object.
 Collection getTouchedDimensions()
          Get touched dimensions in select and where sub clause.
 DataRef getUpperMember(DataRef ref, int offset)
          Get the level above this level in the dimension.
 int indexOfMeasure(String name)
          Get measure index.
 int indexOfMember(DataRef ref)
          Get dimension member index.
protected  boolean isRight(DataRef ref, String name)
          Check if a data ref has the specified name.
protected  void parseAggregateInfo(Element root)
           
 void parseXML(Element root)
          Parse the XML element that contains information on XMLAQuery.
 void setConditionList(ConditionList conds)
          Set ConditionList.
 void setCube(String cube)
          Set cube name.
 void setExpandedPaths(Map expanded)
          Set the dimension hierarchy expanded paths.
 void setFilterNode(XNode where0)
          Set filter node.
 String toString()
          Get the string representation.
protected  void writeAggregateInfo(PrintWriter writer)
           
 void writeXML(PrintWriter writer)
          Generate the XML segment to represent XMLAQuery
 
Methods inherited from class inetsoft.uql.XQuery
addVariable, clone, equals, findVariables, findVariables, findVariables, findVariables, findVariables, getAllDefinedVariables, getDataSource, getDefinedVariables, getDescription, getEstimatedTime, getFolder, getMaxRows, getName, getOutputType, getPartition, getProperty, getTimeout, getType, getVariable, getVariableNames, hashCode, isOutputTypeAvailable, isVisible, removeVariable, revalidate, setDataSource, setDescription, setEstimatedTime, setFolder, setMaxRows, setName, setPartition, setProperty, setTimeout, setVisible, updateQueryVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLAQuery

public XMLAQuery()
Create a query object with the specified type.

Parameters:
type - data source type. One of values defined in XDataSource.
Method Detail

getMDXDefinition

public String getMDXDefinition()
Get MDX String.


getMDXDefinitions

public String[] getMDXDefinitions()
Get MDX String array.


getSelection

public XSelection getSelection()
Get the XSelection object.

Specified by:
getSelection in class XQuery

getOutputType

public XTypeNode getOutputType(Object session,
                               boolean full)
Get the output type of the query. The return value is either the root of a subtree of the a type tree, or a one level tree with each child representing a table column.

Specified by:
getOutputType in class XQuery
Parameters:
session - the session object
full - true to fetch full name

setCube

public void setCube(String cube)
Set cube name.

Parameters:
cube - cube name.

getCube

public String getCube()
Get cube name.

Returns:
cube name.

setFilterNode

public void setFilterNode(XNode where0)
Set filter node.

Parameters:
where - the condition filter node.

getFilterNode

public XNode getFilterNode()
Get filter node.

Returns:
the condition filter node.

getConditionList

public ConditionList getConditionList()
Get ConditionList.

Returns:
condition list;

setConditionList

public void setConditionList(ConditionList conds)
Set ConditionList.

Parameters:
conds - the specified condition list.

getColumnCount

public int getColumnCount()
Get column count.

Returns:
fields count.

getMembersCount

public int getMembersCount()
Get column count.

Returns:
fields count.

getMeasuresCount

public int getMeasuresCount()
Get column count.

Returns:
fields count.

getMemberRef

public DataRef getMemberRef(int index)
Get data ref of dimension member.

Parameters:
index - the column index of expected data ref.
Returns:
expected data ref.

indexOfMember

public int indexOfMember(DataRef ref)
Get dimension member index.

Parameters:
ref - the specified dimension member.
Returns:
the member index.

getSelectedDimensions

public Collection getSelectedDimensions()
Get selected dimensions on axis.

Returns:
dimension unique name(s) if any.

getTouchedDimensions

public Collection getTouchedDimensions()
Get touched dimensions in select and where sub clause.

Returns:
all related dimensions of this query.

getLevelCount

protected int getLevelCount(inetsoft.uql.xmla.Dimension dim)
Get suitable level count.


getMeasureRef

public DataRef getMeasureRef(int index)
Get data ref of measure.

Parameters:
index - the column index of expected measure.
Returns:
expected measure.

indexOfMeasure

public int indexOfMeasure(String name)
Get measure index.

Parameters:
name - measure name.
Returns:
measure index.

isRight

protected boolean isRight(DataRef ref,
                          String name)
Check if a data ref has the specified name.


addMemberRef

public void addMemberRef(DataRef ref)
Add a dimension member.

Parameters:
ref - the specified dimension member dataref.

addMeasureRef

public void addMeasureRef(DataRef ref)
Add a measure.

Parameters:
ref - the specified measure dataref.

getMemberRefs

public DataRef[] getMemberRefs(String dim)
Get levels DataRef in the same dimension.

Parameters:
dim - the specified dimension name.
Returns:
an array of levels DataRef.

getMemberRefs

public DataRef[] getMemberRefs(String dim,
                               boolean all)
Get levels DataRef in the same dimension.

Parameters:
dim - the specified dimension name.
all - true to not ignore duplicate ones.
Returns:
an array of levels DataRef.

getMembers

protected List getMembers(String dim,
                          boolean all)
Get member DataRefs in the same dimension.


getLevelNumber

public int getLevelNumber(DataRef ref)
Get dimension member level number.


getUpperMember

public DataRef getUpperMember(DataRef ref,
                              int offset)
Get the level above this level in the dimension.


diffLevel

public int diffLevel(DataRef ref0,
                     DataRef ref1)
Calculate the diff of level numbers.


setExpandedPaths

public void setExpandedPaths(Map expanded)
Set the dimension hierarchy expanded paths. For example, if the 'State' and 'City' are show, and only 'NJ' is expanded (cities in NJ visible), the map contains: ["State", ["NJ"]]


getExpandedPaths

public Map getExpandedPaths()
Get the dimension hierarchy expanded paths.


toString

public String toString()
Get the string representation.

Overrides:
toString in class XQuery

convertDataRef

protected DataRef convertDataRef(DataRef ref)
Convert data ref for backward compatibility.


getEntity

protected String getEntity(DataRef ref)
Get entity of data ref.


getAttribute

protected String getAttribute(DataRef ref)
Get attribute of data ref.


writeXML

public void writeXML(PrintWriter writer)
Generate the XML segment to represent XMLAQuery

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Overrides:
writeXML in class XQuery

parseXML

public void parseXML(Element root)
              throws Exception
Parse the XML element that contains information on XMLAQuery.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Overrides:
parseXML in class XQuery
Throws:
Exception

writeAggregateInfo

protected void writeAggregateInfo(PrintWriter writer)

parseAggregateInfo

protected void parseAggregateInfo(Element root)

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.