}
String name = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_NAME);
String enabled = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_ENABLED);
Phase phase = new Phase();
phase.setName(name);
phase.setEnabled(Boolean.valueOf(enabled));
boolean endFound = false;
// parse out all the Filter elements under the Phase
while (!endFound) {
if (reader.hasNext()) {
int eventType = reader.next();
if (eventType == XMLStreamConstants.START_ELEMENT) {
QName elementQName = reader.getName();
String elementName = elementQName.toString();
if (PropertyConstraints.ELEMENT_FILTER.equals(elementName)) {
name = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_NAME);
String value = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_VALUE);
enabled = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_ENABLED);
Filter filter = new Filter();
filter.setName(name);
filter.setValue(value);
filter.setEnabled(Boolean.valueOf(enabled));
phase.getFilter().add(filter);
}
}
else if (eventType == XMLStreamConstants.END_ELEMENT) {
QName elementQName = reader.getName();