private void handleContact() {
final GeoServer gs = wcs.getGeoServer();
String tmp = "";
SettingsInfo settings = gs.getSettings();
ContactInfo contact = settings.getContact();
if (((contact != null) && (contact.getContactPerson() != "")) ||
((contact.getContactOrganization() != null) && (contact.getContactOrganization() != ""))) {
start("wcs:responsibleParty");
tmp = contact.getContactPerson();
if ((tmp != null) && (tmp != "")) {
element("wcs:individualName", tmp);
}
else {
//not optional
element("wcs:individualName", "");
}
tmp = contact.getContactOrganization();
if ((tmp != null) && (tmp != "")) {
element("wcs:organisationName", tmp);
}
tmp = contact.getContactPosition();
if ((tmp != null) && (tmp != "")) {
element("wcs:positionName", tmp);
}
start("wcs:contactInfo");
start("wcs:phone");
tmp = contact.getContactVoice();
if ((tmp != null) && (tmp != "")) {
element("wcs:voice", tmp);
}
tmp = contact.getContactFacsimile();
if ((tmp != null) && (tmp != "")) {
element("wcs:facsimile", tmp);
}
end("wcs:phone");
start("wcs:address");
tmp = contact.getAddressType();
if ((tmp != null) && (tmp != "")) {
String addr = "";
addr = contact.getAddress();
if ((addr != null) && (addr != "")) {
element("wcs:deliveryPoint", tmp + " " + addr);
}
} else {
tmp = contact.getAddress();
if ((tmp != null) && (tmp != "")) {
element("wcs:deliveryPoint", tmp);
}
}
tmp = contact.getAddressCity();
if ((tmp != null) && (tmp != "")) {
element("wcs:city", tmp);
}
tmp = contact.getAddressState();
if ((tmp != null) && (tmp != "")) {
element("wcs:administrativeArea", tmp);
}
tmp = contact.getAddressPostalCode();
if ((tmp != null) && (tmp != "")) {
element("wcs:postalCode", tmp);
}
tmp = contact.getAddressCountry();
if ((tmp != null) && (tmp != "")) {
element("wcs:country", tmp);
}
tmp = contact.getContactEmail();
if ((tmp != null) && (tmp != "")) {
element("wcs:electronicMailAddress", tmp);
}
end("wcs:address");
tmp = contact.getOnlineResource();
if ((tmp != null) && (tmp != "")) {
AttributesImpl attributes = new AttributesImpl();
attributes.addAttribute("", "xlink:href", "xlink:href", "", tmp);
start("wcs:onlineResource", attributes);