Package com.activeviam.copper
Class LevelIdentifier
java.lang.Object
com.activeviam.copper.LevelIdentifier
- All Implemented Interfaces:
Serializable
The identifier of a level in a cube.
- Author:
- ActiveViam
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe level name.final HierarchyIdentifierThe identifier of the hierarchy containing this level. -
Constructor Summary
ConstructorsConstructorDescriptionLevelIdentifier(HierarchyIdentifier hierarchy, String level) Constructor.LevelIdentifier(String dimension, String hierarchy, String level) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic LevelIdentifierfromDescription(@NonNull String description) Parses a description of the form levelName@hierarchyName@dimensionName to create an identifier from it.Gets the hierarchy of the level.inthashCode()static LevelIdentifierCreates an identifier for a level belonging to a simple hierarchy where level, hierarchy and dimension share the same name.Converts this level identifier to a string of the form levelName@hierarchyName@dimensionName to be used in String based descriptions.static StringtoDescription(String dimension, String hierarchy, String level) Converts this level identifier to a string of the form levelName@hierarchyName@dimensionName to be used in String based descriptions.toString()
-
Field Details
-
parent
The identifier of the hierarchy containing this level. -
level
The level name.
-
-
Constructor Details
-
LevelIdentifier
Constructor.- Parameters:
dimension- the dimension namehierarchy- the hierarchy namelevel- the level name
-
LevelIdentifier
Constructor.- Parameters:
hierarchy- the parent hierarchy identifierlevel- the level name
-
-
Method Details
-
simple
Creates an identifier for a level belonging to a simple hierarchy where level, hierarchy and dimension share the same name.- Parameters:
level- name of the level- Returns:
- created identifier
-
getHierarchy
Gets the hierarchy of the level.- Returns:
- the hierarchy of the level
-
toDescription
Converts this level identifier to a string of the form levelName@hierarchyName@dimensionName to be used in String based descriptions.- Returns:
- the levelName@hierarchyName@dimensionName String
-
toDescription
Converts this level identifier to a string of the form levelName@hierarchyName@dimensionName to be used in String based descriptions.- Parameters:
dimension- the dimension namehierarchy- the hierarchy namelevel- the level name- Returns:
- the levelName@hierarchyName@dimensionName String
- See Also:
-
fromDescription
Parses a description of the form levelName@hierarchyName@dimensionName to create an identifier from it.- Parameters:
description- the description to parse, caller should ensure this description is valid, in case of malformed input the returnedLevelIdentifierwill be inconsistent- Returns:
- the identifier extracted from the description
-
toString
-
equals
-
hashCode
public int hashCode()
-