Package org.jibx.runtime

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


    */
   public ConfigurationManager(InputStream inputStream) throws Exception
   {
      IBindingFactory bfact = BindingDirectory.getFactory(WebuiConfiguration.class);
      IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
      WebuiConfiguration config = (WebuiConfiguration)uctx.unmarshalDocument(inputStream, null);
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      if (config.getAnnotationClasses() != null)
      {
         for (String annotationClass : config.getAnnotationClasses())
         {
View Full Code Here


               //
               IBindingFactory bfact = BindingDirectory.getFactory(Configuration.class);
               IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

               return (Configuration)uctx.unmarshalDocument(new StringReader(document), null);
            }
         });
      }
      catch (PrivilegedActionException pae)
      {
View Full Code Here

   static public XMLCollection getXMLCollection(InputStream is) throws Exception
   {
      IBindingFactory bfact = BindingDirectory.getFactory(XMLObject.class);
      IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
      return (XMLCollection)uctx.unmarshalDocument(is, null);
   }

   static public Collection getCollection(InputStream is) throws Exception
   {
      return getXMLCollection(is).getCollection();
View Full Code Here

         log.trace("About to parse configuration file " + document);

      //
      IBindingFactory bfact = BindingDirectory.getFactory(Configuration.class);
      IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
      return (Configuration)uctx.unmarshalDocument(new StringReader(document), null);
   }
}
View Full Code Here

   static public XMLObject getXMLObject(InputStream is) throws Exception
   {
      IBindingFactory bfact = BindingDirectory.getFactory(XMLObject.class);
      IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
      XMLObject xmlobject = (XMLObject)uctx.unmarshalDocument(is, "UTF-8");
      return xmlobject;
   }

   static public Object getObject(InputStream is) throws Exception
   {
View Full Code Here

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

            return (Configuration) uctx.unmarshalDocument(stream, null);
        } catch (JiBXException e) {
            throw new RuntimeException(
                EXCEPTION_LOCALIZER.format("unmarshal-failure"), e);
        }
    }
View Full Code Here

                BindingDirectory.getFactory(aClass);

        IUnmarshallingContext unmarshallingContext =
                identificationBindingFactory.createUnmarshallingContext();

        Object unmarshalled = unmarshallingContext.unmarshalDocument(reader,
                null);
        return unmarshalled;
    }

View Full Code Here

        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

        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

            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

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.