return dap;
}
/** Internal parse method - made protected for unit testing */
protected ContrastEnhancement parseContrastEnhancement(Node root) {
ContrastEnhancement symbol = new ContrastEnhancementImpl();
NodeList children = root.getChildNodes();
final int length = children.getLength();
for (int i = 0; i < length; i++) {
Node child = children.item(i);
if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
continue;
}
String childName = child.getLocalName();
if (childName == null) {
childName = child.getNodeName();
}
if (childName.equalsIgnoreCase("Normalize")) {
symbol.setNormalize();
} else if (childName.equalsIgnoreCase("Histogram")) {
symbol.setHistogram();
} else if (childName.equalsIgnoreCase("Logarithmic")) {
symbol.setLogarithmic();
} else if (childName.equalsIgnoreCase("Exponential")) {
symbol.setExponential();
} else if (childName.equalsIgnoreCase("GammaValue")) {
try {
final String gammaString = getFirstChildValue(child);
symbol.setGammaValue(ff.literal(Double
.parseDouble(gammaString)));
} catch (Exception e) {
if (LOGGER.isLoggable(Level.WARNING))
LOGGER.log(Level.WARNING, e.getLocalizedMessage(), e);
}