@ XmlTransient public List < PackageMetaData > getAllPackages ( ) { List < PackageMetaData > result = new ArrayList <> ( ) ; if ( packages != null ) { for ( PackageMetaData pack : packages ) { result . addAll ( getPackages ( pack ) ) ; } } return result ; }
recursive method to get all packages including children packages