Package javax.xml.bind

Examples of javax.xml.bind.Unmarshaller


     * @param r The reader of the XML stream
     * @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);       
    }
View Full Code Here


     * @param r The input reader of the XML representation
     * @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;
    }
View Full Code Here

     * @param is The input stream of the version XML file
     * @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);       
    }
View Full Code Here

     * @param is The input stream of the XML representation
     * @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);       
    }
View Full Code Here

     * @param r The input reader of the requires XML file
     * @throw ClassCastException If the input file does not map to ModuleRequires
     * @throw JAXBException Upon error reading the XML file
     */
    public static ModuleRequires decode(Reader r) throws JAXBException {
        Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
        return (ModuleRequires)unmarshaller.unmarshal(r);       
    }
View Full Code Here

     * @param server The server name and port as <server name>:<port>
     * @throw ClassCastException If the input data does not map to ModulePluginList
     * @throw JAXBException Upon error reading the XML data
     */
    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);
    }
View Full Code Here

     * @param r The input stream of the version XML file
     * @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);
    }
View Full Code Here

            exception = new ManifoldCFException("FetchTokensThread error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
            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

            exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
            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

        if (jaxbContext == null) {
            // 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

TOP

Related Classes of javax.xml.bind.Unmarshaller

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.