Package org.jibx.runtime

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


   {
      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


         }

         IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration conf =
                  (RepositoryServiceConfiguration) uctx.unmarshalDocument(PrivilegedFileHelper
                           .fileInputStream(configFile), null);

         if (conf.getRepositoryConfigurations().size() != 1)
         {
            throw new RepositoryRestoreExeption(
View Full Code Here

   private Container toContainer(String xml) throws Exception
   {
      ByteArrayInputStream is = new ByteArrayInputStream(xml.getBytes());
      IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
      IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
      return (Container)uctx.unmarshalDocument(is, null);
   }

   static public class SelectCategoryActionListener extends EventListener<UIContainerList>
   {
      public void execute(Event<UIContainerList> event) throws Exception
View Full Code Here

      final IBindingFactory factory =
         BindingDirectory.getFactory(Controller.class);
      final IUnmarshallingContext context =
         factory.createUnmarshallingContext();
      final InputStream stream = new FileInputStream(file);
      return (Controller) context.unmarshalDocument(stream, ENCODING);
   }

   /**
    * Static method for marshalling a service.
    *
 
View Full Code Here

      throws JiBXException {
      final IBindingFactory factory =
         BindingDirectory.getFactory(Service.class);
      final IUnmarshallingContext context =
         factory.createUnmarshallingContext();
      return (Service) context.unmarshalDocument(input, ENCODING);
   }

   /**
    * Static method for marshalling services (list).
    *
 
View Full Code Here

      throws JiBXException, FileNotFoundException {
      final IBindingFactory factory =
         BindingDirectory.getFactory(Services.class);
      final IUnmarshallingContext context =
         factory.createUnmarshallingContext();
      return (Services) context.unmarshalDocument(input, ENCODING);
   }

}
View Full Code Here

   private RepositoryEntry getRepositoryEntry(InputStream wEntryStream, String repositoryName)
            throws FileNotFoundException, JiBXException, RepositoryConfigurationException
   {
      IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
      IUnmarshallingContext uctx = factory.createUnmarshallingContext();
      RepositoryServiceConfiguration conf = (RepositoryServiceConfiguration) uctx.unmarshalDocument(wEntryStream, null);
      RepositoryEntry rEntry = conf.getRepositoryConfiguration(repositoryName);

      return rEntry;
   }
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

            }
         }

         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration conf =
                  (RepositoryServiceConfiguration) uctx.unmarshalDocument(PrivilegedFileHelper
                           .fileInputStream(configFile), null);

         RepositoryEntry repositoryEntry = conf.getRepositoryConfiguration(getBackupConfig().getRepository());

         if (repositoryEntry.getWorkspaceEntries().size() != 1)
View Full Code Here

            }
         }

         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration conf =
                  (RepositoryServiceConfiguration) uctx.unmarshalDocument(PrivilegedFileHelper
                           .fileInputStream(configFile), null);

         if (conf.getRepositoryConfigurations().size() != 1)
         {
            throw new RepositoryRestoreExeption(
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.