org.jembi.sdmxhd.convenience
Class DimensionWrapper
java.lang.Object
org.jembi.sdmxhd.convenience.DimensionWrapper
public class DimensionWrapper
- extends java.lang.Object
- Author:
- Ryan Crichton
This object represents a Dimension with a corresponding codes to simplify
working with Dimensions and Codes. It can also define a Dimension hierarchy.
This is used for hierarchical codelists is SDMX-HD that define a hierarchy
of dimensons.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DimensionWrapper
public DimensionWrapper()
hasChildren
public boolean hasChildren()
getAllCombinationsOfDimensions
public java.util.List<java.util.List<DimensionWrapper>> getAllCombinationsOfDimensions()
- This finds all the combinations of this dimension hierarchy and their
codes. ie. It find all the path through the hierarchy and return the
collection of paths. Each path is a list of DimensionWrappers.
- Returns:
- a list of the possible paths through the hierarchy. Each path
is a list of DimensionWrappers in the correct order.
getAllDimensions
public java.util.List<Dimension> getAllDimensions()
- Gets all dimensions in this DimensionWrapper, even those that are contained
in the children of this DimensionWrapper.
- Returns:
- a list of all the dimensions
getDimension
public Dimension getDimension()
setDimension
public void setDimension(Dimension dimension)
getCode
public Code getCode()
setCode
public void setCode(Code code)
getChildren
public java.util.List<DimensionWrapper> getChildren()
setChildren
public void setChildren(java.util.List<DimensionWrapper> children)