private void addSubDimension ( final Facets _facets , final DimValue _dimValue , final String _dim , final String _path ) throws IOException { final FacetResult result = _facets . getTopChildren ( 1000 , _dim , _path ) ; if ( result != null ) { LOG . debug ( "FacetResult {}." , result ) ; for ( final LabelAndValue labelValue : result . labelValues ) { final DimValue dimValue = new DimValue ( ) . setLabel ( labelValue . label ) . setValue ( labelValue . value . intValue ( ) ) ; dimValue . setPath ( ArrayUtils . addAll ( _dimValue . getPath ( ) , result . path ) ) ; _dimValue . getChildren ( ) . add ( dimValue ) ; addSubDimension ( _facets , dimValue , _dim , _path + "/" + labelValue . label ) ; } } }
Recursive method to get the sub dimension .