if (isModel.getTextContent().equalsIgnoreCase("true")) {
return parseModel(root);
}
}
Graphic graphic = factory.getDefaultGraphic();
NodeList children = root.getChildNodes();
final int length = children.getLength();
boolean firstGraphic = true;
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("ExternalGraphic")) {
if (LOGGER.isLoggable(Level.FINEST))
LOGGER.finest("parsing extgraphic " + child);
if (firstGraphic) {
graphic.graphicalSymbols().clear();
firstGraphic = false;
}
graphic.graphicalSymbols().add(parseExternalGraphic(child));
} else if (childName.equalsIgnoreCase("Mark")) {
if (firstGraphic) {
graphic.graphicalSymbols().clear();
firstGraphic = false;
}
graphic.graphicalSymbols().add(parseMark(child));
} else if (childName.equalsIgnoreCase(opacityString)) {
graphic.setOpacity(parseCssParameter(child));
} else if (childName.equalsIgnoreCase("size")) {
graphic.setSize(parseCssParameter(child));
} else if (childName.equalsIgnoreCase("displacement")) {
graphic.setDisplacement(parseDisplacement(child));
} else if (childName.equalsIgnoreCase("rotation")) {
graphic.setRotation(parseCssParameter(child));
}
}
return graphic;
}