question: public static boolean hasTopCategory ( HttpServletRequest request , String categoryId , List < String > pathElements ) { if ( CategoryWorker . isCategoryTop ( request , categoryId ) ) { return true ; } String topCategoryId = CategoryWorker . getTopCategoryFromTrail ( request , pathElements ) ; if ( topCategoryId != null ) { return true ; } List < String > trail = CategoryWorker . getTrail ( request ) ; topCategoryId = CategoryWorker . getTopCategoryFromTrail ( request , trail ) ; if ( topCategoryId == null ) { return true ; } return false ; }
target:  SCIPIO: Returns true if the given category or any of the path elements is a top-level category.