/* */ {
/* 132 */ if (this.trace) {
/* 133 */ this.log.trace("setParent " + qName + " parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
/* */ }
/* 135 */ TermBinding term = particle.getTerm();
/* 136 */ ValueAdapter valueAdapter = null;
/* 137 */ if (term.isModelGroup())
/* */ {
/* 139 */ QName modelGroupName = ((ModelGroupBinding)term).getQName();
/* 140 */ if (modelGroupName != null)
/* */ {
/* 142 */ qName = modelGroupName;
/* */ }
/* */ }
/* 145 */ else if (term.isElement())
/* */ {
/* 147 */ valueAdapter = ((ElementBinding)term).getValueAdapter();
/* */ }
/* */
/* 150 */ if ((parent != null) && ((parent instanceof ArrayWrapper)))
/* */ {
/* 152 */ ArrayWrapper wrapper = (ArrayWrapper)parent;
/* 153 */ wrapper.add(o);
/* 154 */ wrapper.setChildParticle(particle);
/* 155 */ wrapper.setParentParticle(parentParticle);
/* 156 */ return;
/* */ }
/* */ BeanAdapter beanAdapter;
/* */ BeanAdapter beanAdapter;
/* 160 */ if ((parent instanceof ArrayWrapper))
/* 161 */ beanAdapter = (BeanAdapter)((ArrayWrapper)parent).getParent();
/* */ else
/* 163 */ beanAdapter = (BeanAdapter)parent;
/* 164 */ AbstractPropertyHandler propertyHandler = beanAdapter.getPropertyHandler(qName);
/* 165 */ if (propertyHandler == null)
/* */ {
/* 167 */ AbstractPropertyHandler wildcardHandler = beanAdapter.getWildcardHandler();
/* 168 */ if (wildcardHandler != null)
/* */ {
/* 170 */ if ((o != null) && ((o instanceof ArrayWrapper)))
/* */ {
/* 172 */ ArrayWrapper wrapper = (ArrayWrapper)o;
/* 173 */ wildcardHandler.doHandle(beanAdapter, wrapper, wrapper.getElementName());
/* 174 */ return;
/* */ }
/* */ }
/* 177 */ TermBinding element = term;
/* 178 */ if (element.getSchema().isStrictSchema())
/* */ {
/* 180 */ throw new RuntimeException("QName " + qName + " unknown property parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o) + " available=" + beanAdapter.getAvailable());
/* */ }
/* 182 */ if (this.trace)
/* 183 */ this.log.trace("QName " + qName + " unknown property parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
/* 184 */ return;
/* */ }
/* */ Iterator i$;
/* 187 */ if ((particle.isRepeatable()) && ((propertyHandler instanceof CollectionPropertyHandler)))
/* */ {
/* 191 */ for (i$ = ((Collection)o).iterator(); i$.hasNext(); ) { Object item = i$.next();
/* */
/* 193 */ if (valueAdapter != null)
/* */ {
/* 195 */ item = valueAdapter.cast(item, null);
/* */ }
/* 197 */ propertyHandler.doHandle(beanAdapter, item, qName);
/* */ }
/* */
/* */ }
/* */ else
/* */ {
/* 203 */ if (valueAdapter != null)
/* */ {
/* 205 */ o = valueAdapter.cast(o, null);
/* */ }
/* 207 */ propertyHandler.doHandle(beanAdapter, o, qName);
/* */ }
/* */ }