Package org.exolab.castor.xml

Examples of org.exolab.castor.xml.Unmarshaller


        {
            synchronized(watcher)
            {
                file = new File(directory, name + extension).getCanonicalPath();
   
                Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
                RegistryFragment fragment = (RegistryFragment) unmarshaller.unmarshal(reader);
   
                fragment.setChanged(true);
   
                updateFragment(file, fragment);
   
View Full Code Here


                FileReader reader = new FileReader(psmlFile);
                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
View Full Code Here

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");

                assertTrue(rootset.getName().equals("theRootSet"));
                assertTrue(rootset.getId().equals("01"));
View Full Code Here

                FileReader reader = new FileReader(psmlFile);
                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                Security security = (Security)unmarshaller.unmarshal(reader);
                assertNotNull(security);
                assertTrue(security.getId().equals("1000"));

            }
            catch (Exception e)
View Full Code Here

            InputSource is = new InputSource( new FileReader(map) );
            is.setSystemId( mapFile );
            mapping.loadMapping( is );

            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
            Unmarshaller unmarshaller = new Unmarshaller(mapping);
            Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
            System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
           
            assertTrue(rootset.getName().equals("theRootSet"));
            assertTrue(rootset.getId().equals("01"));
           
View Full Code Here

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");

                assertTrue(rootset.getName().equals("theRootSet"));
                assertTrue(rootset.getId().equals("01"));
View Full Code Here

                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                Portlets rootset = (Portlets)unmarshaller.unmarshal(reader);
                System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++");

                assertTrue(rootset.getName().equals("theRootSet"));
                assertTrue(rootset.getId().equals("01"));
View Full Code Here

                DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = dbfactory.newDocumentBuilder();

                Document d = builder.parse(f);

                Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
                portlets = (Portlets)unmarshaller.unmarshal((Node) d);

                doc.setPortlets(portlets);

            }
            catch (IOException e)
View Full Code Here

     * @param the loaded portlets structure or null
     */
    protected Portlets load(Reader reader)
        throws IOException, MarshalException, ValidationException, MappingException
    {
        Unmarshaller unmarshaller = new Unmarshaller(this.mapping);
        Portlets portlets = (Portlets)unmarshaller.unmarshal(reader);
        return portlets;
    }
View Full Code Here

                FileReader reader = new FileReader(psmlFile);
                mapping = new Mapping();
                InputSource is = new InputSource( new FileReader(map) );
                is.setSystemId( mapFile );
                mapping.loadMapping( is );
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ConfigElement rootset = (ConfigElement)unmarshaller.unmarshal(reader);
               
                assertTrue(rootset.getName().equals("theRootSet"));

                Iterator params = rootset.getParameterIterator();
                Parameter param = (Parameter)params.next();
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.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.