Examples of DecapitalizeNameMapper


Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        doTest(new CapitalizeNameMapper(), "capitalize name mapper");
    }

    public void testDecapitalizeNameMapper() throws Exception {
//        testLog.debug("Testing decapitalize name mapper");
        doTest(new DecapitalizeNameMapper(), "decapitalize name mapper");
    }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        dynasaur.set("Period", "Jurassic");
       
        StringWriter out = new StringWriter();
        out.write("<?xml version='1.0'?>");
        BeanWriter writer = new BeanWriter(out);
        writer.getXMLIntrospector().setElementNameMapper(new DecapitalizeNameMapper());
        writer.write(dynasaur);
       
        String xml = "<?xml version='1.0'?><dynasaur><species>Allosaurus</species>"
            + "<isRaptor>true</isRaptor><period>Jurassic</period></dynasaur>";
       
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

    public void testOverrideWithDotBetwixt() throws Exception {
        DynaWithDotBetwixt bean = new DynaWithDotBetwixt("Tweedledum","Tweedledee");
        StringWriter out = new StringWriter();
        out.write("<?xml version='1.0'?>");
        BeanWriter writer = new BeanWriter(out);
        writer.getXMLIntrospector().setElementNameMapper(new DecapitalizeNameMapper());
        writer.write("bean", bean);
       
        String xml = "<?xml version='1.0'?><bean><ndp>Tweedledum</ndp></bean>";
        xmlAssertIsomorphicContent
                            "Test write dyna beans with dt betwixt",
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        // This will set our ElementMapper.
        introspector.setElementNameMapper(new HyphenatedNameMapper(true, "_"));
        // since our attribute names will use a different
        // naming convention in our xml file (just all lowercase)
        // we set another mapper for the attributes
        introspector.setAttributeNameMapper(new DecapitalizeNameMapper());

        return introspector;
    }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        // wrap collections in an XML element
        introspector.setWrapCollectionsInElement(false);

        // turn bean elements first letter into lower case
        introspector.setElementNameMapper( new DecapitalizeNameMapper() );

        // Set default plural stemmer.
        introspector.setPluralStemmer( new DefaultPluralStemmer() );

        return introspector;
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

       
        StringWriter out = new StringWriter();
        out.write("<?xml version='1.0'?>");
        BeanWriter writer = new BeanWriter(out);
    writer.getBindingConfiguration().setMapIDs(false);
        writer.getXMLIntrospector().getConfiguration().setElementNameMapper(new DecapitalizeNameMapper());
        writer.write(dynasaur);
       
        String xml = "<?xml version='1.0'?><dynasaur><species>Allosaurus</species>"
            + "<isRaptor>true</isRaptor><period>Jurassic</period></dynasaur>";
       
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        DynaWithDotBetwixt bean = new DynaWithDotBetwixt("Tweedledum","Tweedledee");
        StringWriter out = new StringWriter();
        out.write("<?xml version='1.0'?>");
        BeanWriter writer = new BeanWriter(out);
    writer.getBindingConfiguration().setMapIDs(false);
        writer.getXMLIntrospector().getConfiguration().setElementNameMapper(new DecapitalizeNameMapper());
        writer.write("bean", bean);
       
        String xml = "<?xml version='1.0'?><bean><ndp>Tweedledum</ndp></bean>";
        xmlAssertIsomorphicContent
                            "Test write dyna beans with dt betwixt",
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        // wrap collections in an XML element
        introspector.getConfiguration().setWrapCollectionsInElement(false);

        // turn bean elements first letter into lower case
        introspector.getConfiguration().setElementNameMapper( new DecapitalizeNameMapper() );

        // Set default plural stemmer.
        introspector.getConfiguration().setPluralStemmer( new DefaultPluralStemmer() );

        return introspector;
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        doTest(new CapitalizeNameMapper(), "capitalize name mapper");
    }

    public void testDecapitalizeNameMapper() throws Exception {
//        testLog.debug("Testing decapitalize name mapper");
        doTest(new DecapitalizeNameMapper(), "decapitalize name mapper");
    }
View Full Code Here

Examples of org.apache.commons.betwixt.strategy.DecapitalizeNameMapper

        // This will set our ElementMapper.
        introspector.getConfiguration().setElementNameMapper(new HyphenatedNameMapper(true, "_"));
        // since our attribute names will use a different
        // naming convention in our xml file (just all lowercase)
        // we set another mapper for the attributes
        introspector.getConfiguration().setAttributeNameMapper(new DecapitalizeNameMapper());

        return introspector;
    }
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.