public String getName( String locale ) { LocalizedString locName = getName(); if ( locName == null ) { return getId(); } String name = locName.getLocalizedString( locale ); if ( name == null || name.trim().length() == 0 ) { return getId(); } return name; }
public String getDescription( String locale ) { LocalizedString locDesc = getDescription(); if ( locDesc == null ) { return getId(); } String name = locDesc.getLocalizedString( locale ); if ( name == null || name.trim().length() == 0 ) { return getId(); } return name; }
protected void exportLocalizedPropertiesRecursively( Properties props, IConcept parent, String locale ) { for ( String propName : parent.getChildProperties().keySet() ) { if ( parent.getChildProperty( propName ) instanceof LocalizedString ) { // externalize string String key = stringizeTokens( parent.getUniqueId() ) + ".[" + escapeKey( propName ) + "]"; LocalizedString lstr = (LocalizedString) parent.getChildProperty( propName ); String value = lstr.getLocalizedString( locale ); if ( value == null ) { value = ""; } props.setProperty( key, value ); } } if ( parent.getChildren() != null ) { for ( IConcept child : parent.getChildren() ) { exportLocalizedPropertiesRecursively( props, child, locale ); } } else { if ( logger.isDebugEnabled() ) { logger.debug( "concept " + stringizeTokens( parent.getUniqueId() ) + " does not have children" ); } } }
String desc = description.getLocalizedString( locale ); if ( !StringUtils.isEmpty( desc ) ) { xml.append( " description=\"" ); //$NON-NLS-1$
createDescription( doc, lstr.getLocalizedString( locale ), key, "LocString", locale, idGen, parentTag, idstr, allDescriptions ); //$NON-NLS-1$
if ( ( nameAttr != null ) && ( nameAttr instanceof LocalizedString ) ) { LocalizedString str = (LocalizedString) nameAttr; String name = str.getLocalizedString( locale ); if ( name != null ) { rowElement.addElement( "COLUMN-HDR-ITEM" ).setText( name ); //$NON-NLS-1$