Methods Summary |
---|
public void | addDescription(DescriptionMetaData dmd)Add a description
descriptions.put(dmd.getLanguage(), dmd);
|
public DescriptionMetaData | getDescription()Get the desription for the default language
or the first description if there is no default
// Try the default locale
DescriptionMetaData dmd = (DescriptionMetaData) descriptions.get(Locale.getDefault().getLanguage());
// No description using the default locale, just use the first
if (dmd == null)
{
for (Iterator i = descriptions.values().iterator(); i.hasNext();)
{
dmd = (DescriptionMetaData) i.next();
break;
}
}
return dmd;
|
public DescriptionMetaData | getDescription(java.lang.String lang)Get the description for the give language
return (DescriptionMetaData) descriptions.get(lang);
|
public java.util.Collection | getDescriptions()Get the descriptions
return descriptions.values();
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("DescriptionMetaDataContainer").append('@");
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[descriptions=").append(descriptions.values());
buffer.append(']");
return buffer.toString();
|