Package org.jibx.runtime

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


         saveStream.close();

         persiter.write(new ByteArrayInputStream(((ByteArrayOutputStream)saveStream).toByteArray()));

         IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         RepositoryServiceConfiguration storedConf =
            (RepositoryServiceConfiguration)uctx.unmarshalDocument(persiter.read(), null);

         for (int i = 0; i < theadsCount; i++)
         {
View Full Code Here


  private PieceDef loadPiece(String pieceFile) throws JiBXException, IOException {
    URL piecePath = Pieces.class.getResource("/xml/pieces/" + pieceFile);

    IBindingFactory bfact = BindingDirectory.getFactory(PieceDef.class);

    IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
    return (PieceDef) uctx.unmarshalDocument(new BufferedReader(
        new InputStreamReader(piecePath.openStream())), null);
  }
}
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

    }

    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        ObjectHelper.notNull(getUnmarshallClass(), "unmarshallClass");
        IBindingFactory bindingFactory = BindingDirectory.getFactory(getUnmarshallClass());
        IUnmarshallingContext unmarshallingContext = bindingFactory.createUnmarshallingContext();
        return unmarshallingContext.unmarshalDocument(stream, null);
    }

    public Class<?> getUnmarshallClass() {
        return unmarshallClass;
View Full Code Here

      // Debug
      log.debug("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

   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();
View Full Code Here

     * @see IUnmarshallingContext#unmarshalDocument(java.io.InputStream, String)
     */
    private Container toContainer(final 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);
    }

    /**
     * Get windowId of <code>UIPortlet</code>
View Full Code Here

      try
      {

         IBindingFactory factory = BindingDirectory.getFactory(NodeTypeValuesList.class);
         IUnmarshallingContext uctx = factory.createUnmarshallingContext();
         NodeTypeValuesList nodeTypeValuesList = (NodeTypeValuesList) uctx.unmarshalDocument(xml, null);
         List ntvList = nodeTypeValuesList.getNodeTypeValuesList();

         long start = System.currentTimeMillis();
         List<NodeTypeValue> nts = new ArrayList<NodeTypeValue>();
View Full Code Here

        if (JibxSimpleTypes.isSimpleType(jtype)) {
            factory = JibxNullBindingFactory.getFactory();
        } else {
            factory = BindingDirectory.getFactory(jtype);
        }
        UnmarshallingContext ctx = (UnmarshallingContext)factory.createUnmarshallingContext();
        StAXReaderWrapper wrapper = new StAXReaderWrapper(reader, "Data-element", true);
        ctx.setDocument(wrapper);
        ctx.toTag();
        return ctx;
    }
View Full Code Here

    }

    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        ObjectHelper.notNull(getUnmarshallClass(), "unmarshallClass");
        IBindingFactory bindingFactory = BindingDirectory.getFactory(getUnmarshallClass());
        IUnmarshallingContext unmarshallingContext = bindingFactory.createUnmarshallingContext();
        return unmarshallingContext.unmarshalDocument(stream, null);
    }

    public Class getUnmarshallClass() {
        return unmarshallClass;
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.