public List < Categories > getCategories ( final boolean inline ) { final Categories cats = new Categories ( ) ; cats . setFixed ( true ) ; cats . setScheme ( contextURI + "/" + handle + "/" + singular ) ; if ( inline ) { for ( final String catName : catNames ) { final Category cat = new Category ( ) ; cat . setTerm ( catName ) ; cats . addCategory ( cat ) ; } } else { cats . setHref ( getCategoriesURI ( ) ) ; } return Collections . singletonList ( cats ) ; }
Get list of one Categories object containing categories allowed by collection .