@ JsonIgnore public Map < String , Set < String > > getGroupingSpecification ( ) { Map < String , Set < String > > result = new LinkedHashMap <> ( ) ; if ( ! StringUtils . isBlank ( grouping ) ) { String [ ] groups = split ( grouping , ' ' ) ; for ( String group : groups ) { String [ ] groupSpec = split ( group . trim ( ) , ' ' ) ; if ( groupSpec . length != 2 ) throw new ExportRequestGroupingFormatException ( grouping ) ; String groupName = groupSpec [ 0 ] . trim ( ) ; result . put ( groupName , Sets . newLinkedHashSet ( Arrays . asList ( split ( groupSpec [ 1 ] . trim ( ) , ' ' ) ) . stream ( ) . map ( String :: trim ) . collect ( Collectors . toList ( ) ) ) ) ; } } return result ; }
Parses the specification and returns a map of groups x set of types . The map will be empty if no group is defined but never null .