com.tonbeller.jpivot.xmla
Class XMLA_Member

java.lang.Object
  extended by com.tonbeller.jpivot.xmla.XMLA_Member
All Implemented Interfaces:
Exp, Decorator, Displayable, Expression, Member, PropertyHolder, Visitable, MDXElement, MDXMember

public class XMLA_Member
extends java.lang.Object
implements Member, MDXMember, Exp

Member Implementation for XMLA


Constructor Summary
XMLA_Member(XMLA_Model model, java.lang.String uName, java.lang.String caption, XMLA_Level lev, boolean isCalculated)
          c'tor
 
Method Summary
 void accept(ExpVisitor visitor)
          Exp is visitable
 void accept(Visitor visitor)
           
 void addProp(Property prop)
          add a property
 void clearProps()
          clear properties
 java.lang.Object clone()
           
 void complete(java.lang.String name, int type, long ordinal, java.lang.String parentUniqueName, long childrenCardinality, long parentLevel, boolean isDataMember, boolean isPlaceHolderMember, java.lang.String key)
          set all attributes, which were not set in the c'tor
 java.lang.String getCaption()
          Returns the caption.
 XMLA_Member[] getChildren()
           
 long getChildrenCardinality()
          Returns the childrenCardinality.
 int getDepth()
          get level number = depth of member
 Dimension getDimension()
          get Dimension of member
 long getDisplayInfo()
           
 Hierarchy getHierarchy()
          get hierarchy of member
 java.lang.String getKey()
          Returns the key.
 java.lang.String getLabel()
          Returns the caption as Label.
 Level getLevel()
          Returns the level.
 java.lang.String getName()
          Returns the name.
 long getOrdinal()
          Returns the ordinal.
 Member getParent()
          Returns the parent.
 long getParentLevel()
          Returns the parentLevel.
 java.lang.String getParentUniqueName()
          Returns the parentUniqueName.
 Property[] getProperties()
          get all properties of this member
 Property getProperty(java.lang.String name)
          get a specific property of this member
 java.lang.Object getRootDecoree()
          returns the object that has been created by the olap server.
 int getRootDistance()
          returns the distance from the root member of the hierarchy.
 int getType()
          Returns the type.
 java.lang.String getUniqueName()
          Returns the uniqueName.
 boolean isAll()
           
 boolean isCalculated()
          Returns the isCalculated.
 boolean isChildOf(Member otherM)
          determine, whether this member is descendant of other member
 boolean isChildrenOk()
           
 boolean isComplete()
          Returns the complete.
 boolean isDataMember()
          Returns the isDataMember.
 boolean isEqual(Member otherM)
           
 boolean isMicrosoft()
           
 boolean isMondrian()
           
 boolean isParentOk()
           
 boolean isPlaceHolderMember()
          Returns the isPlaceHolderMember.
 boolean isPropsOk()
           
 boolean isSAP()
           
 void setChildren(java.util.ArrayList aChildren)
          set list of children.
 void setChildrenOk(boolean b)
           
 void setDisplayInfo(java.lang.String strDisplayInfo)
           
 void setLevel(XMLA_Level level)
          set the Level
 void setParent(XMLA_Member parent)
          Sets the parent.
 void setParentOk(boolean b)
           
 void setPropsOk(boolean b)
           
 java.lang.String toMdx()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLA_Member

public XMLA_Member(XMLA_Model model,
                   java.lang.String uName,
                   java.lang.String caption,
                   XMLA_Level lev,
                   boolean isCalculated)
c'tor

Parameters:
uName -
caption -
levUname -
levelNumber -
hierUName -
lev -
Method Detail

isEqual

public boolean isEqual(Member otherM)
Parameters:
other -
Returns:
boolean

isChildOf

public boolean isChildOf(Member otherM)
                  throws OlapException
determine, whether this member is descendant of other member

Parameters:
other -
Returns:
boolean
Throws:
OlapException

accept

public void accept(Visitor visitor)
Specified by:
accept in interface Visitable
See Also:
Visitable.accept(Visitor)

getRootDecoree

public java.lang.Object getRootDecoree()
Description copied from interface: Decorator
returns the object that has been created by the olap server. If this is part of a decorator chain, unwinds the chain and returns the root of all decorators.

Specified by:
getRootDecoree in interface Decorator

getLabel

public java.lang.String getLabel()
Returns the caption as Label.

Specified by:
getLabel in interface Displayable
Returns:
String

getCaption

public java.lang.String getCaption()
Returns the caption.

Returns:
String

getChildrenCardinality

public long getChildrenCardinality()
Returns the childrenCardinality.

Returns:
int

isDataMember

public boolean isDataMember()
Returns the isDataMember.

Returns:
boolean

isPlaceHolderMember

