private static String getLocalizedValues ( final String locale , final List < ? > items ) { val foundLocale = findLocale ( StringUtils . defaultString ( locale , "en" ) , items ) ; if ( foundLocale . isPresent ( ) ) { return foundLocale . get ( ) ; } if ( ! items . isEmpty ( ) ) { val item = items . get ( 0 ) ; var value = StringUtils . EMPTY ; if ( item instanceof LocalizedName ) { value = ( ( LocalizedName ) item ) . getValue ( ) ; } if ( item instanceof LocalizedURI ) { value = ( ( LocalizedURI ) item ) . getValue ( ) ; } if ( item instanceof XSString ) { value = ( ( XSString ) item ) . getValue ( ) ; } LOGGER . trace ( "Loading first available locale [{}]" , value ) ; return value ; } return null ; }
Gets localized values .