Package org.apache.commons.betwixt

Examples of org.apache.commons.betwixt.BindingConfiguration


        ElementDescriptor baseElementDescriptor,
        Class baseBeanClass,
        boolean matchIDs) {
        this.basePath = basePath;
        this.baseElementDescriptor = baseElementDescriptor;
        BindingConfiguration bindingConfiguration = new BindingConfiguration();
        bindingConfiguration.setMapIDs(matchIDs);
        context =
            new DigesterReadContext(
                log,
                bindingConfiguration,
                new ReadConfiguration());
View Full Code Here


        return new TestSuite(TestReadContext.class);
    }   
   
    public void testElementStackPushPop() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
        context.pushElement("alpha");
        assertEquals("Push then pop", "alpha", context.popElement());
        assertEquals("Push then pop at bottom", null, context.popElement());
       
View Full Code Here

          
    }
      
    public void testElementStackMarkedPushPop() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());

        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(Object.class);
View Full Code Here

    }
   
    public void testLastMappedClassNoClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
        context.pushElement("beta");
        context.pushElement("delta");
        context.pushElement("gamma");
        assertEquals("No class", null, context.getLastMappedClass());
View Full Code Here

    }
   
    public void testLastMappedClassBottomClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());

        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
View Full Code Here

   
    public void testLastMappedClassTwoClasses() throws Exception
    {
       
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());   
        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(String.class);
View Full Code Here

    }
   
    public void testLastMappedClassTopClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());   
        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(String.class);
View Full Code Here

   
   
    public void testNullElementNameMatchesAll() throws Exception {
       
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
                   
        context.pushElement("LibraryBeanWithArraySetter");  
        context.markClassMap(LibraryBeanWithArraySetter.class);
        context.pushElement("books");
View Full Code Here

     * It can therefore be safely be modified.
     * </p>
     * @return BindingConfiguration, not null
     */
    public BindingConfiguration createSchemaBindingConfiguration() {
        BindingConfiguration configuration = new BindingConfiguration();
        configuration.setMapIDs(false);
        return configuration;  
    }
View Full Code Here

        bean.setCountry("DEFAULT");
       
        XMLIntrospector introspector = new XMLIntrospector();
        ElementDescriptor elementDescriptor = introspector.introspect(AddressBean.class).getElementDescriptor();
       
        ReadContext context = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
        context.setBean(bean);
        context.markClassMap(AddressBean.class);
        context.pushElement("NoMatch");
        context.setXMLIntrospector(introspector);
        SimpleTypeBindAction action = new SimpleTypeBindAction();
View Full Code Here

TOP

Related Classes of org.apache.commons.betwixt.BindingConfiguration

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.