1 22 package org.jboss.xb.binding.sunday.unmarshalling; 23 24 import javax.xml.namespace.NamespaceContext ; 25 import javax.xml.namespace.QName ; 26 27 import org.jboss.logging.Logger; 28 import org.xml.sax.Attributes ; 29 30 36 public class DefaultWildcardHandler implements ParticleHandler 37 { 38 39 private static final Logger log = Logger.getLogger(DefaultWildcardHandler.class); 40 41 public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs, 42 NamespaceContext nsCtx) 43 { 44 return parent; 45 } 46 47 public Object endParticle(Object o, QName elementName, ParticleBinding particle) 48 { 49 return o; 50 } 51 52 public void setParent(Object parent, Object o, QName elementName, ElementBinding element, 53 ElementBinding parentElement) 54 { 55 if (log.isTraceEnabled()) 56 log.trace("Not setting " + o + " on " + parent + " for " + elementName); 57 } 58 59 public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, 60 ParticleBinding parentParticle) 61 { 62 ElementBinding element = (ElementBinding) particle.getTerm(); 63 ElementBinding parentElement = (ElementBinding) parentParticle.getTerm(); 64 setParent(parent, o, elementName, element, parentElement); 65 } 66 } 67 | Popular Tags |