@Override public S3KeyFilter unmarshall(StaxUnmarshallerContext context) throws Exception { int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { targetDepth += 1; } S3KeyFilter filter = new S3KeyFilter(); while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) { return filter; } if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("FilterRule", targetDepth)) { filter.addFilterRule(FilterRuleStaxUnmarshaller.getInstance().unmarshall(context)); } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return filter; } } } }
@Override public S3KeyFilter unmarshall(StaxUnmarshallerContext context) throws Exception { final int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { targetDepth += 1; } final S3KeyFilter filter = new S3KeyFilter(); while (true) { final int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) { break; } else if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("FilterRule", targetDepth)) { filter.addFilterRule(FilterRuleStaxUnmarshaller.getInstance().unmarshall(context)); } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return filter; } } } return filter; }
@Override public S3KeyFilter unmarshall(StaxUnmarshallerContext context) throws Exception { final int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { targetDepth += 1; } final S3KeyFilter filter = new S3KeyFilter(); while (true) { final int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) { break; } else if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("FilterRule", targetDepth)) { filter.addFilterRule(FilterRuleStaxUnmarshaller.getInstance().unmarshall(context)); } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return filter; } } } return filter; }
@Override public S3KeyFilter unmarshall(StaxUnmarshallerContext context) throws Exception { int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) { targetDepth += 1; } S3KeyFilter filter = new S3KeyFilter(); while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) { return filter; } if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("FilterRule", targetDepth)) { filter.addFilterRule(FilterRuleStaxUnmarshaller.getInstance().unmarshall(context)); } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return filter; } } } }