Package javax.xml.bind

Examples of javax.xml.bind.Unmarshaller.unmarshal()


     * @throw ClassCastException If the input file does not map to this class
     * @throw JAXBException Upon error reading the XML stream
     */
    public static WorldRoot decode(Reader r) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        return (WorldRoot)unmarshaller.unmarshal(r);       
    }
   
    /**
     * Writes the XML representation of this class to a writer.
     * <p>
 
View Full Code Here


     * @throw ClassCastException If the input file does not map to WFSCellList
     * @throw JAXBException Upon error reading the XML stream
     */
    public static ModuleList decode(Reader r) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        ModuleList children = (ModuleList)unmarshaller.unmarshal(r);
        return children;
    }
   
    /**
     * Writes the ModuleInfoList class to an output writer.
View Full Code Here

     * @throw ClassCastException If the input file does not map to ModuleRequires
     * @throw JAXBException Upon error reading the XML file
     */
    public static ModuleRequires decode(InputStream is) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        return (ModuleRequires)unmarshaller.unmarshal(is);       
    }

    /**
     * Takes the input reader of the XML file and instantiates an instance of
     * the ModuleRequires class
View Full Code Here

     * @throw ClassCastException If the input file does not map to WFSREcordingList
     * @throw JAXBException Upon error reading the XML stream
     */
    public static WFSRecordingList decode(InputStream is) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        return (WFSRecordingList)unmarshaller.unmarshal(is);       
    }
   
    /**
     * Writes the WFSREcordingList class to an output stream.
     * <p>
 
View Full Code Here

     */
    public static ModulePluginList decode(Reader r, String server) throws JAXBException {
        Unmarshaller u = jaxbContext.createUnmarshaller();
        JarURIAdapter adapter = new JarURIAdapter(server);
        u.setAdapter(adapter);
        return (ModulePluginList)u.unmarshal(r);
    }
   
    /**
     * Writes the ModuleRepository class to an output writer.
     * <p>
 
View Full Code Here

     * @throw ClassCastException If the input file does not map to ServerDetails
     * @throw JAXBException Upon error reading the XML file
     */
    public static ServerDetails decode(Reader r) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        return (ServerDetails)unmarshaller.unmarshal(r);
    }

    /**
     * Writes the ServerDetails class to an output writer.
     * <p>
 
View Full Code Here

            return;
          }
          JAXBContext context;
          context = JAXBContext.newInstance(Auth.class);
          Unmarshaller m = context.createUnmarshaller();
          auth = (Auth) m.unmarshal(response.getEntity().getContent());
        } catch (JAXBException ex) {
          exception = ex;
        } finally {
          EntityUtils.consume(response.getEntity());
          method.releaseConnection();
View Full Code Here

            return;
          }
          JAXBContext context;
          context = JAXBContext.newInstance(Items.class);
          Unmarshaller m = context.createUnmarshaller();
          Items items = (Items) m.unmarshal(response.getEntity().getContent());
          if (items.items != null) {
            for (Item item : items.items) {
              documentCache.put(item.id, item);
              for (int i = 0; i < versions.length; i++) {
                if (documentIdentifiers[i].equals(item.id)) {
View Full Code Here

            // must use classloader from CamelContext to have JAXB working
            jaxbContext = JAXBContext.newInstance(Constants.JAXB_CONTEXT_PACKAGES, CamelContext.class.getClassLoader());
        }

        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        Object result = unmarshaller.unmarshal(is);

        if (result == null) {
            throw new IOException("Cannot unmarshal to routes using JAXB from input stream: " + is);
        }
View Full Code Here

    private static TypeDefinition loadType(String filename) {
        TypeDefinition result = null;

        try {
            Unmarshaller u = JaxBHelper.createUnmarshaller();
            JAXBElement<CmisTypeDefinitionType> type = (JAXBElement<CmisTypeDefinitionType>) u.unmarshal(new File(
                    filename));
            result = Converter.convert(type.getValue());
        } catch (Exception e) {
            log.info("Could not load type: '" + filename + "'", 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.