public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) { super(p, prop, prop.getXmlName(), prop.isCollectionNillable()); for (RuntimeElement e : prop.getElements()) { JaxBeanInfo bi = p.getOrCreate(e); expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi ); } isMixed = prop.isMixed(); if(prop.getWildcard()!=null) { domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler()); wcMode = prop.getWildcard(); } else { domHandler = null; wcMode = null; } }
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); for (RuntimeElement e : prop.getElements()) { expectedElements.put( e.getElementName(), context.getOrCreate(e) ); } if(prop.getWildcard()!=null) { domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler()); wcMode = prop.getWildcard(); } else { domHandler = null; wcMode = null; } }
public ArrayReferenceNodeProperty(JAXBContextImpl p, RuntimeReferencePropertyInfo prop) { super(p, prop, prop.getXmlName(), prop.isCollectionNillable()); for (RuntimeElement e : prop.getElements()) { JaxBeanInfo bi = p.getOrCreate(e); expectedElements.put( e.getElementName().getNamespaceURI(),e.getElementName().getLocalPart(), bi ); } isMixed = prop.isMixed(); if(prop.getWildcard()!=null) { domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler().getWrappered()); wcMode = prop.getWildcard(); } else { domHandler = null; wcMode = null; } }
public SingleReferenceNodeProperty(JAXBContextImpl context, RuntimeReferencePropertyInfo prop) { super(context,prop); acc = prop.getAccessor().optimize(context); for (RuntimeElement e : prop.getElements()) { expectedElements.put( e.getElementName(), context.getOrCreate(e) ); } if(prop.getWildcard()!=null) { domHandler = (DomHandler) ClassFactory.create(prop.getDOMHandler().getWrappered()); wcMode = prop.getWildcard(); } else { domHandler = null; wcMode = null; } }
public <E> void writeDom(E element, DomHandler<E, ?> domHandler, Object parentBean, String fieldName) throws SAXException { Source source = domHandler.marshal(element,this); if(contentHandlerAdapter==null) contentHandlerAdapter = new ContentHandlerAdaptor(this); try { getIdentityTransformer().transform(source,new SAXResult(contentHandlerAdapter)); } catch (TransformerException e) { reportError(fieldName,e); } }
public DomLoader(DomHandler<?, ResultT> dom) { super(true); this.dom = dom; }
public WildcardLoader(DomHandler dom, WildcardMode mode) { this.dom = new DomLoader(dom); this.mode = mode; }