{
}
public RegistryObject unmarshal(Element element)
{
Publisher obj = new Publisher();
// Attributes (required)
obj.setPublisherID(element.getAttribute("publisherID"));
obj.setName(element.getAttribute("publisherName"));
String admin = element.getAttribute("admin");
if ((admin != null) && (admin.length() > 0))
obj.setAdminValue(admin);
else
obj.setAdmin(false);
String enabled = element.getAttribute("enabled");
if ((enabled != null) && (enabled.length() > 0))
obj.setEnabledValue(enabled);
else
obj.setAdmin(false);
String emailAddress = element.getAttribute("emailAddress");
if ((emailAddress != null) && (emailAddress.length() > 0))
obj.setEmailAddress(emailAddress);
// maxBusinesses
try {
String attrValue = element.getAttribute("maxBusinesses");
if ((attrValue != null) && (attrValue.length() > 0))
obj.setMaxBusinesses(Integer.parseInt(attrValue));
else
obj.setMaxBusinesses(Config.getMaxBusinessesPerPublisher());
}
catch (Exception ex) {
obj.setMaxBusinesses(
Config.getMaxBusinessesPerPublisher());
}
// maxServicesPerBusiness
try {
String attrValue = element.getAttribute("maxServicesPerBusiness");
if ((attrValue != null) && (attrValue.length() > 0))
obj.setMaxServicesPerBusiness(Integer.parseInt(attrValue));
else
obj.setMaxServicesPerBusiness(Config.getMaxServicesPerBusiness());
}
catch (Exception ex) {
obj.setMaxServicesPerBusiness(
Config.getMaxServicesPerBusiness());
}
// maxBindingsPerService
try {
String attrValue = element.getAttribute("maxBindingsPerService");
if ((attrValue != null) && (attrValue.length() > 0))
obj.setMaxBindingsPerService(Integer.parseInt(attrValue));
else
obj.setMaxBindingsPerService(Config.getMaxBindingsPerService());
}
catch (Exception ex) {
obj.setMaxBindingsPerService(
Config.getMaxBindingsPerService());
}
// maxTModels
try {
String attrValue = element.getAttribute("maxTModels");
if ((attrValue != null) && (attrValue.length() > 0))
obj.setMaxTModels(Integer.parseInt(attrValue));
else
obj.setMaxTModels(Config.getMaxTModelsPerPublisher());
}
catch (Exception ex) {
obj.setMaxTModels(
Config.getMaxTModelsPerPublisher());
}
// Text Node Value
// {none}