public boolean isPlaceHolderMember()
Returns the isPlaceHolderMember.

Returns:
boolean

getKey

public java.lang.String getKey()
Returns the key.

Returns:
String

getName

public java.lang.String getName()
Returns the name.

Returns:
String

getOrdinal

public long getOrdinal()
Returns the ordinal.

Returns:
int

getParentLevel

public long getParentLevel()
Returns the parentLevel.

Returns:
int

getType

public int getType()
Returns the type.

Returns:
int

getUniqueName

public java.lang.String getUniqueName()
Returns the uniqueName.

Specified by:
getUniqueName in interface MDXElement
Returns:
String

complete

public void complete(java.lang.String name,
                     int type,
                     long ordinal,
                     java.lang.String parentUniqueName,
                     long childrenCardinality,
                     long parentLevel,
                     boolean isDataMember,
                     boolean isPlaceHolderMember,
                     java.lang.String key)
set all attributes, which were not set in the c'tor

Parameters:
name -
type -
ordinal -
parentUniqueName -
childrenCardinality -
parentLevel -
isDataMember -
isPlaceHolderMember -
key -

getParentUniqueName

public java.lang.String getParentUniqueName()
Returns the parentUniqueName.

Specified by:
getParentUniqueName in interface MDXMember
Returns:
String

getLevel

public Level getLevel()
Returns the level.

Specified by:
getLevel in interface Member
Returns:
XMLA_Level

setLevel

public void setLevel(XMLA_Level level)
set the Level


getProperties

public Property[] getProperties()
Description copied from interface: PropertyHolder
get all properties of this member

Specified by:
getProperties in interface PropertyHolder
See Also:
PropertyHolder.getProperties()

getProperty

public Property getProperty(java.lang.String name)
Description copied from interface: PropertyHolder
get a specific property of this member

Specified by:
getProperty in interface PropertyHolder
See Also:
PropertyHolder.getProperty(String)

getRootDistance

public int getRootDistance()
Description copied from interface: Member
returns the distance from the root member of the hierarchy. This is used to compute indentation.

Specified by:
getRootDistance in interface Member
Returns:
0 for the root member(s), > 0 else
See Also:
Member.getRootDistance()

getDepth

public int getDepth()
get level number = depth of member

Returns:
int

getChildren

public XMLA_Member[] getChildren()
                          throws OlapException
Returns:
XMLA_Member[]
Throws:
OlapException

setChildren

public void setChildren(java.util.ArrayList aChildren)
set list of children.

Parameters:
aNewChildren - List of children to be added

isComplete

public boolean isComplete()
Returns the complete.

Returns:
boolean

getParent

public Member getParent()
                 throws OlapException
Returns the parent.

Specified by:
getParent in interface MDXMember
Returns:
XMLA_Member
Throws:
OlapException

getDimension

public Dimension getDimension()
get Dimension of member

Returns:
dimension

setParent

public void setParent(XMLA_Member parent)
Sets the parent.

Parameters:
parent - The parent to set

getHierarchy

public Hierarchy getHierarchy()
get hierarchy of member

Returns:
Hierarchy

isCalculated

public boolean isCalculated()
Returns the isCalculated.

Specified by:
isCalculated in interface Member
Returns:
boolean

toMdx

public java.lang.String toMdx()
Specified by:
toMdx in interface Exp
Returns:
the unique name

clone

public java.lang.Object clone()
Specified by:
clone in interface Exp
Overrides:
clone in class java.lang.Object
See Also:
probably not needed

addProp

public void addProp(Property prop)
add a property


clearProps

public void clearProps()
clear properties


isPropsOk

public boolean isPropsOk()
Returns:

setPropsOk

public void setPropsOk(boolean b)
Parameters:
b -

isChildrenOk

public boolean isChildrenOk()
Returns:

isParentOk

public boolean isParentOk()
Returns:

setChildrenOk

public void setChildrenOk(boolean b)
Parameters:
b -

setParentOk

public void setParentOk(boolean b)
Parameters:
b -

isSAP

public boolean isSAP()
Returns:
true , if the model is SAP

isMicrosoft

public boolean isMicrosoft()

isMondrian

public boolean isMondrian()

accept

public void accept(ExpVisitor visitor)
Description copied from interface: Exp
Exp is visitable

Specified by:
accept in interface Exp
See Also:
Exp.accept(com.tonbeller.jpivot.olap.mdxparse.ExpVisitor)

getDisplayInfo

public long getDisplayInfo()
Returns:
displayInfo

setDisplayInfo

public void setDisplayInfo(java.lang.String strDisplayInfo)
Parameters:
displayInfo - string

isAll

public boolean isAll()
Specified by:
isAll in interface Member
Returns:
true, if it is an "All" member