Package org.apache.commons.digester

Examples of org.apache.commons.digester.SetNestedPropertiesRule


    digester.addCallMethod("*/image/imageSource", "setImageSource", 0);

    /*   */
    digester.addFactoryCreate("*/text", JRPrintTextFactory.class.getName());
    digester.addSetNext("*/text", "addElement", JRPrintElement.class.getName());
    SetNestedPropertiesRule textRule = new SetNestedPropertiesRule(
        new String[]{"textContent", "textTruncateSuffix", "reportElement", "box", "font",
            JRXmlConstants.ELEMENT_lineBreakOffsets},
        new String[]{"text", "textTruncateSuffix"});
    textRule.setTrimData(false);
    textRule.setAllowUnknownChildElements(true);
    digester.addRule("*/text", textRule);

    digester.addRule("*/text/textContent",
        new SetPropertiesRule(JRXmlConstants.ATTRIBUTE_truncateIndex, "textTruncateIndex"));
   
View Full Code Here


    digester.addCallMethod("*/image/imageExpression", "setText", 0);

    /*   */
    digester.addFactoryCreate("*/staticText", JRStaticTextFactory.class.getName());
    digester.addSetNext("*/staticText", "addElement", JRDesignElement.class.getName());
    SetNestedPropertiesRule textRule = new SetNestedPropertiesRule(new String[]{"text", "reportElement", "box", "textElement"}, new String[]{"text"});
    textRule.setTrimData(false);
    textRule.setAllowUnknownChildElements(true);
    digester.addRule("*/staticText", textRule);


    /*   */
    digester.addFactoryCreate("*/textElement", JRTextElementFactory.class.getName());
View Full Code Here

     */
    protected class SetNestedPropertiesRuleFactory extends AbstractObjectCreationFactory {
        public Object createObject(Attributes attributes) {
           boolean allowUnknownChildElements =
                "true".equalsIgnoreCase(attributes.getValue("allow-unknown-child-elements"));
                SetNestedPropertiesRule snpr = new SetNestedPropertiesRule();
                snpr.setAllowUnknownChildElements( allowUnknownChildElements );
                return snpr;
        }
View Full Code Here

         */
        public void begin(Attributes attributes) {
            String attrName = attributes.getValue("attr-name");
            String propName = attributes.getValue("prop-name");
   
            SetNestedPropertiesRule rule = (SetNestedPropertiesRule) digester.peek();
            rule.addAlias(attrName, propName);
        }
View Full Code Here

    protected class SetNestedPropertiesRuleFactory extends AbstractObjectCreationFactory {
        @Override
        public Object createObject(Attributes attributes) {
           boolean allowUnknownChildElements =
                "true".equalsIgnoreCase(attributes.getValue("allow-unknown-child-elements"));
                SetNestedPropertiesRule snpr = new SetNestedPropertiesRule();
                snpr.setAllowUnknownChildElements( allowUnknownChildElements );
                return snpr;
        }
View Full Code Here

        @Override
        public void begin(Attributes attributes) {
            String attrName = attributes.getValue("attr-name");
            String propName = attributes.getValue("prop-name");
   
            SetNestedPropertiesRule rule = (SetNestedPropertiesRule) digester.peek();
            rule.addAlias(attrName, propName);
        }
View Full Code Here

     */
    protected class SetNestedPropertiesRuleFactory extends AbstractObjectCreationFactory {
        public Object createObject(Attributes attributes) {
           boolean allowUnknownChildElements =
                "true".equalsIgnoreCase(attributes.getValue("allow-unknown-child-elements"));
                SetNestedPropertiesRule snpr = new SetNestedPropertiesRule();
                snpr.setAllowUnknownChildElements( allowUnknownChildElements );
                return snpr;
        }
View Full Code Here

         */
        public void begin(Attributes attributes) {
            String attrName = attributes.getValue("attr-name");
            String propName = attributes.getValue("prop-name");
   
            SetNestedPropertiesRule rule = (SetNestedPropertiesRule) digester.peek();
            rule.addAlias(attrName, propName);
        }
View Full Code Here

     */
    protected class SetNestedPropertiesRuleFactory extends AbstractObjectCreationFactory {
        public Object createObject(Attributes attributes) {
           boolean allowUnknownChildElements =
                "true".equalsIgnoreCase(attributes.getValue("allow-unknown-child-elements"));
                SetNestedPropertiesRule snpr = new SetNestedPropertiesRule();
                snpr.setAllowUnknownChildElements( allowUnknownChildElements );
                return snpr;
        }
View Full Code Here

         */
        public void begin(Attributes attributes) {
            String attrName = attributes.getValue("attr-name");
            String propName = attributes.getValue("prop-name");
   
            SetNestedPropertiesRule rule = (SetNestedPropertiesRule) digester.peek();
            rule.addAlias(attrName, propName);
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.digester.SetNestedPropertiesRule

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.