public Collection<QName> keySet() { Set<QName> r = new HashSet<QName>(); for (Entry<V> e : entrySet()) { r.add(e.createQName()); } return r; }
/** * Returns the set of valid root tag names. * For diagnostic use. */ public Set<QName> getValidRootNames() { Set<QName> r = new TreeSet<QName>(QNAME_COMPARATOR); for (QNameMap.Entry e : rootMap.entrySet()) { r.add(e.createQName()); } return r; }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); for( Entry<V> e : entrySet() ) { if(buf.length()>1) buf.append(','); buf.append('['); buf.append(e); buf.append(']'); } buf.append('}'); return buf.toString(); } }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet()) handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc)); if(domHandler!=null) handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc)); }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { final int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) { final JaxBeanInfo beanInfo = n.getValue(); loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv)); } if(isMixed) { // handler for processing mixed contents. loaders.put(TEXT_HANDLER, new ChildLoader(new MixedTextLoader(recv),null)); } if(domHandler!=null) { loaders.put(CATCH_ALL, new ChildLoader(new WildcardLoader(domHandler,wcMode),recv)); } }
/** * Returns the set of valid root tag names. * For diagnostic use. */ public Set<QName> getValidRootNames() { Set<QName> r = new TreeSet<QName>(QNAME_COMPARATOR); for (QNameMap.Entry e : rootMap.entrySet()) { r.add(e.createQName()); } return r; }
public Collection<QName> keySet() { Set<QName> r = new HashSet<QName>(); for (Entry<V> e : entrySet()) { r.add(e.createQName()); } return r; }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); for( Entry<V> e : entrySet() ) { if(buf.length()>1) buf.append(','); buf.append('['); buf.append(e); buf.append(']'); } buf.append('}'); return buf.toString(); } }
/** * Copies all of the mappings from the specified map to this map * These mappings will replace any mappings that * this map had for any of the keys currently in the specified map. * * @param map mappings to be stored in this map. * */ public QNameMap<V> putAll(QNameMap<? extends V> map) { int numKeysToBeAdded = map.size(); if (numKeysToBeAdded == 0) return this; if (numKeysToBeAdded > threshold) { int targetCapacity = numKeysToBeAdded; if (targetCapacity > MAXIMUM_CAPACITY) targetCapacity = MAXIMUM_CAPACITY; int newCapacity = table.length; while (newCapacity < targetCapacity) newCapacity <<= 1; if (newCapacity > table.length) resize(newCapacity); } for( Entry<? extends V> e : map.entrySet() ) put(e.nsUri,e.localName,e.getValue()); return this; }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet()) handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc)); if(domHandler!=null) handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc)); }
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders) { final int offset = chain.allocateOffset(); Receiver recv = new ReceiverImpl(offset); for( QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet() ) { final JaxBeanInfo beanInfo = n.getValue(); loaders.put(n.nsUri,n.localName,new ChildLoader(beanInfo.getLoader(chain.context,true),recv)); } if(isMixed) { // handler for processing mixed contents. loaders.put(TEXT_HANDLER, new ChildLoader(new MixedTextLoader(recv),null)); } if(domHandler!=null) { loaders.put(CATCH_ALL, new ChildLoader(new WildcardLoader(domHandler,wcMode),recv)); } }
public Collection<QName> keySet() { Set<QName> r = new HashSet<QName>(); for (Entry<V> e : entrySet()) { r.add(e.createQName()); } return r; }
/** * Returns the set of valid root tag names. * For diagnostic use. */ public Set<QName> getValidRootNames() { Set<QName> r = new TreeSet<QName>(QNAME_COMPARATOR); for (QNameMap.Entry e : rootMap.entrySet()) { r.add(e.createQName()); } return r; }
public Collection<QName> keySet() { Set<QName> r = new HashSet<QName>(); for (Entry<V> e : entrySet()) { r.add(e.createQName()); } return r; }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); for( Entry<V> e : entrySet() ) { if(buf.length()>1) buf.append(','); buf.append('['); buf.append(e); buf.append(']'); } buf.append('}'); return buf.toString(); } }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append('{'); for( Entry<V> e : entrySet() ) { if(buf.length()>1) buf.append(','); buf.append('['); buf.append(e); buf.append(']'); } buf.append('}'); return buf.toString(); } }
/** * Returns the set of valid root tag names. * For diagnostic use. */ public Set<QName> getValidRootNames() { Set<QName> r = new TreeSet<QName>(QNAME_COMPARATOR); for (QNameMap.Entry e : rootMap.entrySet()) { r.add(e.createQName()); } return r; }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet()) handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc)); if(domHandler!=null) handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc)); }
public void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> handlers) { for (QNameMap.Entry<JaxBeanInfo> n : expectedElements.entrySet()) handlers.put(n.nsUri,n.localName, new ChildLoader(n.getValue().getLoader(chain.context,true),acc)); if(domHandler!=null) handlers.put(CATCH_ALL,new ChildLoader(new WildcardLoader(domHandler,wcMode),acc)); }