* of type FeatureBean
*/
public void begin(String namespace, String name,
Attributes attributes) throws Exception {
FeatureBean fb = null;
try {
fb = (FeatureBean) digester.peek();
} catch (Exception e) {
throw new IllegalStateException
("No parent FeatureBean on object stack");
}
String lang = attributes.getValue("lang");
if (lang == null) {
lang = attributes.getValue("xml:lang"); // If digester not ns-aware
}
if (lang == null) {
lang = ""; // Avoid NPE errors on sorted map comparisons
}
DisplayNameBean dnb = fb.getDisplayName(lang);
if (dnb == null) {
if (digester.getLogger().isDebugEnabled()) {
digester.getLogger().debug("[DisplayNameRule]{" +
digester.getMatch() +
"} New (" + lang + ")");
}
Class clazz =
digester.getClassLoader().loadClass(CLASS_NAME);
dnb = (DisplayNameBean) clazz.newInstance();
dnb.setLang(lang);
fb.addDisplayName(dnb);
} else {
if (digester.getLogger().isDebugEnabled()) {
digester.getLogger().debug("[DisplayNameRule]{" +
digester.getMatch() +
"} Old (" + lang + ")");