question: protected Granularity generateGranularity ( String granularity , GranularityParser granularityParser ) throws BadApiRequestException { try { return granularityParser . parseGranularity ( granularity ) ; } catch ( GranularityParseException e ) { LOG . error ( UNKNOWN_GRANULARITY . logFormat ( granularity ) , granularity ) ; throw new BadApiRequestException ( e . getMessage ( ) ) ; } }
target:  Generate a Granularity instance based on a path element.