Package org.jibx.runtime

Examples of org.jibx.runtime.IUnmarshallingContext


   }

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


   protected final void init(InputStream is) throws RepositoryConfigurationException
   {
      try
      {
         IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration conf = (RepositoryServiceConfiguration)uctx.unmarshalDocument(is, null);

         this.defaultRepositoryName = conf.getDefaultRepositoryName();
         this.repositoryConfigurations = conf.getRepositoryConfigurations();

         //      setDefaultRepositoryName(conf.getDefaultRepositoryName());
View Full Code Here

   protected final void merge(InputStream is) throws RepositoryConfigurationException
   {
      try
      {
         IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration conf = (RepositoryServiceConfiguration)uctx.unmarshalDocument(is, null);

         if (defaultRepositoryName == null)
         {
            this.defaultRepositoryName = conf.getDefaultRepositoryName();           
         }
View Full Code Here

   public List<NodeTypeData> getAllNodeTypes() throws RepositoryException
   {
      try
      {
         IBindingFactory factory = BindingDirectory.getFactory(NodeTypeValuesList.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         NodeTypeValuesList nodeTypeValuesList = (NodeTypeValuesList)uctx.unmarshalDocument(is, null);
         List ntvList = nodeTypeValuesList.getNodeTypeValuesList();
         return converter.convertFromValueToData(ntvList);
      }
      catch (JiBXException e)
      {
View Full Code Here

    * @throws Exception
    */
   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

               if (log.isTraceEnabled())
                  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);
            }
         });
      }
      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);
   }
View Full Code Here

      if (log.isTraceEnabled())
         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;
   }
View Full Code Here

    // javadoc inherited
    public Configuration unmarshal(InputStream stream) {
        try {
            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

TOP

Related Classes of org.jibx.runtime.IUnmarshallingContext

Copyright © 2018 www.massapicom. 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.