Examples of unmarshalElement()


Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

           
            // unmarshal document to construct schema structure
            UrlResolver resolver = (UrlResolver)iter.next();
            ictx.setDocument(resolver.getContent(), resolver.getName(), null);
            ictx.setUserContext(m_validationContext);
            Object obj = ictx.unmarshalElement();
           
            // set resolver for use during schema processing
            SchemaElement schema = (SchemaElement)obj;
            schemas[fill++] = schema;
            schema.setResolver(resolver);
View Full Code Here

Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

     */
    protected SchemaElement readSchema(InputStream is, ValidationContext vctx) throws Exception {
        final IUnmarshallingContext ictx = m_bindingFactory.createUnmarshallingContext();
        ictx.setDocument(is, null);
        ictx.setUserContext(vctx);
        SchemaElement schema = (SchemaElement)ictx.unmarshalElement();
        m_nameRegister = schema.getRegister();
        return schema;
    }
   
    /**
 
View Full Code Here

Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

            IBindingFactory fact = BindingDirectory.getFactory(SchemasetCustom.class);
            IUnmarshallingContext ictx = fact.createUnmarshallingContext();
            FileInputStream is = new FileInputStream(path);
            ictx.setDocument(is, null);
            ictx.setUserContext(vctx);
            Object obj = ictx.unmarshalElement();
            if (obj instanceof SchemasetCustom) {
                custom = (SchemasetCustom)obj;
            } else if (obj instanceof SchemaCustom) {
                custom = new SchemasetCustom((SchemaCustom)obj);
            } else {
View Full Code Here

Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

        IUnmarshallingContext ictx =
            m_bindingFactory.createUnmarshallingContext();
        ValidationContext vctx = new ValidationContext();
        ictx.setDocument(is, null);
        ictx.setUserContext(vctx);
        GlobalCustom global = (GlobalCustom)ictx.unmarshalElement();
        List problems = vctx.getProblems();
        if (problems.size() > 0) {
            StringBuffer buff = new StringBuffer();
            for (int i = 0; i < problems.size(); i++) {
                ValidationProblem prob = (ValidationProblem)problems.get(i);
View Full Code Here

Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

                try {
                   
                    // unmarshal document into object
                    IUnmarshallingContext uctx = factory.createUnmarshallingContext();
                    uctx.setDocument(new FileInputStream(file), null);
                    Object object = uctx.unmarshalElement();
                    String encoding = ((UnmarshallingContext)uctx).getInputEncoding();
                   
                    // marshal object back out to document in memory
                    IMarshallingContext mctx = factory.createMarshallingContext();
                    mctx.setIndent(2);
View Full Code Here

Examples of org.jibx.runtime.IUnmarshallingContext.unmarshalElement()

                    getSchemaType().getLocalPart(),
                    true);

            UnmarshallingContext ctx = (UnmarshallingContext) mctx;
            ctx.setDocument(wrapper);
            Object obj = mctx.unmarshalElement();
            return obj;
        }
        catch (JiBXException e)
        {
            throw new XFireRuntimeException("Could not read Jibx type.", e);
View Full Code Here

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

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

                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

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

            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

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

                        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
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.