Package org.jibx.runtime.impl

Examples of org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement()


                if (PackageCustom.ELEMENT_NAME.equals(element)) {
                    unmarshalPackage(global, null, ctx);
                } else if (ClassCustom.ELEMENT_NAME.equals(element)) {
                    unmarshalClass(global, null, ctx);
                } else {
                    global.internalAddExtensionChild(ctx.unmarshalElement());
                }
               
            }
            return global;
        }
View Full Code Here


                UnmarshallingContext context =
                    (UnmarshallingContext)fact.createUnmarshallingContext();
               
                // return object unmarshalled using binding for document version
                context.setFromContext(m_context);
                return context.unmarshalElement();
               
            }
        }
       
        // error if unknown version in document
View Full Code Here

            m_holder = new ArrayList();
        }
       
        // process all items present in document
        while (!ctx.isEnd()) {
            Object item = ctx.unmarshalElement();
            m_holder.add(item);
        }
       
        // discard close tag if used
        if (m_name != null) {
View Full Code Here

                        throw new JiBXException("Include file " + path +
                            " not found " + ctx.buildPositionString());
                    }
                   
                    // unmarshal the included document
                    obj = inctx.unmarshalElement();
                    if (obj instanceof Site) {
                        return new Menu((Site)obj, root, access, label);
                    } else if (obj instanceof Menu) {
                        return new Menu((Menu)obj, root, access, label);
                    } else {
View Full Code Here

        // process all entries present in document
        ctx.parsePastStartTag(m_uri, m_name);
        while (ctx.isAt(m_uri, ENTRY_ELEMENT_NAME)) {
            Object key = ctx.attributeText(m_uri, KEY_ATTRIBUTE_NAME, null);
            ctx.parsePastStartTag(m_uri, ENTRY_ELEMENT_NAME);
            Object value = ctx.unmarshalElement();
            map.put(key, value);
            ctx.parsePastEndTag(m_uri, ENTRY_ELEMENT_NAME);
        }
        ctx.parsePastEndTag(m_uri, m_name);
        return map;
View Full Code Here

            m_holder = new ArrayList();
        }
       
        // process all items present in document
        while (!ctx.isEnd()) {
            Object item = ctx.unmarshalElement();
            m_holder.add(item);
        }
       
        // discard close tag if used
        if (m_name != null) {
View Full Code Here

            // check for reference to existing ID
            String id = ctx.attributeText(null, getAttributeName(), null);
            if (id == null) {
               
                // no ID value supplied, unmarshal full definition
                obj = ctx.unmarshalElement();
               
            } else {
               
                // find object based on ID
                obj = ctx.findID(id, 0);
View Full Code Here

        // process all entries present in document
        ctx.parsePastStartTag(m_uri, m_name);
        while (ctx.isAt(m_uri, getEntryElementName())) {
            Object key = ctx.attributeText(m_uri, getKeyAttributeName(), null);
            ctx.parsePastStartTag(m_uri, getEntryElementName());
            Object value = ctx.unmarshalElement();
            map.put(key, value);
            ctx.parsePastEndTag(m_uri, getEntryElementName());
        }
        ctx.parsePastEndTag(m_uri, m_name);
        return map;
View Full Code Here

                UnmarshallingContext context =
                    (UnmarshallingContext)fact.createUnmarshallingContext();
               
                // return object unmarshalled using binding for document version
                context.setFromContext(m_context);
                return context.unmarshalElement();
               
            }
        }
       
        // error if unknown version in document
View Full Code Here

        String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
        ByteArrayInputStream is = new ByteArrayInputStream(out.getBytes("UTF-8"));
        IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
        UnmarshallingContext uctx = (UnmarshallingContext) bfact.createUnmarshallingContext();
        uctx.setDocument(is, null, "UTF-8", false);
        Container container = (Container) uctx.unmarshalElement();
        generateStorageName(container);
        return container;
    }

    public void save() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.