} else if (currentValue.indexOf(PREFIX_VALUE+SEPARATOR) != -1) {
newValue = currentValue.replace(PREFIX_VALUE+SEPARATOR, "");
} else if (currentValue.indexOf(PREFIX_VALUE) != -1) {
newValue = currentValue.replace(PREFIX_VALUE, "");
} else {
throw new AddonException("Warning: Classpath Prefix already unconfigured");
}
System.out.println("Classpath prefix is now "+newValue);
attnode.setNodeValue(newValue);
} else {
throw new AddonException("Warning: Classpath Prefix already unconfigured");
}
System.out.println("Saving new domain.xml file");
Transformer t = TransformerFactory.newInstance().newTransformer();
t.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC,
doc.getDoctype().getPublicId());
t.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,
doc.getDoctype().getSystemId());
t.setOutputProperty(OutputKeys.INDENT, "yes");
t.setOutputProperty(OutputKeys.METHOD, "xml");
t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,"no");
t.transform(new DOMSource(doc), new StreamResult(new FileOutputStream(domain)));
} catch (Exception e) {
throw new AddonException(e);
}
}