Package org.exolab.castor.mapping

Examples of org.exolab.castor.mapping.Mapping.loadMapping()


            name = (String)entry.getKey();
            mappingSource = (String)entry.getValue();
           
        source = resolver.resolveURI(mappingSource);
        mapping = new Mapping();
        mapping.loadMapping(SourceUtil.getInputSource(source));
        this.mappings.put(name, mapping);
          }
        } finally {
            if (source != null) {
                resolver.release(source);
View Full Code Here


                resolver.release(source);
            }
            try {
                source = resolver.resolveURI(WEBXML_MAPPING);

                mappingWebXml.loadMapping(SourceUtil.getInputSource(source));
            } finally {
                resolver.release(source);
            }

            String baseWMDir = servletContext.getRealPath("");
View Full Code Here

        if (this.grammarSource.getInputStream()==null)
          throw new ProcessingException("Source '"+this.grammarSource.getURI()+"' not found");

        Mapping mapping = new Mapping();

        mapping.loadMapping(new InputSource(ExtendedGrammar.class.getResource("mapping.xml")
                                                                 .openStream()));

        Unmarshaller unmarshaller = new Unmarshaller(ExtendedGrammar.class);
        unmarshaller.setMapping(mapping);
View Full Code Here

            {
                FileReader reader = new FileReader(xregFile);
                mapping = new SynchronizedMapping();
                InputSource is = new InputSource(new FileReader(map));
                is.setSystemId(mapFile);
                mapping.loadMapping(is);
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                RegistryFragment fragment = (RegistryFragment) unmarshaller.unmarshal(reader);
                assertNotNull(fragment);
                Vector portlets = fragment.getPortlets();
View Full Code Here

        {
            FileReader reader = new FileReader(xregFile);
            mapping = new SynchronizedMapping();
            InputSource is = new InputSource(new FileReader(map));
            is.setSystemId(mapFile);
            mapping.loadMapping(is);
            Unmarshaller unmarshaller = new Unmarshaller(mapping);
            RegistryFragment fragment = (RegistryFragment) unmarshaller.unmarshal(reader);
            assertNotNull(fragment);
            Vector securityEntries = fragment.getSecurityEntries();
            assertTrue("Security Entries exist", !securityEntries.isEmpty());
View Full Code Here

        {
            FileReader reader = new FileReader(xregFile);
            mapping = new SynchronizedMapping();
            InputSource is = new InputSource(new FileReader(map));
            is.setSystemId(mapFile);
            mapping.loadMapping(is);
            Unmarshaller unmarshaller = new Unmarshaller(mapping);
            RegistryFragment fragment = (RegistryFragment) unmarshaller.unmarshal(reader);
            assertNotNull(fragment);
            Vector securityEntries = fragment.getSecurityEntries();
            assertTrue("Security Entries exist", !securityEntries.isEmpty());
View Full Code Here

            {
                FileReader reader = new FileReader(xregFile);
                mapping = new SynchronizedMapping();
                InputSource is = new InputSource(new FileReader(map));
                is.setSystemId(mapFile);
                mapping.loadMapping(is);
                Unmarshaller unmarshaller = new Unmarshaller(mapping);
                ContentURL url = (ContentURL) unmarshaller.unmarshal(reader);
                assertNotNull(url);

                System.out.println(url.getURL());
View Full Code Here

        try
        {
            Mapping mapping = new SynchronizedMapping();
            InputSource is = new InputSource(new FileReader(map));
            is.setSystemId(mapFile);
            mapping.loadMapping(is);
           
            DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = dbfactory.newDocumentBuilder();
      
            Document d = builder.parse(new File(registryFile));
View Full Code Here

            name = (String)entry.getKey();
            mappingSource = (String)entry.getValue();
           
        source = resolver.resolveURI(mappingSource);
        mapping = new Mapping();
        mapping.loadMapping(SourceUtil.getInputSource(source));
        this.mappings.put(name, mapping);
          }
        } finally {
            if (source != null) {
                resolver.release(source);
View Full Code Here

            {
                FileReader reader = new FileReader(psmlFile);
                mapping = new SynchronizedMapping();
                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"));
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.