* @param reader The XML stream reader to read from.
* @param review The review to add the files to.
*/
private static void parseFiles(XMLStreamReader reader, Review review)
throws XMLStreamException {
Files files = new Files();
boolean endFound = false;
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_ENTRY.equals(elementName)) {
// this is an entry for files
String name = reader.getAttributeValue(null, PropertyConstraints.ATTRIBUTE_NAME);
Files.Entry entry = new Files.Entry();
entry.setName(name);
files.getEntry().add(entry);
}
}
else if (eventType == XMLStreamConstants.END_ELEMENT) {
QName elementQName = reader.getName();