* @see org.jibx.runtime.IUnmarshaller#unmarshal(java.lang.Object, org.jibx.runtime.IUnmarshallingContext)
*/
public Object unmarshal(Object obj, IUnmarshallingContext ictx) throws JiBXException {
// make sure we're at the appropriate start tag
UnmarshallingContext ctx = (UnmarshallingContext) ictx;
if (!ctx.isAt(uri, name)) {
ctx.throwStartTagNameError(uri, name);
}
// create new hashmap if needed
OverlapBehaviorInfo overlapBehaviorInfo = (OverlapBehaviorInfo) obj;
if (overlapBehaviorInfo == null) {
overlapBehaviorInfo = new OverlapBehaviorInfo();
}
// process all entries present in document
ctx.parsePastStartTag(uri, name);
boolean found = false;
for (OverlapBehaviorInfoInner inner : OverlapBehaviorInfoInner.values()) {
if (ctx.parseIfStartTag(uri, inner.name())) {
found = true;
overlapBehaviorInfo.setOverlapBehavior(inner);
ctx.parsePastEndTag(uri, inner.name());
break;
}
}
if (!found) {
ctx.throwStartTagException("Unrecognized inner element");
}
ctx.parsePastEndTag(uri, name);
return overlapBehaviorInfo;
}