Package org.jibx.runtime

Examples of org.jibx.runtime.IBindingFactory.createUnmarshallingContext()


        IBindingFactory identificationBindingFactory =
                BindingDirectory.getFactory(aClass);

        IUnmarshallingContext unmarshallingContext =
                identificationBindingFactory.createUnmarshallingContext();

        Object unmarshalled = unmarshallingContext.unmarshalDocument(reader,
                null);
        return unmarshalled;
    }
View Full Code Here


        IBindingFactory delegateFactory =
            BindingDirectory.getFactory("metadata", JIBX_FACTORY_CLASS);

        UnmarshallingContext delegateContext =
            (UnmarshallingContext) delegateFactory.createUnmarshallingContext();
        delegateContext.setFromContext(ctx);
        // note that this is not checking that the namespace matches
        final int pos = findIndex(
            delegateFactory.getElementNames(),
            delegateFactory.getElementNamespaces(),
View Full Code Here

        // validate XML
        SAX_BUILDER.build(new StringReader(input));

        // unmarshal XML
        final IBindingFactory bfact = BindingDirectory.getFactory(expectedClass);
        final IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
        return uctx.unmarshalDocument(new StringReader(input));
    }

    protected String marshall(final Object object)
            throws JiBXException, IOException, JDOMException {
View Full Code Here

        IBindingFactory delegateFactory =
            BindingDirectory.getFactory(getTargetBindingName(), getTargetClass());

        UnmarshallingContext delegateContext =
            (UnmarshallingContext) delegateFactory.createUnmarshallingContext();
        delegateContext.setFromContext(ctx);
        // note that this is not checking that the namespace matches
        final int pos = findIndex(
            delegateFactory.getMappedClasses(), getTargetClass().getName());
        if (pos < 0) {
View Full Code Here

    // javadoc inherited
    public ReportingConfig parse(InputStream inputStream) {
        try {
            IBindingFactory bfact = BindingDirectory.getFactory(
                ReportingConfig.class);
            IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

            return (ReportingConfig) uctx.unmarshalDocument(inputStream, null);
        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

         */
        public TestAnonymousMarshallerElement parse(InputStream inputStream) {
            try {
                IBindingFactory bfact = BindingDirectory
                        .getFactory(TestAnonymousMarshallerElement.class);
                IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

                return (TestAnonymousMarshallerElement) uctx.unmarshalDocument(
                        inputStream, null);
            } catch (JiBXException e) {
                throw new RuntimeException(e);
View Full Code Here

         */
        public TestDefaultMarshallerElement parse(InputStream inputStream) {
            try {
                IBindingFactory bfact = BindingDirectory
                        .getFactory(TestDefaultMarshallerElement.class);
                IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

                return (TestDefaultMarshallerElement) uctx.unmarshalDocument(
                        inputStream, null);
            } catch (JiBXException e) {
                throw new RuntimeException(e);
View Full Code Here

            throws JiBXException, IOException {

        Object readObject = null;

        IBindingFactory bfact = BindingDirectory.getFactory(expectedClass);
        IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

        ContentStyle contentStyle = content.getContentStyle();
        if (contentStyle == ContentStyle.BINARY) {
            readObject = uctx.unmarshalDocument(content.getInputStream(), name,
                    null); // null encoding means auto-detect
View Full Code Here

    // javadoc inherited
    public SendRequest readSendRequest(InputStream in) {
        try {
            IBindingFactory factory = BindingDirectory.getFactory(DefaultSendRequest.class);
            IUnmarshallingContext context = factory.createUnmarshallingContext();
            return (SendRequest) context.unmarshalDocument(in, null);

        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

    // javadoc inherited
    public Failures readFailures(InputStream in) {
        try {
            IBindingFactory factory = BindingDirectory.getFactory(DefaultFailures.class);
            IUnmarshallingContext context = factory.createUnmarshallingContext();
            return (Failures) context.unmarshalDocument(in, null);

        } catch (JiBXException e) {
            throw new RuntimeException(e);
        }
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.