Package org.apache.commons.betwixt

Examples of org.apache.commons.betwixt.BindingConfiguration


        bean.setStreet("DEFAULT");
        bean.setCode("DEFAULT");
        bean.setCountry("DEFAULT");
       
        XMLIntrospector introspector = new XMLIntrospector();
        ReadContext context = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
        context.pushBean(bean);
        context.markClassMap(AddressBean.class);
        context.pushElement("street");
        context.setXMLIntrospector(introspector);
        SimpleTypeBindAction action = new SimpleTypeBindAction();
View Full Code Here


      * @param bean evaluate expressions against this bean
      * @param log log to this logger
      * @deprecated 0.5 use constructor which takes a BindingConfiguration
      */
    public Context(Object bean, Log log) {
        this( bean, log, new BindingConfiguration() );
    }
View Full Code Here

      * @param variables context variables
      * @param log log to this logger
      * @deprecated 0.5 use constructor which takes a converter
      */
    public Context(Object bean, Map variables, Log log) {
        this( bean, variables, log, new BindingConfiguration() );
    }
View Full Code Here

    @Test
    public void testPipelineWithConfiguredBeanGenerator() throws Exception {
        Animal animal = new Animal(5, "Dook", "albino", "Mustela putoris furo", "Lector");

        BindingConfiguration bindingConfiguration = new BindingConfiguration();
        bindingConfiguration.setMapIDs(false);

        XMLIntrospector xmlIntrospector = new XMLIntrospector();
        IntrospectionConfiguration configuration = xmlIntrospector.getConfiguration();
        configuration.setAttributesForPrimitives(true);
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

        bean.setStreet("DEFAULT");
        bean.setCode("DEFAULT");
        bean.setCountry("DEFAULT");
       
        XMLIntrospector introspector = new XMLIntrospector();
        ReadContext context = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
        context.pushBean(bean);
        context.markClassMap(AddressBean.class);
        context.pushElement("street");
        context.setXMLIntrospector(introspector);
        SimpleTypeBindAction action = new SimpleTypeBindAction();
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

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.