Interface EssMember

All Superinterfaces:
EssObject
All Known Implementing Classes:
EssMemberImpl

public interface EssMember extends EssObject
  • Method Details

    • getName

      String getName()
      Returns the name of the member.
      Specified by:
      getName in interface EssObject
      Returns:
      the member name
    • getDimensionName

      String getDimensionName()
      The dimension this member belongs to.

      Needed wherever a member has to be expressed as part of a cell rather than on its own - a drill-through POV is keyed by dimension, and a grid knows only the member names it is painting.

      Returns:
      the dimension name
    • getType

      EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getParent

      EssMember getParent()
      Gets the parent member (not implemented yet).
      Returns:
      the parent member, null if none (it's a dimension)
    • getLevel

      int getLevel()
      Gets the level of the member as indicated by the REST API
      Returns:
      the member level
    • isDimension

      boolean isDimension()
      Check if the member is a normal member or a dimension member.
      Returns:
      true if it's a dimension, false if normal member
    • isLeaf

      boolean isLeaf()
      Checks if the member is a leaf node or level 0 (has no children).
      Returns:
      true if level 0, false otherwise
    • getChildren

      List<EssMember> getChildren()
      Gets the children of this member.
      Returns:
      the children of this member or an empty collection if none.
    • getChildCount

      int getChildCount()
      Returns the count of children of this member.
      Returns:
      the number of children
    • getDescendantsCount

      long getDescendantsCount()
      How many members sit below this one, at every level.

      Reported by the outline with the member itself, so it costs nothing - which makes it the way to find out how big a walk would be before starting one. Zero for a leaf, and for a member read from a source that didn't report it.

      Returns:
      the descendant count
    • getLeafDescendants

      List<EssMember> getLeafDescendants()
      Gets the level-0 descendants of this member. There is currently no REST API to do this in one call, so this method works recursively to fetch children of children and so on until the member has been explored.
      Returns:
      the level-0 descendants of this member, or a collection containing just this member if it has no children.
    • getDataStorage

      EssMember.DataStorage getDataStorage()
      How this member's data is held, or EssMember.DataStorage.STORED where the server said nothing - it omits the field entirely for the default rather than naming it, so an absent value is information and not a gap.
      Returns:
      the member's storage, never null
    • getAliases

      Map<String,String> getAliases()
      This member's alias in every alias table the cube has, by table name.

      Free: the server sends all of them with the member itself, so reading one table's alias for a whole outline costs no requests beyond the ones that fetched the members. Established live - Sample.Basic's 100 comes back with six entries, one per table on that cube.

      A table the member has no alias in is present with a null value rather than absent, so the keys are the cube's alias tables whether or not this member uses them. getAlias(String) is the reading that does not care about the difference.

      Returns:
      table name to alias, empty if the server sent none
    • getAlias

      default String getAlias(String aliasTable)
      This member's alias in one table, or null if it has none there.
      Parameters:
      aliasTable - the alias table to read; null or blank means Default
      Returns:
      the alias, or null where the member has none in that table
    • getDimensionStorage

      EssMember.DimensionStorage getDimensionStorage()
      Whether this dimension is dense or sparse.

      Only a standard dimension has one. A member below a dimension, and an attribute dimension, both answer EssMember.DimensionStorage.UNSPECIFIED.

      Returns:
      the dimension's storage, never null
    • getDimensionType

      EssMember.DimensionType getDimensionType()
      The role this dimension plays, or EssMember.DimensionType.NONE for an ordinary one and for any member below a dimension.
      Returns:
      the dimension's type, never null
    • getProperties

      Map<String,Object> getProperties()
      Everything the server said about this member, as it said it.

      The outline viewer returns a different set of fields per member - it omits anything at its default, so a stored member with no formula and no UDAs is described in eight fields and an accounts member with a formula and a time balance in sixteen - which makes an exhaustive model of it a losing game. The typed accessors cover what is worth modelling; this is how a caller reaches consolidation, formula, twoPassCalc, uda and the rest.

      Returns:
      the member's fields, or empty for a member not read from the outline viewer